buildroot seems to have some pkg-config wrapper that adds the sysroot path per every variable expansion. I have a .pc file that emits -rpath on --libs. rpath with the sysroot prefix doesn't work. How should I get the proper rpath with pkg-config under buildroot? Can buildroot be told to not add sysroot path to some variables?
stsp, All, > buildroot seems to have some pkg-config wrapper that adds the sysroot path per every variable expansion. Yes and no. Basically, that's pkconf (the pkg-config implementation Buildroot is using) thatadds the sysroot prefix to all variable expansions. The wrapper probided by Buildroot just ensure that the proper sysroot is used. > I have a .pc file that emits -rpath on --libs. rpath with the sysroot prefix doesn't work. Adding an -rpath link option should not be done in a .pc file; that's rather incorrect. Furthermore, the RPATH is fixed before assembling the filesystem images, so that only RPATH valid on the targt are present (usually, none is needed); see Makefile line 768. Regards, Yann E. MORIN
> Adding an -rpath link option should not be done in a .pc file; that's rather > incorrect. What would you suggest instead? This is a plugin library for particular program so it doesn't reside in an ldconfig-known location. I am not aware of any other way than rpath of hardcoding the non-std locations.
> so that only RPATH valid on the targt are present (usually, none is needed); Maybe it can check if RPATH is valid on target, by stripping the sysroot path and checking the result?
Thank you for your report. The issue tracker for the Buildroot project has been moved to the Gitlab.com issue tracker: https://gitlab.com/buildroot.org/buildroot/-/issues We are taking this opportunity to close old issues in this old tracker. If you believe your issue is still relevant, please open one in the new issue tracker. Thank you!