[Samba] Why does libsmbclient demand runpath in its pc file?

Joachim Banzhaf joachim.banzhaf at googlemail.com
Thu Oct 23 11:43:10 MDT 2014

Hi list, RPATH specialists,

I have a problem with a linux program that uses libsmbclient and libGL
where the system has two libGL's installed. Mesa in /usr/lib64 and Nvidia
in /usr/X11R6/lib64.

If I start programs that use libGL, the dynamic linker finds the correct
(Nvidia) libGL via systemwide linker configuration /etc/ld.so.conf

But not for a program that also uses libsmbclient. It picks the Mesa
version and fails to display some things correctly.

This seems to stem from this pc config "Libs: @LIB_RPATH@ -L${libdir}

On my system this results in a RUNPATH of /usr/lib64 in the program which
overrides the ld.so.conf settings.

The system is opensuse 13.1 with samba 4.1.11 and the program is kodi.
I already opened a bug at opensuse which contains links to more details:

My questions now are:

* Why does samba use this @LIB_RPATH@ anyways?
* Under which circumstances can I just drop it safely?
* Can it be made to evaluate to nothing during auto configuration? How?
* Could/should it even be dropped entirely (it seems like it generates a
rather generic problem that is/was not easy to debug)?


More information about the samba mailing list