Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ign topic|service fails on MacOS X if system integrity protection is enabled #72

Closed
osrf-migration opened this issue Oct 4, 2017 · 2 comments
Labels
bug Something isn't working

Comments

@osrf-migration
Copy link

Original report (archived issue) by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


Here's a snippet of the content of cmdtransport3.rb installed with Ignition Transport:

#!c++

...
# Constants.
LIBRARY_NAME = 'libignition-transport3.so'
...

The variable LIBRARY_NAME is passed to dlload() later. As usual, there are a few standard directories that are checked to find the shared library. Homebrew installs all resources in /usr/local/ (after running brew links <package>) and in order to find shared libraries, you need to set DYLD_LIBRARY_PATH pointing to /usr/local/lib. However, if the Mac OS X system integrity protection is enabled, you won't be able to do it. Apparently, this is the most common setup and is not recommended to disable it.

The issue then is that libignition-transport3.so won't be found when using ign.

A potential solution is to change LIBRARY_NAME to contain the relative path to the shared library from the ruby script (cmdtransport3.rb). Both the ruby script and the shared library are installed together, so this mechanism should be relocatable.

E.g.: cmdtransport3.rb is installed in:

/home/caguero/local/lib/ruby/ignition/cmdtransport3.rb

The Ignition Transport library is installed in:

/home/caguero/local/lib/libignition-transport3.so

The value of IGN_LIBRARY_NAME should be:

#!c++

...
# Constants.
LIBRARY_NAME = '../../libignition-transport3.so'
...
@osrf-migration
Copy link
Author

Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


See pull request #227.

@osrf-migration
Copy link
Author

Original comment by Carlos Agüero (Bitbucket: caguero, GitHub: caguero).


  • changed state from "new" to "resolved"

Merged in rb_absolute_path (pull request #227)

Fix issue #72

Approved-by: Steven Peters [email protected]
Approved-by: Nathan Koenig [email protected]

→ <<cset ddeae3f>>

@osrf-migration osrf-migration added major bug Something isn't working labels Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant