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

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

 



Russell Shaw wrote:
::::::::::::::
audiofile.pc
::::::::::::::
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib
includedir=/usr/include

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 http://raw.no/debian/amd64-multiarch-2, 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/atk.pc
/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: http://kegel.com My politics: see http://www.misleader.org for examples of why I'm for regime change


_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux