You received this message because you are subscribed to a topic in the Google Groups "deal.II User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dealii/NsniOXPvOyo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dealii+un...@googlegroups.com.
Thanks. I will try the 8.3 version.
It is working fine for me…
Can you try installing the old cmake? 2.8.12 works on my system.
echo "*******"
echo `pwd`
echo DYLD_LIBRARY_PATH = "${DYLD_LIBRARY_PATH}"
echo LD_LIBRARY_PATH = ${LD_LIBRARY_PATH}
echo PATH = ${PATH}
echo USER = ${USER}
echo "*******"
*******
/Users/qiaol/devel/dealii/examples/step-33
DYLD_LIBRARY_PATH =
LD_LIBRARY_PATH =
PATH = /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin:/Users/qiaol/.bin:/Applications/Gmsh.app/Contents/MacOS:/Users/qiaol/Library/astyle:/Users/qiaol/Library/openmpi/bin:/Users/qiaol/Library/cgnslib/bin
USER = qiaol
*******
I never turned off SIP before, though.
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${DEST_LIB}")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${DEST_LIB}" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${DEST_LIB}")
endif()
endif()
1b. Libraries were explicitly specified as shared (I'm not sure whether this is actually necessary)
ADD_LIBRARY(${TARGETLIB_FEM} SHARED
... <source files>...
)
2. When installing a build executable, I had to instruct CMake to set/reset the rpath once its copied to its final destination:
# Installation path
INSTALL(
TARGETS ${TARGET}
DESTINATION ${CMAKE_SOURCE_DIR}/bin
)
# Substitute @rpath for library path
if(APPLE)
# if the install RPATH is not provided, the install ${TARGET} will have none
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES INSTALL_RPATH ${LIBFEM_MP_LIBRARY})
ENDIF()
The desired result is that when one runs
otool -l <file> | grep LC_RPATH -A2
on both the originally built and installed executables, a non-null result is returned.
I hope that this may be of some use to you.
J-P
I’d suggest NOT to turn SIP off…
I’m looking for a definitive solution, which should be to run a scripts that sets correctly all library paths before distributing the package, adding manually @rpath to each library, and then reconfiguring deal.II to use @rpath…
We definitely need a change in deal.II. At the moment rpath support on OS X is broken in the building of the deal.II library, therefore all applications built with the CMake scripts included in the library are broken, because they rely on DYLD_LIBRARY_PATH being set.
For some obscure reasons which I could not pin down, on my system DYLD_LIBRARY_PATH is still used, and so I don’t need to turn off SIP. Turning off SIP is a really bad idea…
What is necessary is to configure or change all libraries in the package to use @rpath, and correctly instruct deal.II to build with @rpath on on mac os x.
This is the clean solution, which would also remove the necessity to use any type of script to launch deal.II, and would also allow one to move the library around, by simply renaming the app.
I’m working on it.
--