Skip to content

[feature] pkg_config/PkgConfigDeps generators: -Wl,-rpath="${libdir}" should be removed #7878

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

Closed
1 task done
SpaceIm opened this issue Oct 14, 2020 · 1 comment · Fixed by #10192
Closed
1 task done
Assignees
Milestone

Comments

@SpaceIm
Copy link
Contributor

SpaceIm commented Oct 14, 2020

Currently (conan 1.30.1, but for a long time), pkg_config generator creates a pkg-config file like this on Linux:

prefix=/home/spaceim/.conan/data/h3/3.7.0/_/_/package/7fe67a73ac24eef3dbbe871cec7ad5a0356f543a
libdir=${prefix}/lib
includedir=${prefix}/include

Name: h3
Description: Hexagonal hierarchical geospatial indexing system.
Version: 3.7.0
Libs: -L${libdir} -lh3  -lm  -Wl,-rpath="${libdir}"
Cflags: -I${includedir} -DH3_PREFIX=

When this pkg-config file is consumed in another project to produce an executable or shared lib, rpath is hardcoded in this runtime file. It leads to some inconsistent behaviour where some paths are in rpath and others not depending on whether the lib has been consumed through pkgconf or not in build system of a recipe.
Moreover, those kinds of absolute RPATH hardcoded in runtimes don't make sense at all for binaries produced on another machine.

"Official" pkg-config files usually never have -Wl,-rpath in Libs.

@SpaceIm
Copy link
Contributor Author

SpaceIm commented Dec 17, 2021

@czoido @memsharded Did you remove -Wl,-rpath in PkgConfigDeps?

EDIT: nop, still there.

@SpaceIm SpaceIm changed the title [feature] pkg_config generator: -Wl,-rpath="${libdir}" should be removed [feature] pkg_config/PkgConfigDeps generators: -Wl,-rpath="${libdir}" should be removed Dec 17, 2021
@franramirez688 franramirez688 self-assigned this Dec 17, 2021
@franramirez688 franramirez688 added this to the 1.44 milestone Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants