Gute nacht Rony I have an atypical configuration where I use DYLD_LIBRARY_PATH to locate the BSF4OORexx library. This is because I don’t “install” BSF4OORexx, I just unzip the delivery, copy and rename the libraries to bsf4oorex/install/64 With this configuration, your test cases are working (not saying this is the solution).
If I don’t set DYLD_LIBRARY_PATH, I get the same error than yours. I compared the output of the next command in both cases DYLD_PRINT_LIBRARIES="1" DYLD_PRINT_APIS="1" rexx -e "call bsf.cls” In the working session: dlopen(librexxapi.dylib, 0x00000001) dlopen(librexxapi.dylib) ==> 0x10936da50 dlopen(libBSF4ooRexx.dylib, 0x00000001) dyld: loaded: /local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20210715-beta/bsf4oorexx/install/64/libBSF4ooRexx.dylib dyld: loaded: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib dyld: loaded: /usr/lib/libstdc++.6.0.9.dylib In the not working session: dlopen(librexxapi.dylib, 0x00000001) dlopen(librexxapi.dylib) ==> 0x10dd4a990 dlopen(libBSF4ooRexx.dylib, 0x00000001) dlopen() failed, error: 'dlopen(libBSF4ooRexx.dylib, 1): image not found' dlopen(/usr/lib/libBSF4ooRexx.dylib, 0x00000001) dlopen() failed, error: 'dlopen(/usr/lib/libBSF4ooRexx.dylib, 1): image not found' 919 *-* ::routine xBSF PUBLIC EXTERNAL "LIBRARY BSF4ooRexx BSF " 1 *-* call bsf.cls Error 98 running /local/rexx/bsf4oorexx/BSF4ooRexx_install_v641-20210715-beta/bsf4oorexx/BSF.CLS line 919: Execution error. Error 98.903: Unable to load library "BSF4ooRexx". I find "/usr/lib” in one file: SysLibrary.cpp // try loading directly libraryHandle = dlopen(nameBuffer, RTLD_LAZY); // if not found, then try from /usr/lib if (libraryHandle == NULL) { sprintf(nameBuffer, "/usr/lib/lib%s%s", name, ORX_SHARED_LIBRARY_EXT); libraryHandle = dlopen(nameBuffer, RTLD_LAZY); The part to investigate is how to make the first dlopen work without using DYLD_LIBRARY_PATH: If I put libBSF4ooRexx.dylib in the lib folder of oorexx then it works (RPATH). If I put libBSF4ooRexx.dylib in the current directory then it works (see man dlopen). I don’t know if other solutions are possible for the first dlopen The other solution could to add “/usr/local/lib” as 2nd fallback. But that brings the question of order. Maybe a more general solution would be to use an environment variable like REXX_LIBRARY_PATH. We have already REXX_PATH for locating the rexx files. Jean-Louis > On 17 Jul 2021, at 21:56, Rony G. Flatscher <rony.flatsc...@wu.ac.at> wrote: > > On MacOSX the BSF4ooRexx library is named "libBSF4ooRexx.dylib". > Testing the changes in the BSF4ooRexx installation scripts and then testing > the resulting installations surfaced a problem on MacOSX: libBSF4ooRexx.dylib > can be loaded via Java and used successfully. > However, loading "libBSF4ooRexx.dylib" via ooRexx is not successful. To be > precise, the > ::routine xbsf PUBLIC EXTERNAL "LIBRARY BSF4ooRexx BSF" > fails with the execution error: > > Error 98.903: Unable to load library "BSF4ooRexx". > Here two rexxtry.rex sessions, the first one is run with "rexxj.sh > /usr/local/bin/rexxtry.rex" which loads a Java program that will load the > BSF4ooRexx library to then execute /usr/local/bin/rexxtry.rex. This is > followed by a "rexx rexxtry.rex" session which yields the exection error. > This is then followed by the "rexx -e" statement which does a call BSF.CLS > which then shows the full error message: > > rony@ronymac2014 ~ % rexxj.sh /usr/local/bin/rexxtry.rex > REXX-ooRexx_5.0.0(MT)_64-bit 6.05 12 Jul 2021 > rexxtry.rex lets you interactively try REXX statements. > Each string is executed when you hit Enter. > Enter 'call tell' for a description of the features. > Go on - try a few... Enter 'exit' to end. > call bsf.cls > .............................................. rexxtry.rex on DARWIN > say .bsf4rexx~display.version > ooRexx 5.0.0 r12280 (12 Jul 2021) / BSF 641.20210715 / Java 1.8.0_162, 64-bit > / Darwin 20.5.0 > .............................................. rexxtry.rex on DARWIN > exit > rony@ronymac2014 ~ % rexxtry.rex > REXX-ooRexx_5.0.0(MT)_64-bit 6.05 12 Jul 2021 > rexxtry.rex lets you interactively try REXX statements. > Each string is executed when you hit Enter. > Enter 'call tell' for a description of the features. > Go on - try a few... Enter 'exit' to end. > call bsf.cls > Oooops ! ... try again. Execution error. > Unable to load library "BSF4ooRexx". > rc = 98.903 .................................. rexxtry.rex on DARWIN > exit > rony@ronymac2014 ~ % rexx -e "call bsf.cls" > 919 *-* ::routine xBSF PUBLIC EXTERNAL "LIBRARY > BSF4ooRexx BSF " > 1 *-* call bsf.cls > Error 98 running /usr/local/bin/BSF.CLS line 919: Execution error. > Error 98.903: Unable to load library "BSF4ooRexx". > rony@ronymac2014 ~ % > It is the first of five external "LIBRARY BSF4ooRexx XXX" directives (these > five external function names are: "BSF", "BsfCreateRexxProxy", > "BsfRexxProxy", "BsfUninit4JavaBean", "BsfLoadJava"). So it is the first time > the "BSF4ooRexx" library needs to be proecessed by ooRexx in this way. > This was tested against the Sourceforge version of ooRexx r12280, July 12 > 2021. > > Is there anything I could do to help pinpoint the problem? > > ---rony > > > _______________________________________________ > Oorexx-devel mailing list > Oorexx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-devel
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel