{"action":"created","issue":{"url":"https://api.github.com/repos/ros/catkin/issues/498","repository_url":"https://api.github.com/repos/ros/catkin","labels_url":"https://api.github.com/repos/ros/catkin/issues/498/labels{/name}","comments_url":"https://api.github.com/repos/ros/catkin/issues/498/comments","events_url":"https://api.github.com/repos/ros/catkin/issues/498/events","html_url":"https://github.com/ros/catkin/pull/498","id":17752437,"number":498,"title":"Use DYLD_FALLBACK_LIBRARY_PATH to not interfere with system libraries on OS X.","user":{"login":"kyonifer","id":980312,"avatar_url":"https://avatars.githubusercontent.com/u/980312?v=3","gravatar_id":"","url":"https://api.github.com/users/kyonifer","html_url":"https://github.com/kyonifer","followers_url":"https://api.github.com/users/kyonifer/followers","following_url":"https://api.github.com/users/kyonifer/following{/other_user}","gists_url":"https://api.github.com/users/kyonifer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyonifer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyonifer/subscriptions","organizations_url":"https://api.github.com/users/kyonifer/orgs","repos_url":"https://api.github.com/users/kyonifer/repos","events_url":"https://api.github.com/users/kyonifer/events{/privacy}","received_events_url":"https://api.github.com/users/kyonifer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ros/catkin/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2013-08-07T14:53:53Z","updated_at":"2016-03-16T21:50:23Z","closed_at":"2014-04-11T18:10:46Z","pull_request":{"url":"https://api.github.com/repos/ros/catkin/pulls/498","html_url":"https://github.com/ros/catkin/pull/498","diff_url":"https://github.com/ros/catkin/pull/498.diff","patch_url":"https://github.com/ros/catkin/pull/498.patch"},"body":"I'm currently working on creating a set of Portfiles to get ROS properly supporting within macports (https://github.com/kyonifer/ros-macports). One issue i've run into is that ROS uses DYLD_LIBRARY_PATH to find libs at runtime. In general, this approach causes issues with DYLD_ libraries overriding builtin libraries. For example, once a user has sourced setup.bash, macport's libjpeg overrides the system libJPEG which export different symbols. This makes it impossible to run e.g. Sublime Text or rqt:\r\n```\r\nkyons-MacBook-Pro:~ kyon$ source setup.bash\r\nkyons-MacBook-Pro:~ kyon$ sl\r\ndyld: Symbol not found: __cg_jpeg_resync_to_restart\r\n  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO\r\n  Expected in: /opt/local/lib/libJPEG.dylib\r\n in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO\r\nTrace/BPT trap: 5\r\nkyons-MacBook-Pro:~ kyon$ \r\nkyons-MacBook-Pro:~ kyon$ rqt\r\nTraceback (most recent call last):\r\n  File \"/opt/local/bin/rqt\", line 16, in <module>\r\n    sys.exit(main.main())\r\n  File \"/opt/local/lib/python2.7/site-packages/rqt_gui/main.py\", line 56, in main\r\n    return super(Main, self).main(argv, standalone=standalone, plugin_argument_provider=plugin_argument_provider)\r\n  File \"/opt/local/lib/python2.7/site-packages/qt_gui/main.py\", line 326, in main\r\n    from python_qt_binding import QT_BINDING\r\n  File \"/opt/local/lib/python2.7/site-packages/python_qt_binding/__init__.py\", line 45, in <module>\r\n    from .binding_helper import loadUi, QT_BINDING, QT_BINDING_MODULES, QT_BINDING_VERSION  # @UnusedImport\r\n  File \"/opt/local/lib/python2.7/site-packages/python_qt_binding/binding_helper.py\", line 258, in <module>\r\n    _select_qt_binding(getattr(sys, 'SELECT_QT_BINDING', None))\r\n  File \"/opt/local/lib/python2.7/site-packages/python_qt_binding/binding_helper.py\", line 84, in _select_qt_binding\r\n    raise ImportError('Could not find Qt binding (looked for \"%s\"):\\n%s' % (DEFAULT_BINDING_ORDER, '\\n'.join(error_msgs)))\r\nImportError: Could not find Qt binding (looked for \"['pyqt', 'pyside']\"):\r\n  ImportError for \"pyqt\": dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PyQt4/QtCore.so, 2): Symbol not found: __cg_jpeg_resync_to_restart\r\n  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO\r\n  Expected in: /opt/local/lib/libJPEG.dylib\r\n in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO\r\n  ImportError for \"pyside\": No module named PySide.QtCore\r\n```\r\n\r\nTheres two solutions to this: \r\n\r\n* Ask libraries to use install names with full paths (or rpaths) encoded, thereby eliminating libs from being on the path at all. \r\n* Use DYLD_FALLBACK_LIBRARY_PATH, as dyld will only search the fallback path once it exhausts the builtin paths (eliminating interference with links that were previously working). \r\n\r\nThe latter is easily changed as seen in the attached pull request. The former is done by passing flags to catkin_make while building catkin and then eliminating DYLD_ vars from the setup.bash altogether. See the ros-desktop Portfile in the above repository for an example.\r\n\r\nI've done both for macports, but it'd be good to change things upstream one way or the other.\r\n"},"comment":{"url":"https://api.github.com/repos/ros/catkin/issues/comments/197564904","html_url":"https://github.com/ros/catkin/pull/498#issuecomment-197564904","issue_url":"https://api.github.com/repos/ros/catkin/issues/498","id":197564904,"user":{"login":"LiohAu","id":343564,"avatar_url":"https://avatars.githubusercontent.com/u/343564?v=3","gravatar_id":"","url":"https://api.github.com/users/LiohAu","html_url":"https://github.com/LiohAu","followers_url":"https://api.github.com/users/LiohAu/followers","following_url":"https://api.github.com/users/LiohAu/following{/other_user}","gists_url":"https://api.github.com/users/LiohAu/gists{/gist_id}","starred_url":"https://api.github.com/users/LiohAu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiohAu/subscriptions","organizations_url":"https://api.github.com/users/LiohAu/orgs","repos_url":"https://api.github.com/users/LiohAu/repos","events_url":"https://api.github.com/users/LiohAu/events{/privacy}","received_events_url":"https://api.github.com/users/LiohAu/received_events","type":"User","site_admin":false},"created_at":"2016-03-16T21:50:23Z","updated_at":"2016-03-16T21:50:23Z","body":"I just tried it, and it did not solve my loading issue. Still getting this error message when roslaunching gazebo : \r\n```\r\n[Err] [Plugin.hh:165] Failed to load plugin //Users/../catkin_ws/devel/lib/libgazebo_ros_paths_plugin.dylib: dlopen(//Users/../catkin_ws/devel/lib/libgazebo_ros_paths_plugin.dylib, 9): Library not loaded: libroslib.dylib\r\n  Referenced from: //Users/../catkin_ws/devel/lib/libgazebo_ros_paths_plugin.dylib\r\n  Reason: image not found\r\n```\r\n\r\nAnd here is the otool output : \r\n\r\n```\r\n$ otool -L ~/catkin_ws/devel/lib/libgazebo_ros_paths_plugin.dylib \r\n/Users/.../catkin_ws/devel/lib/libgazebo_ros_paths_plugin.dylib:\r\n\t@rpath/libgazebo_ros_paths_plugin.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_client.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_gui_building.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_gui_viewers.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_gui_model.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_gui.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_sensors.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_rendering.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_selection_buffer.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_physics_bullet.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_physics_simbody.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_physics_ode.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_physics.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_ode.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_transport.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_msgs.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_util.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_common.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_skyx.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_gimpact.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_opcode.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_opende_ou.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_math.6.dylib (compatibility version 6.0.0, current version 6.5.1)\r\n\t/usr/local/opt/gazebo6/lib/libgazebo_ccd.6.dylib (compatibility version 6.0.0, current version 6.5.1)\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_signals-mt.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/boost/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/boost/lib/libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/boost/lib/libboost_program_options-mt.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/boost/lib/libboost_regex-mt.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/boost/lib/libboost_iostreams-mt.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/boost/lib/libboost_date_time-mt.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/protobuf/lib/libprotobuf.9.dylib (compatibility version 10.0.0, current version 10.1.0)\r\n\t/usr/local/opt/sdformat3/lib/libsdformat.3.dylib (compatibility version 3.0.0, current version 3.6.0)\r\n\t/usr/local/opt/ignition-math2/lib/libignition-math2.2.dylib (compatibility version 2.0.0, current version 2.2.3)\r\n\t/usr/local/opt/ogre/lib/libOgreMain.1.7.4.dylib (compatibility version 0.0.0, current version 1.7.4)\r\n\t/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)\r\n\tlibroslib.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibtf.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibtf2_ros.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibactionlib.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibmessage_filters.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibroscpp.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibxmlrpcpp.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibtf2.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibrosconsole.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibrosconsole_log4cxx.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibrosconsole_backend_interface.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/log4cxx/lib/liblog4cxx.10.dylib (compatibility version 11.0.0, current version 11.0.0)\r\n\tlibdynamic_reconfigure_config_init_mutex.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibroscpp_serialization.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibrostime.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\tlibcpp_common.dylib (compatibility version 0.0.0, current version 0.0.0)\r\n\t/usr/local/opt/console_bridge/lib/libconsole_bridge.0.2.dylib (compatibility version 0.2.0, current version 0.0.0)\r\n\t/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)\r\n```\r\n\r\nSo now the @rpath line is there, but that does not solve the issue. But maybe I misunderstood and it's the referenced libs that I should have rebuilt instead of the libgazebo_ros_paths_plugin.dylib plugin ?"}}