{"action":"created","issue":{"url":"https://api.github.com/repos/SeisComP3/seiscomp3/issues/42","repository_url":"https://api.github.com/repos/SeisComP3/seiscomp3","labels_url":"https://api.github.com/repos/SeisComP3/seiscomp3/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/SeisComP3/seiscomp3/issues/42/comments","events_url":"https://api.github.com/repos/SeisComP3/seiscomp3/issues/42/events","html_url":"https://github.com/SeisComP3/seiscomp3/issues/42","id":125627584,"number":42,"title":"seiscomp3 on Mac OS X 10.11 libspread rpath issue","user":{"login":"gilcel","id":9282533,"avatar_url":"https://avatars.githubusercontent.com/u/9282533?v=3","gravatar_id":"","url":"https://api.github.com/users/gilcel","html_url":"https://github.com/gilcel","followers_url":"https://api.github.com/users/gilcel/followers","following_url":"https://api.github.com/users/gilcel/following{/other_user}","gists_url":"https://api.github.com/users/gilcel/gists{/gist_id}","starred_url":"https://api.github.com/users/gilcel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilcel/subscriptions","organizations_url":"https://api.github.com/users/gilcel/orgs","repos_url":"https://api.github.com/users/gilcel/repos","events_url":"https://api.github.com/users/gilcel/events{/privacy}","received_events_url":"https://api.github.com/users/gilcel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-01-08T15:01:26Z","updated_at":"2016-02-03T15:40:25Z","closed_at":null,"body":"Hi,\r\n\r\nI've succesfully compiled seiscomp3 jakarta 2015.149 on OS X 10.11 El-Capitan with Xcode 7.2.\r\nThe GUI starts etc. and the binaries and libs are installed in /usr/local/\r\n\r\nFor the root CMakeLists.txt I had to set the \"rpath\" to compile succesfully the libraries in src/trunk//libs/3rd-party/\r\n`set(CMAKE_MACOSX_RPATH 1)`\r\n\r\nHowever I can't figure out how to set \"rpath\" to the 3rd-party lib: spread 4.3.0.\r\nI tried to built with static libraries only (by editing CMakeLists.txt in src/trunk/libs/seiscomp3/\r\nbut no succes.\r\n\r\nWhen I start 'seiscomp status' I get the following error:\r\n\r\n```\r\n#seiscomp status\r\nerror: /usr/local/etc/init/arclink.py: dlopen(/usr/local/lib/python/seiscomp3/_Client.so, 2): Library not  loaded: libtspread-core.3.dylib\r\nReferenced from: /usr/local/lib/python/seiscomp3/_Client.so\r\n  Reason: unsafe use of relative rpath libtspread-core.3.dylib in /usr/local/lib/python/seiscomp3/_Client.so with restricted binary\r\nerror: /usr/local/etc/init/trunk.py: dlopen(/usr/local/lib/python/seiscomp3/_Client.so, 2): Library not loaded: libtspread-core.3.dylib\r\n  Referenced from: /usr/local/lib/python/seiscomp3/_Client.so\r\n  Reason: unsafe use of relative rpath libtspread-core.3.dylib in /usr/local/lib/python/seiscomp3/_Client.so with restricted binary\r\nspread               is not running\r\nscmaster             is not running\r\n....\r\n```\r\nSo /usr/local/lib/python/seiscomp3/_Client.so has a problem loading libtspread-core.3.dylib\r\nEven if copy src/trunk/libs/3rd-party/spread/libspread/libspread* to /usr/local/lib/python/seiscomp3/\r\n\r\nHere's the list of src/trunk/libs/3rd-party/spread/libspread/\r\n```\r\n ls -l src/trunk/libs/3rd-party/spread/libspread/libspread*\r\n-rwxr-xr-x  1 seiscomp  staff   62140 Jan  8 15:41 src/trunk/libs/3rd-party/spread/libspread/libspread-core.3.0.0.dylib\r\n-rw-r--r--  1 seiscomp  staff  160920 Jan  8 15:41 src/trunk/libs/3rd-party/spread/libspread/libspread-core.a\r\nlrwxr-xr-x  1 seiscomp  staff      26 Jan  8 15:41 src/trunk/libs/3rd-party/spread/libspread/libspread-core.dylib -> libspread-core.3.0.0.dylib\r\n-rwxr-xr-x  1 seiscomp  staff  154172 Jan  8 15:41 src/trunk/libs/3rd-party/spread/libspread/libspread.3.0.0.dylib\r\n-rw-r--r--  1 seiscomp  staff  375384 Jan  8 15:41 src/trunk/libs/3rd-party/spread/libspread/libspread.a\r\nlrwxr-xr-x  1 seiscomp  staff      21 Jan  8 15:41 src/trunk/libs/3rd-party/spread/libspread/libspread.dylib -> libspread.3.0.0.dylib\r\n```\r\n\r\nTo go a little bit further by using 'otool' below you can see that **libseiscomp3_config.dylib** or **libmseed.2.6.2.dylib** has **rpath** before:\r\n\r\n```\r\n#otool -L /usr/local/lib/python/seiscomp3/_Client.so \r\n/usr/local/lib/python/seiscomp3/_Client.so:\r\n\t/System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.10)\r\n\t@rpath/libseiscomp3_client.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t@rpath/libseiscomp3_core.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.9.0)\r\n\t/usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)\r\n\t/usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)\r\n\t@rpath/libseiscomp3_config.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0)\r\n\t@rpath/libmseed.2.6.2.dylib (compatibility version 0.0.0, current version 2.6.2)\r\n\t/usr/local/opt/boost/lib/libboost_iostreams.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/boost/lib/libboost_thread-mt.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/boost/lib/libboost_program_options.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/boost/lib/libboost_filesystem.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/boost/lib/libboost_regex.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/boost/lib/libboost_system.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibtspread-core.3.dylib (compatibility version 3.0.0, current version 3.0.0)\r\n\t/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)\r\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)\r\n```\r\n\r\nEven disabling **System Integrity Protection (SIP)** doesn't change anything, same error:\r\nhttps://en.wikipedia.org/wiki/System_Integrity_Protection\r\n\r\n```\r\n**With System Integrity Protection (SIP) DISABLED**\r\n#seiscomp status\r\nerror: /usr/local/etc/init/arclink.py: dlopen(/usr/local/lib/python/seiscomp3/_Client.so, 2): Library not loaded: libtspread-core.3.dylib\r\n  Referenced from: /usr/local/lib/python/seiscomp3/_Client.so\r\n  Reason: image not found\r\nerror: /usr/local/etc/init/trunk.py: dlopen(/usr/local/lib/python/seiscomp3/_Client.so, 2): Library not loaded: libtspread-core.3.dylib\r\n  Referenced from: /usr/local/lib/python/seiscomp3/_Client.so\r\n  Reason: image not found\r\nspread               is not running\r\nscmaster             is not running\r\n```\r\n\r\nSo the main problem is that the rpath is missing for **libtspread-core.3.dylib**\r\nSo any idea how to add the rpath for the Makefile or CMakeLists for spread ?\r\n\r\nTried also with the latest spread source code 4.4.0 but no luck...\r\n\r\nAny idea how to fix this ?\r\n\r\nCheers,\r\n\r\nGilles"},"comment":{"url":"https://api.github.com/repos/SeisComP3/seiscomp3/issues/comments/179299575","html_url":"https://github.com/SeisComP3/seiscomp3/issues/42#issuecomment-179299575","issue_url":"https://api.github.com/repos/SeisComP3/seiscomp3/issues/42","id":179299575,"user":{"login":"gilcel","id":9282533,"avatar_url":"https://avatars.githubusercontent.com/u/9282533?v=3","gravatar_id":"","url":"https://api.github.com/users/gilcel","html_url":"https://github.com/gilcel","followers_url":"https://api.github.com/users/gilcel/followers","following_url":"https://api.github.com/users/gilcel/following{/other_user}","gists_url":"https://api.github.com/users/gilcel/gists{/gist_id}","starred_url":"https://api.github.com/users/gilcel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilcel/subscriptions","organizations_url":"https://api.github.com/users/gilcel/orgs","repos_url":"https://api.github.com/users/gilcel/repos","events_url":"https://api.github.com/users/gilcel/events{/privacy}","received_events_url":"https://api.github.com/users/gilcel/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T15:40:25Z","updated_at":"2016-02-03T15:40:25Z","body":"Ok, will try...also for Locator NLL the OS X version needs these libs / files for fmemopen / open_memstream from here:\r\nhttps://github.com/materialsvirtuallab/pyhull/tree/master/src/fmemopen\r\n\r\nAny issues to use it in seiscomp3 with the Apache 2 license ?\r\n"}}