Skip to content
This repository was archived by the owner on May 31, 2025. It is now read-only.
This repository was archived by the owner on May 31, 2025. It is now read-only.

roslz4 linking against the wrong python version  #923

@spaghetti-

Description

@spaghetti-

Something with the CMakeFiles.txt of roslz4 makes it disregard python overrides. On my most recent compilation os MacOS Sierra -

./src/catkin/bin/catkin_make_isolated --install --install-space /opt/ros/kinetic -DSETUPTOOLS_DEB_LAYOUT=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo  -DCMAKE_PYTHON_EXECTUABLE=`which python` -DCMAKE_PYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib --pkg roslz4
❯ python -c "import rosbag"
Fatal Python error: PyThreadState_Get: no current thread
[1]    89264 abort      python -c "import rosbag"

Because

❯ otool -L _roslz4.so
_roslz4.so:
        _roslz4.so (compatibility version 0.0.0, current version 0.0.0)
        libroslz4.dylib (compatibility version 0.0.0, current version 0.0.0)
        /System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.10)
        /usr/local/opt/lz4/lib/liblz4.1.dylib (compatibility version 1.0.0, current version 1.7.1)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0)

Fixed by

install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python /usr/local/Frameworks/Python.framework/Versions/2.7/Python _roslz4.so

It shouldn't happen because I specified my python libs, so it could be a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions