[Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-02 Thread René Jansen
I finally took the time to read up on the dynamic linker on macOS. Linking the dylibs into /usr/local/lib is not the solution. (And it requires sudo/root, which we should not need for a local, portable installation.) This https://matthew-brett.github.io/docosx/mac_runtime_link.html

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-02 Thread Rick McGuire
On Wed, Jan 2, 2019 at 4:15 PM René Jansen wrote: > I finally took the time to read up on the dynamic linker on macOS. Linking > the dylibs into /usr/local/lib is not the solution. (And it requires > sudo/root, which we should not need for a local, portable installation.) > This https://matthew-b

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-02 Thread P.O. Jonsson
Dear all, please hold your horses! I have also been busy with the ooRexx installatier for MAC the last few days and I have a MUCH more positive view on it all! First of all I made a pristine installation (with a swiped disk) of the latest os, macOS Mojave, macOS 10.14.2 (18C54), Darwin 18.2.0,

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-02 Thread P.O. Jonsson
A small remark: Erich has found out that the dyld stuff will not work since it is not inherited. A rexx program calling another rexx program (example: test cases) fail. He can put it in more technical terms I am sure, but my take on it is that this is a dead end on Darwin/macOS Hälsningar/Rega

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-02 Thread René Jansen
Hi P.O., what Erich meant is that for some time now the *environment variable* containing the dyld library path is not inherited in subshells. We have to use dyld as that is the way shared libraries on macOS work. We have to work at making sure this environment variable is not needed anymore -

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-02 Thread Enrico Sorichetti via Oorexx-devel
The discussion about the libraries is getting more and more confusing … With these settings all works fine for me without bothering To export DYLD_LIBRARY_PATH or LD_LIBRARY_PATH # do not skip the full RPATH for the build tree SET( CMAKE_SKIP_BUILD_RPATH FALSE) # when building, don't use the

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-02 Thread P.O. Jonsson
Hälsningar/Regards/Grüsse, P.O. Jonsson oor...@jonases.se > Am 02.01.2019 um 23:13 schrieb René Jansen : > > Hi P.O., > > what Erich meant is that for some time now the *environment variable* > containing the dyld library path is not inherited in subshells. We have to > use dyld as that is

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-02 Thread P.O. Jonsson
Dear Enrico, I think you are saying the same as me - we do not need the dyld stuff for ooRexx to work, right? In my case I made no amendments to the existing CMakelist.txt, it worked out of the box. I will make an install to /opt today. Hälsningar/Regards/Grüsse, P.O. Jonsson oor...@jonases.s

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread René Jansen
I think we all say the same - we want it to work. So to make sure that it works (it is so easy to be fooled by older versions or settings you have forgotten) can we do this: 1) echo $PATH 2) echo $DYLD_LIBRARY_PATH 3) echo LD_LIBRARY_PATH 4) run otool -L on the rexx executable and all libraries,

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread René Jansen
> On 3 Jan 2019, at 12:07, René Jansen wrote: > > 3) echo LD_LIBRARY_PATH 3) echo $LD_LIBRARY_PATH And one update: to my great astonishment, I cannot make a directory in ~/Applications either (without sudo) - when I assumed that everything in my home directory belongs to my userid. Strange.

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread Enrico Sorichetti via Oorexx-devel
Seems strange … ~/Applications is not provided by APPLE So it carries the privileges You had when You created it, Pretty easy to chown and chmod E > On 3 Jan 2019, at 17:18, René Jansen wrote: > > And one update: to my great astonishment, I cannot make a directory in > ~/Applications either

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread Enrico Sorichetti via Oorexx-devel
I does not make any difference … As long as the RPATH is properly defined As an absolute path pointing to the directory Or as a relative path, specified as @executable_path/../lib ( my preferred way ) I just ran the test suite rexx testOORexx.rex -s -X native_API Tests ran: 22523

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread René Jansen
yes, true. The only thing in it was ooRexx, so the sudo make install must have done that. Thanks. René. > On 3 Jan 2019, at 12:21, Enrico Sorichetti via Oorexx-devel > wrote: > > Seems strange … > ~/Applications is not provided by APPLE > So it carries the privileges You had when You created

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread René Jansen
Enrico, are all your cmake changes checked in to 11657, trunk? René > On 3 Jan 2019, at 12:23, Enrico Sorichetti via Oorexx-devel > wrote: > > I does not make any difference … > As long as the RPATH is properly defined > > As an absolute path pointing to the directory > > Or as a relativ

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread Enrico Sorichetti via Oorexx-devel
> On 3 Jan 2019, at 17:26, René Jansen wrote: > > are all your cmake changes checked in to 11657, trunk? No… I use a slimmed cmakelists Wrote a cmake unifdef to get rid of all the stuff irrelevant to my environment But You can use the mods I posted to make the appropriate changes to the

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread René Jansen
I built with: cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/opt/ooRexx5.0.0 and had to install with sudo make install. otool -l (small el) gives all the libraries that need to be loaded, and the @rpath: ➜ bin otool -l rexx rexx: Mach header magic cputype cpusubtype capsf

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread Enrico Sorichetti via Oorexx-devel
Oops my bad, I forgot to tell that I changed all my CMakeLists to use cmake_minimum_required( VERSION 3.12 ) And with that CMAKE provides the proper RPATH handling Without specifying anything , I just run otool -l rexx And all the rexx libraries are prefixed with the @rpath construct Snip

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread P.O. Jonsson
Dear René, It is exactly to avoid the problem with changes you have forgotten that I completely ERASED the disk before installing a pristine version of macOS Mojave; there are several directories that are simply not there (/opt and ~/Applications are two of them) when the installation is fresh.

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread René Jansen
ah good, that is a rather important result. I am (was) running cmake 3.9.4. I’ll try to build 3.12 and/or patch the libraries; it might even fix the librexxutil problem. I prefer this email, rvjan...@xs4all.nl Molto grazie Enrico, René. > On 3 Jan 2019, at 13:20, E

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread René Jansen
Yes, there you might have a point, but the plan is to have the rpath set correctly and relative to load_path. I’ll be back when I have Enrico’s changes and a new cmake. What is your cmake level? That should explain a lot. best regards, René. > On 3 Jan 2019, at 13:21, P.O. Jonsson wrote: > >

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-03 Thread Enrico Sorichetti via Oorexx-devel
Unlike other systems where CMAKE is installed thru the system package manager On APPLE it has to be installed by the user and most likely the user will install the latest release I have been a bit conservative when I talked about 3.12 , I just checked and the download section of cmake pro

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-04 Thread P.O. Jonsson
What about this statement that I have seen in some installers, is it still necessary/valid=? export NLSPATH=$REXXPATH/bin/rexx.cat:$NLSPATH REXXPATH is the path to the installation, i.e. ~/Applications/ooRexx5.0.0 Hälsningar/Regards/Grüsse, P.O. Jonsson oor...@jonases.se > Am 03.01.2019 um

Re: [Oorexx-devel] dynamic linking on macOS (was: Re: A few questions ad CMake and libraries on Unix)

2019-01-04 Thread Rony G. Flatscher
Dear P.O.: On 04.01.2019 14:26, P.O. Jonsson wrote: > What about this statement that I have seen in some installers, is it still > necessary/valid=? > > export NLSPATH=$REXXPATH/bin/rexx.cat:$NLSPATH No, this has been fixed in the meantime. ---rony