Different settings of CMAKE_INSTALL_NAME_DIR & CMAKE_INSTALL_LIBDIR => broken libraries
Mojca Miklavec
mojca at macports.org
Fri Mar 25 18:08:13 PDT 2016
Hi,
In Geant4 I'm using
-DCMAKE_INSTALL_LIBDIR=${prefix}/lib/Geant4/Geant${version}
to allow side-by-side installation of multiple versions of the software.
However the latest release broke the behaviour and the libraries now
point to a different path than where they are installed:
> otool -L /opt/local/lib/Geant4/Geant4.10.2/libG4FR.dylib
/opt/local/lib/Geant4/Geant4.10.2/libG4FR.dylib:
/opt/local/lib/libG4FR.dylib
[...]
According to
http://bugzilla-geant4.kek.jp/show_bug.cgi?id=1848
this might be a side effect of
-DCMAKE_INSTALL_NAME_DIR=/opt/local/lib
which is automatically added by the cmake PortGroup.
I will do some further testing, but I would be interested in some
deeper insight into how the system is *supposed to* work. The CMake
documentation is not too verbose:
https://cmake.org/cmake/help/v3.5/variable/CMAKE_INSTALL_NAME_DIR.html
https://cmake.org/cmake/help/v3.5/module/GNUInstallDirs.html
(I cannot really decide whose fault the broken libraries are. I can
imagine that I will have to remove or fix the
-DCMAKE_INSTALL_NAME_DIR=... setting, but if there is something that
could/should be improved in Geant4 for better
support, I would like to know.)
Thank you,
Mojca
More information about the macports-dev
mailing list