Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-16 Thread Martin Costabel
Chris Wolf wrote: [] It's interesting that you had a problem with this approach and python modules - I had a similar issue and ending up statically linking the module because I had two releases of the same shared library on the system. This is probably not a problem in cmake itself, but a prob

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-15 Thread Chris Wolf
On 8/13/10 1:12 PM, Martin Costabel wrote: > Chris Wolf wrote: > [] >> Have you actually built shared libraries on MacOS with CMake? If so, >> maybe an example >> of yours would be more helpful. > > The following settings work for me when building vtk5.6 for Fink: > > -DCMAKE_INSTALL_NAME_DI

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-15 Thread Chris Wolf
On 8/15/10 12:43 PM, Michael Wild wrote: > > On 15. Aug, 2010, at 13:22 , Chris Wolf wrote: > >> >> >> No, the two mechanisms are fundamentally different. On Linux the RPATH is a search path (think LD_LIBRARY_PATH) that is encoded into the binary. The linker only

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-15 Thread Michael Wild
On 15. Aug, 2010, at 13:22 , Chris Wolf wrote: > > > >>> >>> No, the two mechanisms are fundamentally different. >>> >>> On Linux the RPATH is a search path (think LD_LIBRARY_PATH) that is encoded >>> into the binary. The linker >>> only embeds the library name, no directory information. T

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-15 Thread David Cole
On Sun, Aug 15, 2010 at 1:25 AM, Chris Wolf wrote: > > > On 8/14/10 4:01 PM, Michael Wild wrote: > > > > On 14. Aug, 2010, at 18:26 , Chris Wolf wrote: > > > >> > >> > >> On 8/14/10 10:31 AM, Michael Wild wrote: > >>> > >>> On 14. Aug, 2010, at 15:13 , Chris Wolf wrote: > >>> > > >

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-14 Thread Chris Wolf
On 8/14/10 4:01 PM, Michael Wild wrote: > > On 14. Aug, 2010, at 18:26 , Chris Wolf wrote: > >> >> >> On 8/14/10 10:31 AM, Michael Wild wrote: >>> >>> On 14. Aug, 2010, at 15:13 , Chris Wolf wrote: >>> On 8/14/10 3:35 AM, Michael Wild wrote: > > On 13. Aug, 2010, at 20:58

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-14 Thread Michael Wild
On 14. Aug, 2010, at 18:26 , Chris Wolf wrote: > > > On 8/14/10 10:31 AM, Michael Wild wrote: >> >> On 14. Aug, 2010, at 15:13 , Chris Wolf wrote: >> >>> >>> >>> On 8/14/10 3:35 AM, Michael Wild wrote: On 13. Aug, 2010, at 20:58 , Michael Wild wrote: [...] > > Sure,

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-14 Thread Chris Wolf
On 8/14/10 10:31 AM, Michael Wild wrote: > > On 14. Aug, 2010, at 15:13 , Chris Wolf wrote: > >> >> >> On 8/14/10 3:35 AM, Michael Wild wrote: >>> >>> On 13. Aug, 2010, at 20:58 , Michael Wild wrote: >>> [...] Sure, http://repo.or.cz/w/freefoam.git/shortlog/refs/heads/pu, but it's >>

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-14 Thread Michael Wild
On 14. Aug, 2010, at 15:13 , Chris Wolf wrote: > > > On 8/14/10 3:35 AM, Michael Wild wrote: >> >> On 13. Aug, 2010, at 20:58 , Michael Wild wrote: >> [...] >>> >>> Sure, http://repo.or.cz/w/freefoam.git/shortlog/refs/heads/pu, but it's >>> pretty complex... >>> >>> Michael >> >> Attached

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-14 Thread Chris Wolf
On 8/14/10 3:35 AM, Michael Wild wrote: > > On 13. Aug, 2010, at 20:58 , Michael Wild wrote: > [...] >> >> Sure, http://repo.or.cz/w/freefoam.git/shortlog/refs/heads/pu, but it's >> pretty complex... >> >> Michael > > Attached is a tiny project which works for me on both Linux and Mac. > > Mi

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-14 Thread Michael Wild
On 13. Aug, 2010, at 20:58 , Michael Wild wrote: [...] > > Sure, http://repo.or.cz/w/freefoam.git/shortlog/refs/heads/pu, but it's > pretty complex... > > Michael Attached is a tiny project which works for me on both Linux and Mac. Michael greetings.tgz Description: Binary data ___

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-13 Thread Michael Wild
On 13.08.2010, at 18:33, Chris Wolf wrote: > > > On 8/13/10 11:21 AM, Michael Wild wrote: >> >> On 13. Aug, 2010, at 16:32 , Chris Wolf wrote: >> >>> >>> >>> On 8/13/10 10:23 AM, Chris Wolf wrote: On 8/13/10 9:29 AM, Michael Wild wrote: > > On 13. Aug, 2010, at

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-13 Thread Martin Costabel
Chris Wolf wrote: [] Have you actually built shared libraries on MacOS with CMake? If so, maybe an example of yours would be more helpful. The following settings work for me when building vtk5.6 for Fink: -DCMAKE_INSTALL_NAME_DIR:STRING=/sw/lib/vtk56 \ -DCMAKE_BUILD_WITH_INSTALL_RPATH:BO

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-13 Thread Chris Wolf
On 8/13/10 11:21 AM, Michael Wild wrote: > > On 13. Aug, 2010, at 16:32 , Chris Wolf wrote: > >> >> >> On 8/13/10 10:23 AM, Chris Wolf wrote: >>> >>> >>> On 8/13/10 9:29 AM, Michael Wild wrote: On 13. Aug, 2010, at 15:25 , Chris Wolf wrote: > > I have confirmed that the R

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-13 Thread Michael Wild
On 13. Aug, 2010, at 16:32 , Chris Wolf wrote: > > > On 8/13/10 10:23 AM, Chris Wolf wrote: >> >> >> On 8/13/10 9:29 AM, Michael Wild wrote: >>> >>> On 13. Aug, 2010, at 15:25 , Chris Wolf wrote: >>> I have confirmed that the RPATH handling, as documented here: http://

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-13 Thread Chris Wolf
On 8/13/10 10:23 AM, Chris Wolf wrote: > > > On 8/13/10 9:29 AM, Michael Wild wrote: >> >> On 13. Aug, 2010, at 15:25 , Chris Wolf wrote: >> >>> >>> I have confirmed that the RPATH handling, as documented here: >>> >>> http://www.cmake.org/Wiki/CMake_RPATH_handling >>> >>> Is only accurate for

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-13 Thread Chris Wolf
On 8/13/10 9:29 AM, Michael Wild wrote: > > On 13. Aug, 2010, at 15:25 , Chris Wolf wrote: > >> >> I have confirmed that the RPATH handling, as documented here: >> >> http://www.cmake.org/Wiki/CMake_RPATH_handling >> >> Is only accurate for the Linux case and *NOT* for MacOS. >> >> Here is th

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-13 Thread Michael Wild
On 13. Aug, 2010, at 15:25 , Chris Wolf wrote: > > I have confirmed that the RPATH handling, as documented here: > > http://www.cmake.org/Wiki/CMake_RPATH_handling > > Is only accurate for the Linux case and *NOT* for MacOS. > > Here is the summary of my findings: > > "Default RPATH": > ht

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-13 Thread Chris Wolf
I have confirmed that the RPATH handling, as documented here: http://www.cmake.org/Wiki/CMake_RPATH_handling Is only accurate for the Linux case and *NOT* for MacOS. Here is the summary of my findings: "Default RPATH": http://www.cmake.org/Wiki/CMake_RPATH_handling#Default_RPATH_settings li

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-13 Thread Chris Wolf
On 8/13/10 3:47 AM, Michael Wild wrote: > > On 12. Aug, 2010, at 22:37 , Chris Wolf wrote: > >> I have a project which creates a shared library and a utility which uses this >> shared library. I would like to be able to run the utility within the build >> tree and also from the final install d

Re: [CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-13 Thread Michael Wild
On 12. Aug, 2010, at 22:37 , Chris Wolf wrote: > I have a project which creates a shared library and a utility which uses this > shared library. I would like to be able to run the utility within the build > tree and also from the final install directory. I can do this, it works, > but the path

[CMake] Weirdness with shared library, RPATH policy on MacOS

2010-08-12 Thread Chris Wolf
I have a project which creates a shared library and a utility which uses this shared library. I would like to be able to run the utility within the build tree and also from the final install directory. I can do this, it works, but the path hard-coded path in the executable is always the build tre