Skip to content

Running Python from the build directory can lead to wrong libpython being loaded #128469

@FFY00

Description

@FFY00

Feature or enhancement

Proposal:

Right now, since we don't set RPATH, when using a shared libpython and running Python from the build directory, the library might resolve to the system, instead of the local one.

If possible, it would be good to set RPATH on the Python binary in the build directory, to force the local libpython library to be loaded. It would also be preferred to use RPATH instead of RUNPATH, as the prior has precedence over LD_LIBRARY_PATH, which users might have set.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions