Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread CV Bruce
Thank you Tony and Enrico, this was something I was never able to get across.

Bruce
> On Jan 8, 2019, at 8:17 AM, Rony G. Flatscher  wrote:
> 
> Dear P.O.,
> 
> On 08.01.2019 16:24, P.O. Jonsson wrote:
>> I am not taking about the future, it is working NOW, without any 
>> modification besides the /bin
>> being in the path. NO NADA NIX modifications it works out of the box. Try it.
> 
> I believe you. :)
> 
>> A relocatable installation is desirable for other reasons, such as for 
>> creating an automated build
>> to ~/Applications, this is NOT possible today.
> 
> With Enricos definitions this has become possible. Just tested it a few 
> minutes ago successfully on
> MacOSX: moved the directories in ~/Applications/ooRexx.5.0.0 to ~/oha2/test 
> and successfully ran
> ooRexx from ~/oha2/test/bin and all of the sample programs there as well.
> 
> Cheers,
> 
> ---royn
> 
> 
> 
> 
> ___
> 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


Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread P.O. Jonsson

Hälsningar/Regards/Grüsse,
P.O. Jonsson
oor...@jonases.se




> Am 08.01.2019 um 17:17 schrieb Rony G. Flatscher :
> 
> Dear P.O.,
> 
> On 08.01.2019 16:24, P.O. Jonsson wrote:
>> I am not taking about the future, it is working NOW, without any 
>> modification besides the /bin
>> being in the path. NO NADA NIX modifications it works out of the box. Try it.
> 
> I believe you. :)
> 
>> A relocatable installation is desirable for other reasons, such as for 
>> creating an automated build
>> to ~/Applications, this is NOT possible today.
> 
> With Enricos definitions this has become possible. Just tested it a few 
> minutes ago successfully on
> MacOSX: moved the directories in ~/Applications/ooRexx.5.0.0 to ~/oha2/test 
> and successfully ran
> ooRexx from ~/oha2/test/bin and all of the sample programs there as well.

That is GREAT, will try it tomorrow.
> 
> Cheers,
> 
> ---royn
> 
> 
> 
> 
> ___
> 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


Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread Rony G. Flatscher
Dear P.O.,

On 08.01.2019 16:24, P.O. Jonsson wrote:
> I am not taking about the future, it is working NOW, without any modification 
> besides the /bin
> being in the path. NO NADA NIX modifications it works out of the box. Try it.

I believe you. :)

> A relocatable installation is desirable for other reasons, such as for 
> creating an automated build
> to ~/Applications, this is NOT possible today.

With Enricos definitions this has become possible. Just tested it a few minutes 
ago successfully on
MacOSX: moved the directories in ~/Applications/ooRexx.5.0.0 to ~/oha2/test and 
successfully ran
ooRexx from ~/oha2/test/bin and all of the sample programs there as well.

Cheers,

---royn




___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread P.O. Jonsson
Dear Rony,

I am not taking about the future, it is working NOW, without any modification 
besides the /bin being in the path. NO NADA NIX modifications it works out of 
the box. Try it.

A relocatable installation is desirable for other reasons, such as for creating 
an automated build to ~/Applications, this is NOT possible today.

Hälsningar/Regards/Grüsse,
P.O. Jonsson
oor...@jonases.se



> Am 08.01.2019 um 16:19 schrieb Rony G. Flatscher :
> 
> Dear P.O.,
> 
> On 08.01.2019 16:16, P.O. Jonsson wrote:
>> For MAC at least a build to a USB stick is relocatable to another computer 
>> since the name of the
>> stick will be the name of the volume, automatically mounted to /Volumes
> 
> with RPATH defined the way Enrico suggests, there is no need to link/copy the 
> libraries to any
> special place, they will be located by the system relative to the place where 
> the "rexx" executable
> resides. Therefore the binaries (if moved with the lib directory) are fully 
> relocatable.
> 
> Best regards
> 
> ---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


Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread Rony G. Flatscher
Dear P.O.,

On 08.01.2019 16:16, P.O. Jonsson wrote:
> For MAC at least a build to a USB stick is relocatable to another computer 
> since the name of the
> stick will be the name of the volume, automatically mounted to /Volumes

with RPATH defined the way Enrico suggests, there is no need to link/copy the 
libraries to any
special place, they will be located by the system relative to the place where 
the "rexx" executable
resides. Therefore the binaries (if moved with the lib directory) are fully 
relocatable.

Best regards

---rony



___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread Rony G. Flatscher
Dear Enrico:

On 08.01.2019 16:11, Enrico Sorichetti via Oorexx-devel wrote:
> I wonder why everybody refuses to use the proper constructs for the RPATH
> Looks like I am wasting my time testing and making suggestions

please bear with us!

Not having *any* background knowledge of CMake and the usage of RPATH, it 
sometimes takes a second
or third push!

Also, I have noticed your posted CMake program which would display all set 
CMake variables and meant
to ask how to use it! Something that probably goes without saying for yourself, 
being obviously a
CMake master/expert/power user, but something that needs experiments/research 
from this side of a
total CMake amateur (who unfortunately does not have time at the moment to 
really go through
tutorials and background literature/sources to get acquainted with it). In the 
meantime I have been
carried away from testing it (with a popped up problem with BSF4ooRexx and 
OpenOffice/LibreOffice on
MacOSX that in the meantime got solved, after quite some efforts and two day's 
of work), but would
like to do that in any case as it would allow me to get a rough idea of what 
CMake variables are set
and used for a build.

Cheers,

---rony



___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread P.O. Jonsson
For MAC at least a build to a USB stick is relocatable to another computer 
since the name of the stick will be the name of the volume, automatically 
mounted to /Volumes

There is a USB standalone version for testing here 


Hälsningar/Regards/Grüsse,
P.O. Jonsson
oor...@jonases.se



> Am 08.01.2019 um 15:46 schrieb Rony G. Flatscher :
> 
> Would it be possible to define RPATH such, that it always looks in the 
> directories ".", "./lib",
> "../lib", "/usr/local/lib" (maybe even "/opt/local/lib") for the needed 
> libraries?
> 
> This way a USB-stick version may have the executables in the same directory 
> or lib in a companion or
> subdirectory.
> 
> Currently, after a "make install" one cannot relocate the resulting binaries. 
> Using the binaries
> from the "make" step forces one to have "lib" in a sibling directory.
> 
> Probably with the help of
>  
> this could be solvable.
> Alternatively, if one has XCode installed, one might use "install_name_tool" 
> to manipulate all rpath
> definitions. Another alternative would be to set DYLD_LIBRARY_PATH.
> 
> What do you think, which solution would be preferable?
> 
> ---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


Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread Rony G. Flatscher
On 08.01.2019 15:52, Enrico Sorichetti via Oorexx-devel wrote:
> Right now You cannot relocate the installed thing 
> Because the rpath is an absolute one 
> I posted a few emails back the right constructs …

Hmm saw them, but was not sure what they were about and whether that was all 
that was needed (being
totally unfamiliar with RPATH)! :(

> Here they are again
>
> 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 install RPATH 
> # only later on when installing 
> SET( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
>
> if( APPLE )
>     SET( CMAKE_INSTALL_RPATH "@executable_path/../lib")
> else()
>     SET( CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
> endif()
>
> # add the automatically determined parts of the RPATH
> # which point to directories outside the build tree to the install RPATH
> SET( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

Is it correct to state in this case that the executable's libraries then get 
automatically searched
in the sibling "lib" directory?

> Without the RPATH setting the exports are required 
>
> ( tested on El Capitan, high Sierra, Mojave and Fedora 29 )

This is great, thank you very much indeed (also for your patience! :) ), will 
try it out on both
MacOSX and Linux!

>
> Why would anybody set multiple paths ???

Well, in Windows the libraries are usually on the PATH and hence a standalone 
("stick") version of
ooRexx on Windows might have the dlls in the same directory as ooRexx. Even 
though Windows should
not serve as the role model for Unix, nevertheless such layouts or solutions 
might be attempted
(easier understandable) for users (not developers).

People coming from Windows might therefore intend to place the shared libraries 
on Unix into the
executable directory as well or move "lib" to become local to the executable 
directory (this way a
subdirectory "oorexx" would point to the ooRexx executable and include all 
necessary files directly
there, including the libraries or the "lib" directory).

How would one add multiple RPATHs with CMake? Would just adding another 
directory to the path rpath
with a colon be correct, something like:

if( APPLE )
    SET( CMAKE_INSTALL_RPATH "@executable_path/../lib:@executable_path/.")
else()
    SET( CMAKE_INSTALL_RPATH "$ORIGIN/../lib:$ORIGIN/.")
endif()

Will test it, after first testing your "@executable_path/../lib"  definition.

Again, thank you very much, Enrico!

---rony






___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread Enrico Sorichetti via Oorexx-devel
I wonder why everybody refuses to use the proper constructs for the RPATH
Looks like I am wasting my time testing and making suggestions 
E

> On 8 Jan 2019, at 16:08, P.O. Jonsson  wrote:
> 
> With this convention - would it be possible to make the executables 
> relocatable?

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread P.O. Jonsson
Dear all,

I think there might be another way of solving this problem. If you symlink all 
libraries in /lib back to /bin it will look as if the libraries are in the same 
place as the executable ( in „." basically), so one could rely on that always 
being the case.

During a time when my build did not create the /lib properly all files resided 
in /bin. I could run all test cases using that configuration with no problems.

With this convention - would it be possible to make the executables relocatable?

Hälsningar/Regards/Grüsse,
P.O. Jonsson
oor...@jonases.se



> Am 08.01.2019 um 15:46 schrieb Rony G. Flatscher :
> 
> Would it be possible to define RPATH such, that it always looks in the 
> directories ".", "./lib",
> "../lib", "/usr/local/lib" (maybe even "/opt/local/lib") for the needed 
> libraries?
> 
> This way a USB-stick version may have the executables in the same directory 
> or lib in a companion or
> subdirectory.
> 
> Currently, after a "make install" one cannot relocate the resulting binaries. 
> Using the binaries
> from the "make" step forces one to have "lib" in a sibling directory.
> 
> Probably with the help of
>  
> this could be solvable.
> Alternatively, if one has XCode installed, one might use "install_name_tool" 
> to manipulate all rpath
> definitions. Another alternative would be to set DYLD_LIBRARY_PATH.
> 
> What do you think, which solution would be preferable?
> 
> ---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


Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread Enrico Sorichetti via Oorexx-devel
Right now You cannot relocate the installed thing 
Because the rpath is an absolute one 
I posted a few emails back the right constructs …

Here they are again

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 install RPATH 
# only later on when installing 
SET( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)

if( APPLE )
SET( CMAKE_INSTALL_RPATH "@executable_path/../lib")
else()
SET( CMAKE_INSTALL_RPATH "$ORIGIN/../lib")
endif()

# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)

Without the RPATH setting the exports are required 

( tested on El Capitan, high Sierra, Mojave and Fedora 29 )

Why would anybody set multiple paths ???

If things have been done properly no need.

Cheers
Enrico

> On 8 Jan 2019, at 15:46, Rony G. Flatscher  wrote:
> 
> Would it be possible to define RPATH such, that it always looks in the 
> directories ".", "./lib",
> "../lib", "/usr/local/lib" (maybe even "/opt/local/lib") for the needed 
> libraries?

___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread René Jansen
yes, I think I read that it is possible to define multiple rpaths with 
install_name_tool

> On 8 Jan 2019, at 10:46, Rony G. Flatscher  wrote:
> 
> Would it be possible to define RPATH such, that it always looks in the 
> directories ".", "./lib",
> "../lib", "/usr/local/lib" (maybe even "/opt/local/lib") for the needed 
> libraries?
> 
> This way a USB-stick version may have the executables in the same directory 
> or lib in a companion or
> subdirectory.
> 
> Currently, after a "make install" one cannot relocate the resulting binaries. 
> Using the binaries
> from the "make" step forces one to have "lib" in a sibling directory.
> 
> Probably with the help of
>  
> this could be solvable.
> Alternatively, if one has XCode installed, one might use "install_name_tool" 
> to manipulate all rpath
> definitions. Another alternative would be to set DYLD_LIBRARY_PATH.
> 
> What do you think, which solution would be preferable?
> 
> ---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


[Oorexx-devel] Question ad RPATH and MacOSX

2019-01-08 Thread Rony G. Flatscher
Would it be possible to define RPATH such, that it always looks in the 
directories ".", "./lib",
"../lib", "/usr/local/lib" (maybe even "/opt/local/lib") for the needed 
libraries?

This way a USB-stick version may have the executables in the same directory or 
lib in a companion or
subdirectory.

Currently, after a "make install" one cannot relocate the resulting binaries. 
Using the binaries
from the "make" step forces one to have "lib" in a sibling directory.

Probably with the help of
 
this could be solvable.
Alternatively, if one has XCode installed, one might use "install_name_tool" to 
manipulate all rpath
definitions. Another alternative would be to set DYLD_LIBRARY_PATH.

What do you think, which solution would be preferable?

---rony




___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel