[Interest] link error (and probably a dumb question)

Thiago Macieira thiago.macieira at intel.com
Fri Sep 18 19:58:46 CEST 2015

On Friday 18 September 2015 18:06:55 René J. V. Bertin wrote:
> Thiago Macieira wrote:
> > Though Jane Developer will know what's there because she installs
> > libraries
> > using the package manager.
> Any reason for the gender change? :)

No. But note I am talking about a different persona. The user who doesn't 
develop will not care where the software is installed and about libraries. The 
developer, on the other hand, will care what libraries are and that they get 
installed properly.

> > If the default search path is /usr/lib/x86_64-linux-gnu, then the question
> > is why you had to set PKG_CONFIG_PATH.
> I think the system pkg-config looks in /usr/lib and then in /usr/lib/<arch>-
> linux-gnu . The one from /opt/local is "stock" and thus doesn't know about
> Debuntu multiarch paths (I checked, there's no occurrence of "linux-gnu" in
> the pkg-config source package). So I had to add the path via

/opt/local is not a system path. 

The question is why you have dbus and glib in a non-standard path in your 
system in the first place.

> I've now replaced /opt/local/bin/pkg-config with a wrapper that prepends
> /opt/local/lib/pkgconfig to PKG_CONFIG_PATH and then calls the system pkg-
> config. Seems to be the solution I needed, but I'll raise a question about
> the multiarch dirs on the Ubuntu forums.

Not really. It sounds to me that the fault lies with you by installing a badly 
configured pkg-config in /opt/local/bin and by having that in $PATH ahead of the 
standard pkg-config.

> > If the system uses the Debian-style of
> > multiarch, why do you have /usr/lib64?
> I don't, and didn't intend to suggest I do...

Then please stop talking about paths you don't have. You're the one who 
brought /usr/lib64 up. You're confusing me.

Everyone: please don't try to sanitise paths. When you do, you may hide the 
important detail.

> > needs the full library search path. If the library isn't found after this,
> > it assumes it's in a default search path it didn't know about and leaves
> > it to the linker.
> Hmmm, sounds like it's still a good idea to remove the multiarch paths from
> DEFAULT_LIBDIRS for a Qt to be installed in a prefix like /opt/local .
> Presuming only Qt installs .prl files, there best be no confusion between
> versions.

Does your linker search there by default? If so, why would you remove?

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Interest mailing list