Skip to content

Unable to set rpath of python library when building from source #6384

Open
@jpapadakis

Description

@jpapadakis

Checklist

Steps to reproduce the issue

Build from source with one of the non-header only 3rd party libs installed in a non-standard location while activating the USE_SYSTEM_XXX flag. The prefix location of the system 3rd party lib is provided to cmake via CMAKE_PREFIX_PATH, desired rpath is provided via CMAKE_INSTALL_RPATH, and the library is located by cmake at configure time. In my case use JSONCPP as an example.

Make install-pip-package target.

Error message

Upon importing open3d in python:

    undefined symbol: <...>

readelf shows desired rpath provided by CMAKE_INSTALL_RPATH is not reflected in the lib RUNPATH.

Open3D, Python and System information

- Operating system: Ubuntu 20.04
- Python version: Python 3.9
- Open3D version: 0.15.1
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): gcc 9.4

Additional information

Build process of python lib does not appear to respect CMAKE_INSTALL_RPATH provided by user. This does not appear to be an issue when using system versions of header only 3rd party libs (e.g. Eigen, pybind11, etc.).

Metadata

Metadata

Assignees

No one assigned

    Labels

    build/installBuild or installation issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions