This is not an acceptable patch because it imposes a directory structure
that is not necessary and is not necessarily what will be used on the other
platforms. Just make the simple one-line change to the CMakeLists.txt file
to install rexx.img in the same directory as librexxapi as it intended.

Rick

On Wed, Jan 9, 2019 at 1:21 PM Rony G. Flatscher <rony.flatsc...@wu.ac.at>
wrote:

> On 08.01.2019 21:57, Rick McGuire wrote:
>
> If you are splitting things up into separate bin and lib directories, then
> rexx.img needs to be co-located with librexxapi in order for the image file
> to be located without it being on the path or the current directory.
>
> After generating ooRexx for MacOS from the trunk version of CMakeList.txt
> and the "make install" step, here is the resulting directory structure of
> "~/Applications/ooRexx5.0.0" and the files placed in them:
>
> share:
> total 0
> drwxr-xr-x  42 rony  staff  1344 Jan  9 13:55 ooRexx
> drwxr-xr-x   3 rony  staff    96 Jan  9 13:55 man
> drwxr-xr-x   6 rony  staff   192 Jan  9 13:55 ..
> drwxr-xr-x   4 rony  staff   128 Jan  9 13:55 .
> ... cut (Rexx samples are in "ooRexx", man page files in "man/man1") ...
> *lib*:
> total 5688
> lrwxr-xr-x   1 rony  staff       24 Jan  9 13:55 librxunixsys.dylib -> 
> librxunixsys.5.0.0.dylib
> -rwxr-xr-x   1 rony  staff    52392 Jan  9 13:55 librxunixsys.5.0.0.dylib
> lrwxr-xr-x   1 rony  staff       21 Jan  9 13:55 librxsock.dylib -> 
> librxsock.5.0.0.dylib
> -rwxr-xr-x   1 rony  staff    52996 Jan  9 13:55 librxsock.5.0.0.dylib
> lrwxr-xr-x   1 rony  staff       23 Jan  9 13:55 librxregexp.dylib -> 
> librxregexp.5.0.0.dylib
> -rwxr-xr-x   1 rony  staff    35116 Jan  9 13:55 librxregexp.5.0.0.dylib
> lrwxr-xr-x   1 rony  staff       21 Jan  9 13:55 librxmath.dylib -> 
> librxmath.5.0.0.dylib
> -rwxr-xr-x   1 rony  staff    29556 Jan  9 13:55 librxmath.5.0.0.dylib
> lrwxr-xr-x   1 rony  staff       23 Jan  9 13:55 librexxutil.dylib -> 
> librexxutil.5.0.0.dylib
> -rwxr-xr-x   1 rony  staff    80884 Jan  9 13:55 librexxutil.5.0.0.dylib
> lrwxr-xr-x   1 rony  staff       22 Jan  9 13:55 librexxapi.dylib -> 
> librexxapi.5.0.0.dylib
> -rwxr-xr-x   1 rony  staff   146528 Jan  9 13:55 librexxapi.5.0.0.dylib
> lrwxr-xr-x   1 rony  staff       19 Jan  9 13:55 librexx.dylib -> 
> librexx.5.0.0.dylib
> -rwxr-xr-x   1 rony  staff  2317664 Jan  9 13:55 librexx.5.0.0.dylib
> lrwxr-xr-x   1 rony  staff       25 Jan  9 13:55 liborxncurses.dylib -> 
> liborxncurses.5.0.0.dylib
> -rwxr-xr-x   1 rony  staff   156248 Jan  9 13:55 liborxncurses.5.0.0.dylib
> lrwxr-xr-x   1 rony  staff       22 Jan  9 13:55 libhostemu.dylib -> 
> libhostemu.5.0.0.dylib
> -rwxr-xr-x   1 rony  staff    26640 Jan  9 13:55 libhostemu.5.0.0.dylib
> drwxr-xr-x   6 rony  staff      192 Jan  9 13:55 ..
> drwxr-xr-x  20 rony  staff      640 Jan  9 13:55 .
>
> include:
> total 584
> -rw-r--r--  1 rony  staff    3436 Dec 14  2017 rexxplatformdefs.h
> -rw-r--r--  1 rony  staff    4701 Sep 30  2014 rexxplatformapis.h
> -rw-r--r--  1 rony  staff    3743 Dec 11 17:21 rexxapitypes.h
> -rw-r--r--  1 rony  staff   15376 Dec 23 15:13 rexxapidefs.h
> -rw-r--r--  1 rony  staff   40135 Dec 23 15:13 rexx.h
> -rw-r--r--  1 rony  staff   55634 Dec 21 15:25 oorexxerrors.h
> -rw-r--r--  1 rony  staff  167334 Dec 30 12:59 oorexxapi.h
> drwxr-xr-x  6 rony  staff     192 Jan  9 13:55 ..
> drwxr-xr-x  9 rony  staff     288 Jan  9 13:55 .
> *bin*:
> total 4896
> -rw-r--r--   1 rony  staff    18460 Jan  9 13:52 streamsocket.cls
> -rw-r--r--   1 rony  staff    31703 Jan  9 13:52 socket.cls
> -rw-r--r--   1 rony  staff    18662 Jan  9 13:52 smtp.cls
> -rwxr-xr-x   1 rony  staff    13692 Jan  9 13:55 rxsubcom
> -rw-r--r--   1 rony  staff     3525 Jan  9 13:52 rxregexp.cls
> -rwxr-xr-x   1 rony  staff    18580 Jan  9 13:55 rxqueue
> -rw-r--r--   1 rony  staff    65447 Jan  9 13:52 rxftp.cls
> -rwxr-xr-x   1 rony  staff   104264 Jan  9 13:55 rxapi
> -rwxr-xr-x   1 rony  staff    14965 Jan  9 13:52 rexxtry.rex
> -rwxr-xr-x   1 rony  staff    13676 Jan  9 13:55 rexxc
> -r-xr-xr-x   1 rony  staff  1936904 Jan  9 13:54 rexx.img
> -r-xr-xr-x   1 rony  staff    44667 Jan  9 13:54 rexx.cat
> -rwxr-xr-x   1 rony  staff    17700 Jan  9 13:55 rexx
> -rw-r--r--   1 rony  staff    31791 Jan  9 13:52 ncurses.cls
> -rw-r--r--   1 rony  staff    11444 Jan  9 13:52 mime.cls
> -rwxr-xr-x   1 rony  staff    14236 Jan  9 13:55 libwpipe3.dylib
> -rwxr-xr-x   1 rony  staff    13408 Jan  9 13:55 libwpipe2.dylib
> -rwxr-xr-x   1 rony  staff    13932 Jan  9 13:55 libwpipe1.dylib
> -rw-r--r--   1 rony  staff    13955 Jan  9 13:52 json.cls
> -rw-r--r--   1 rony  staff    24957 Jan  9 13:52 csvStream.cls
> -rwxr-xr-x   1 rony  staff    17608 Jan  9 13:55 callrexx2
> -rwxr-xr-x   1 rony  staff    21540 Jan  9 13:55 callrexx1
> drwxr-xr-x   6 rony  staff      192 Jan  9 13:55 ..
> drwxr-xr-x  24 rony  staff      768 Jan  9 13:55 .
>
>
> It seems to be the standard on Unix, that applications/tools place their
> binaries/commands in a "bin" directory and its libraries into a sibling
> "lib" directory. So, if one has the location of the "lib" directory, with
> "../bin" one could find the companion "bin" directory.
>
> As one can see the "bin" directory on Unix includes the following
> binaries: "rexx", "rexx.img", "rexx.cat", "rexxc", "rxsubcom", and
> "rxapi".
> (In addition the C++ ooRexx samples "callrexx?" with "libwpipe?.dylib"get
> installed there too, which I think should not be the case.)
>
> So ooRexx would need to look for "rexx.img", "rexx.cat", "rxsubcom" and
> "rxapi" in the "bin" directory, which relative to the "lib" directory can
> always be found with the relative path "../bin".
>
> Enclosed please find an experiment with "CMakeList.txt" changed to use
> RPATH and "common/platform/unix/SysProcess.cpp" to become able to locate
> "rexx.img" and the other binaries in "bin", if moving the ooRexx directory
> away from its installation directory (currently being "~/Applications" on
> MacOS)! With the enclosed patch applied it becomes possible to run ooRexx
> without the "bin" directory being on the PATH altogether!
>
> It got successfully tested even with using "address with":
>
> wu114215:oha rony$ *./macos64/bin/rexx -e "out=.array~new; address '' 'ls 
> -al' with output using (out); say out"*
> total 0
> drwxr-xr-x   4 rony  staff   128 Jan  9 13:58 .
> drwxr-xr-x  89 rony  staff  2848 Jan  9 18:46 ..
> drwxr-xr-x   6 rony  staff   192 Jan  9 13:57 macos64
> drwxr-xr-x   6 rony  staff   192 Jan  9 13:58 old
> wu114215:oha rony$
>
>
> ---
>
> The only thing that the enclosed patch cannot handle is finding "rexx.cat",
> such that Rexx error messages (e.g. for 'say 1/0') will instead cause a
> "REX0025E: Cannot open REXX message catalog rexx.cat" message:
>
> wu114215:oha rony$ *./macos64/bin/rexx -e "parse version v; say v"*
> REXX-ooRexx_5.0.0(MT)_64-bit 6.05 9 Jan 2019
> wu114215:oha rony$
>
> wu114215:oha rony$ *./macos64/bin/rexx -e "say 'current directory:' 
> directory()"*
> current directory: /Users/rony/oha
> wu114215:oha rony$
>
> wu114215:oha rony$ *./macos64/bin/rexx -e "say 1/0"*
>      1 *-* say 1/0
> REX0042E: Cannot open REXX message catalog rexx.cat.  Not in NLSPATH or 
> /Users/rony/Applications/ooRexx5.0.0/bin. 42 Cannot open REXX message catalog 
> rexx.cat.  Not in NLSPATH or /Users/rony/Applications/ooRexx5.0.0/bin. 
> INSTORE Cannot open REXX message catalog rexx.cat.  Not in NLSPATH or 
> /Users/rony/Applications/ooRexx5.0.0/bin. 1:  Cannot open REXX message 
> catalog rexx.cat.  Not in NLSPATH or /Users/rony/Applications/ooRexx5.0.0/bin.
> REX0413E: Cannot open REXX message catalog rexx.cat.  Not in NLSPATH or 
> /Users/rony/Applications/ooRexx5.0.0/bin. 42.3:  Cannot open REXX message 
> catalog rexx.cat.  Not in NLSPATH or /Users/rony/Applications/ooRexx5.0.0/bin.
>
> "/Users/rony/Applications/ooRexx5.0.0" is the directory "make install"
> created and used.
>
> ---rony
>
>
>
>
> On Tue, Jan 8, 2019 at 1:21 PM Rony G. Flatscher <rony.flatsc...@wu.ac.at>
> wrote:
>
>> On 08.01.2019 19:15, Rony G. Flatscher wrote:
>>
>> While testing the standalone version on Linux, everything works out fine
>> if issuing "rexx".
>>
>> Should have also mentioned: if putting the directory where rexx resides
>> on to the path everything works as well.
>>
>> ---rony
>>
>>
>> However, if invoking "rexx" with a fully qualified path like:
>>
>> ~/some/path/to-standalone/bin/rexx -e "parse version v; say v"
>>
>> an error "Logic error: no startup image" is raised and ooRexx gets
>> aborted with a core dump. The libraries seem to be found.
>>
>> This is with r11665.
>>
>> ---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

Reply via email to