Hello Erich,
I was able implement these lines. I tried this in 3 different scenarios.
1. with a normal Linux Build. Output:
[ 85%] Generating lib/rexx.img
Activity::resolveProgramName name=CoreClasses.orx
Activity::resolveProgramName res
=/home/tjk/coding/oorexx/linuxbuild/main/trunk/oorexxbuild/bin/CoreClasses.orx
Activity::resolveProgramName name=StreamClasses.orx
Activity::resolveProgramName res
=/home/tjk/coding/oorexx/linuxbuild/main/trunk/oorexxbuild/bin/StreamClasses.orx
Activity::resolveProgramName name=PlatformObjects.orx
Activity::resolveProgramName res
=/home/tjk/coding/oorexx/linuxbuild/main/trunk/oorexxbuild/bin/PlatformObjects.orx
[ 85%] Built target rexx_img
1. with an Android Build taking the rexximage file from a normal Linux Build
to create rexx.img. Output:
[ 86%] Generating lib/rexx.img
Activity::resolveProgramName name=CoreClasses.orx
Activity::resolveProgramName res
=/home/tjk/coding/oorexx/androidbuild/release/bin/CoreClasses.orx
Activity::resolveProgramName name=StreamClasses.orx
Activity::resolveProgramName res
=/home/tjk/coding/oorexx/androidbuild/release/bin/StreamClasses.orx
Activity::resolveProgramName name=PlatformObjects.orx
Activity::resolveProgramName res
=/home/tjk/coding/oorexx/androidbuild/release/bin/PlatformObjects.orx
[ 86%] Built target rexx_img
To achieve that the .img-File is created I had to change the CMakeLists.txt
(creating rexx.img) as follows:
# Build the rexx.img file
add_custom_command(OUTPUT ${ORX_IMAGE_OUTPUT_LOCATION}/rexx.img
COMMAND cp ../rexximage ./rexximage # rexximage problem
COMMAND $<TARGET_FILE:rexximage>
${ORX_IMAGE_OUTPUT_LOCATION}/rexx.img
DEPENDS rexximage rxapi ${image_class_files}
${platform_rexx_img_depends}
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
Some, hopefully useful, output from the Android VM:
PATH=.:$PATH LD_LIBRARY_PATH=../lib rexx -v
<
Open Object Rexx Version 5.0.0 r12239
Build date: Jun 11 2021
Addressing mode: 64
Copyright (c) 1995, 2004 IBM Corporation. All rights reserved.
Copyright (c) 2005-2021 Rexx Language Association. All rights reserved.
This program and the accompanying materials are made available under the terms
of the Common Public License v1.0 which accompanies this distribution or at
https://www.oorexx.org/license.html
PATH=.:$PATH LD_LIBRARY_PATH=../lib rexximage r.img
<
Killed
137|generic_x86_64_arm64:/data/local/tmp/test/release/bin #
I could manage to login with 2 shells so that it was possible to kill the hung
up process. The process gives this info:
1|generic_x86_64_arm64:/data/local/tmp # ps -a
USER PID PPID VSZ RSS WCHAN ADDR S NAME
root 13322 13315 10776408 4468 futex_wai+ 0 S rexximage
root 13327 13310 10758192 3392 0 0 R ps
generic_x86_64_arm64:/data/local/tmp # kill -9 13322
Maybe futex_wai+ provides some useful information?
The rexximage executable I am using here is the rexximage file which is build
for Android. Maybe its useful if I explain the hole build process:
1. Build a normal Linux release
2. Building ooRexx with the Android Toolchain without changing
CMakeLists.txt regarding the rexximage File. This results in an error because
rexximage was build for Android and is therefore not executable on Linux. But I
use the rexximage File later on the Android VM. Therefore this step is needed.
3. Build ooRexx with the Android Toolchain with changing CMakeLists.txt. As
in my code snippet shown I take the Linux rexximage and replace the Android
rexximage with it. The build is a success.
4. Push the successful Androidbuild with all files to the Android VM.
For the example above where I tried to execute
rexximage r.img
I then push the rexximage built in Step 2 to the Android VM and replace the
rexximage file there. As a result the above error occurs when trying to build
r.img on the Android VM.
I also tried to take everything from step 2, pushed it to the Android VM and
tried to execute rexximage r.img as well. Same result.
Thanks and best regards
Thomas
On 6/10/21 6:11 PM, Erich Steinböck wrote:
Hi Thomas!
Error 3.1: Failure during initialization: File "" is unreadable.
Logic error: Error building kernel image. Image not saved.
It seems as if image build wouldn't find (resolve) the base .orx class files.
Can you in Activity.cpp replace the code body of Activity::resolveProgramName
with
{
printf("Activity::resolveProgramName name=%s\n", name->getStringData());
RexxString *res = instance->resolveProgramName(name, dir, ext, type);
printf("Activity::resolveProgramName res =%s\n", res->getStringData());
return res;
}
When building the image again, this should print something like below
$ ./rexximage r.img
Activity::resolveProgramName name=CoreClasses.orx
Activity::resolveProgramName res
=/home/user/oorexxbuild/release/bin/CoreClasses.orx
Activity::resolveProgramName name=StreamClasses.orx
Activity::resolveProgramName res
=/home/user/oorexxbuild/release/bin/StreamClasses.orx
Activity::resolveProgramName name=PlatformObjects.orx
Activity::resolveProgramName res =/home/ user
/oorexxbuild/release/bin/PlatformObjects.orx
_______________________________________________
Oorexx-devel mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/oorexx-devel
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel