http://bugs.orocos.org/show_bug.cgi?id=867
Summary: Dynamic library dependancies not satisfied on Mac OS X
Product: RTT
Version: rtt-trunk
Platform: All
OS/Version: Mac OS X
Status: NEW
Severity: major
Priority: P3
Component: Build System
AssignedTo: orocos-dev [..] ...
ReportedBy: kiwi [dot] net [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0
Created attachment 694
--> http://bugs.orocos.org/attachment.cgi?id=694
Test case to load RTT marshalling dynamic library
Dependant dynamic library paths not set on Mac OS X, and so these libraries
aren't loaded as necessary at runtime.
On Linux
~/tmp/dl Opening '/opt/sw/orocos/toolchain-next/build/rtt/../../install//lib/orocos/gnulinux/./plugins/librtt-marshalling-gnulinux.so' open OK
but on Mac OS X
~/tmp/dl Opening '/opt/sw/orocos/toolchain-next/build/rtt/../../install//lib/orocos/macosx/./plugins/librtt-marshalling-macosx.dylib' open FAILED: dlopen(/opt/sw/orocos/toolchain-next/build/rtt/../../install//lib/orocos/macosx/./plugins/librtt-marshalling-macosx.dylib, 10): Library not loaded: liborocos-rtt-macosx.2.4.dylib Referenced from: /opt/sw/orocos/toolchain-next/build/rtt/../../install//lib/orocos/macosx/./plugins/librtt-marshalling-macosx.dylib Reason: image not found
Examining dynamic library dependancies on Linux (where full paths are correctly
set)
# BUILD TREE ldd rtt/marsh/librtt-marshalling-gnulinux.so linux-gate.so.1 => (0x004b9000) liborocos-rtt-gnulinux.so.2.4 => /opt/sw/orocos/toolchain-next/build/rtt/rtt/liborocos-rtt-gnulinux.so.2.4 (0x004ba000) libboost_filesystem.so.1.40.0 => /usr/lib/libboost_filesystem.so.1.40.0 (0x00110000) libboost_system.so.1.40.0 => /usr/lib/libboost_system.so.1.40.0 (0x0022d000) libboost_serialization.so.1.40.0 => /usr/lib/libboost_serialization.so.1.40.0 (0x00ef0000) libxerces-c.so.28 => /usr/lib/libxerces-c.so.28 (0x009dd000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00124000) librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x0013d000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x00146000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00891000) libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x0014a000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00170000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00d92000) libicuuc.so.42 => /usr/lib/libicuuc.so.42 (0x00f5c000) libicudata.so.42 => /usr/lib/libicudata.so.42 (0xb6917000) /lib/ld-linux.so.2 (0x009c0000) # INSTALL LOCATION ldd /opt/sw/orocos/toolchain-next/build/rtt/../../install/lib/orocos/gnulinux/plugins/librtt-marshalling-gnulinux.so.2.4.0 linux-gate.so.1 => (0x00cf4000) liborocos-rtt-gnulinux.so.2.4 => /opt/sw/orocos/toolchain-next/build/rtt/../../install/lib/liborocos-rtt-gnulinux.so.2.4 (0x006e6000) libboost_filesystem.so.1.40.0 => /usr/lib/libboost_filesystem.so.1.40.0 (0x00aed000) libboost_system.so.1.40.0 => /usr/lib/libboost_system.so.1.40.0 (0x00110000) libboost_serialization.so.1.40.0 => /usr/lib/libboost_serialization.so.1.40.0 (0x00b38000) libxerces-c.so.28 => /usr/lib/libxerces-c.so.28 (0x002ff000) libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x00115000) librt.so.1 => /lib/tls/i686/cmov/librt.so.1 (0x00ccb000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x0012e000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00ba4000) libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x00132000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00158000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x00cf5000) libicuuc.so.42 => /usr/lib/libicuuc.so.42 (0x00e4f000) libicudata.so.42 => /usr/lib/libicudata.so.42 (0xb68a2000) /lib/ld-linux.so.2 (0x001ae000)
and on Mac OS X (with paths not set for dependant library) (NB otool is the
equivalent of ldd)
# BUILD TREE otool -L rtt/marsh/librtt-marshalling-macosx.dylib rtt/marsh/librtt-marshalling-macosx.dylib: /opt/sw/orocos/toolchain-next/build/rtt/rtt/marsh/librtt-marshalling-macosx.2.4.0.dylib (compatibility version 0.0.0, current version 2.4.0) /opt/sw/orocos/toolchain-next/build/rtt/rtt/liborocos-rtt-macosx.2.4.dylib (compatibility version 2.4.0, current version 2.4.0) /opt/local/lib/libboost_filesystem-mt-d.dylib (compatibility version 0.0.0, current version 0.0.0) /opt/local/lib/libboost_system-mt-d.dylib (compatibility version 0.0.0, current version 0.0.0) /opt/local/lib/libboost_serialization-mt-d.dylib (compatibility version 0.0.0, current version 0.0.0) /opt/local/lib/libxerces-c.28.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10) /opt/local/lib/libboost_thread-mt-d.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0) # INSTALL LOCATION otool -L /opt/sw/orocos/toolchain-next/build/rtt/../../install/lib/orocos/macosx/plugins/librtt-marshalling-macosx.2.4.0.dylib /opt/sw/orocos/toolchain-next/build/rtt/../../install/lib/orocos/macosx/plugins/librtt-marshalling-macosx.2.4.0.dylib: librtt-marshalling-macosx.2.4.0.dylib (compatibility version 0.0.0, current version 2.4.0) liborocos-rtt-macosx.2.4.dylib (compatibility version 2.4.0, current version 2.4.0) /opt/local/lib/libboost_filesystem-mt-d.dylib (compatibility version 0.0.0, current version 0.0.0) /opt/local/lib/libboost_system-mt-d.dylib (compatibility version 0.0.0, current version 0.0.0) /opt/local/lib/libboost_serialization-mt-d.dylib (compatibility version 0.0.0, current version 0.0.0) /opt/local/lib/libxerces-c.28.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10) /opt/local/lib/libboost_thread-mt-d.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
[Bug 867] Dynamic library dependancies not satisfied on Mac OS X
http://bugs.orocos.org/show_bug.cgi?id=867
Peter Soetens <peter [..] ...> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #4 from Peter Soetens <peter [..] ...> 2011-06-15 17:56:35 CEST ---
(In reply to comment #2)
> I wonder whether we should refactor the ADD_LIBRARY() calls like we do for
> plugins and typekits?
>
> This block is repeated in a number of places, and looks like it could become a
> macro.
>
I've applied your patch to toolchain-2.4. I know there is repetition in the rtt
cmake lists, but the main cleanup to do is to remove the 'static' versions of
the build targets.
Peter
[Bug 867] Dynamic library dependancies not satisfied on Mac OS X
http://bugs.orocos.org/show_bug.cgi?id=867
Peter Soetens <peter [..] ...> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|Build System |RTT
Version|rtt-trunk |master
Product|RTT |Toolchain
--- Comment #3 from Peter Soetens <peter [..] ...> 2011-06-01 09:25:06 CEST ---
Moved bug to correct product.
[Bug 867] Dynamic library dependancies not satisfied on Mac OS X
http://bugs.orocos.org/show_bug.cgi?id=867
--- Comment #2 from S Roderick <kiwi [dot] net [..] ...> 2011-05-29 15:18:07 CEST ---
I wonder whether we should refactor the ADD_LIBRARY() calls like we do for
plugins and typekits?
This block is repeated in a number of places, and looks like it could become a
macro.
[Bug 867] Dynamic library dependancies not satisfied on Mac OS X
http://bugs.orocos.org/show_bug.cgi?id=867
--- Comment #1 from S Roderick <kiwi [dot] net [..] ...> 2011-05-29 15:15:37 CEST ---
Created attachment 695
--> http://bugs.orocos.org/attachment.cgi?id=695
Force CMake to fully specify dynamic library path
Known problem
http://www.cmake.org/pipermail/cmake/2007-October/017184.html
With attached patch, on Linux (Ubuntu Lucid)
and on Mac OS X the paths are now fully specified
NB with the patch the tests still don't pass, but now plugins and types are
loaded ...