[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /usr/local [was: CPPFLAGS prob]

From: Dan Kegel
Subject: Re: /usr/local [was: CPPFLAGS prob]
Date: Thu, 17 Jun 2004 08:52:22 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113

Russell Shaw wrote:

The only way pkg-config can work is if you have a separate
copy of pkg-config and its data files for each copy of the userland libraries.
This makes perfect sense: for each value of $prefix, you'll
have a separate copy of $prefix/usr/bin/pkg-config and $prefix/usr/lib/pkgconfig.

Unless you're familiar with cross-compiling, you probably won't understand or care about any of the above. That may change, though, as multiarch systems
become more common.  See, which
proposes putting libraries and include files not in /usr/include but in
/usr/$(gcc -dumpmachine)/{lib,include}
where gcc is the gcc associated with that copy of userland.

Only one pkg-config is needed. Each library supplies its own .pc file.
ls /usr/lib/pkg-config:

/usr/lib/pkgconfig/audiofile.pc ...

Yes, but look at what's in those files.  As I pointed out above,
they contain references to the absolute location where the libraries
were installed.  If you have more than one copy of the library
installed on the system, as is comment when cross-compiling
or on multiarch systems, that can only be correct for one
installed copy of the library.  Let's say I build audiofile for arm
and install it with prefix /opt/arm-linux, and then cross-compile
a program that depends on audiofile.  If I try to use
/usr/lib/pkgconfig/audiofile.pc, that will point me to
/usr/lib/libaudiofile.a instead of /opt/arm-linux/usr/lib/libaudiofile.a.
The right thing to do is use /opt/arm-linux/usr/lib/pkgconfig/audiofile.pc,
which will point to the right library.

As I said earlier, this isn't intuitive to people who don't
cross-compile much.  Are you one of those folks, by any chance?

If you still think only one copy of, say, audiofile.pc is needed
on the entire system, then please tell me what happens when I try
to cross-compile a package using audiofile

- Dan

My technical stuff:
My politics: see for examples of why I'm for regime 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]