On Sun, 2 Aug 2015 00:30:56 -0700 King Beowulf <[email protected]> wrote:
> On 08/01/2015 03:25 PM, John Vogel wrote: > > On Sat, 1 Aug 2015 15:03:01 -0700 > > King Beowulf <[email protected]> wrote: > > > >> On Saturday, August 1, 2015, John Vogel <[email protected]> wrote: > >> > >>> > >>> > >>> I wonder if this is a pkg-config issue. So maybe builds could add > >>> something like: > >>> > >>> > >> Uncertain. compiling on pure Slack64 VM worked fine. > >> > >> -ed > >> > > > > Yep, makes sense. If you are building from pure 64bit or pure > > 32bit system, then pkg-config already knows where to look > > (in most cases and if you aren't like me and have stuff in > > /opt and various non-standard places). > > On a multilib/multiarch system, there are different pkg-config > > directories for each arch's .pc files: > > > > /usr/lib64/pkgconfig and /usr/lib/pkgconfig. > > > > Manipulating pkg-config can save a lot of grief when library and > > header paths can be different based on compile time arch. > > I often have to mess with pkg-config when I'm cross compiling, > > so I thought I'd chime in. I'm probably just muddying the > > waters, and if so, my apologies in advance. > > > > John > > I'm a bit clueless on this autotools and pkgconfig stuff. What would > the benefit be to do > > PKG_CONFIG_LIBDIR="/usr/lib${LIBDIRSUFFIX}/pkgconfig" > > versus > > LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" > > To get qemu to compile with a newer libusb (the one in 14.1 is too old), > I needed a static lib and a pkgconfig. But in libgda LDFLAGS appears > sufficient. For this particular libdga case (and some others), I > suspect a "bug" or "laziness" on the part of upstream in not making sure > of [/usr/lib | /usr/lib64]. Unless they are not sticking to FHS > standards (Debian)? > > From what I understand of the multilib set-up. PKG_CONFIG_PATH is set to > assume pure x64_64: > > # set | grep PKG_CONFIG_PATH > PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig > > To cross-compile x86, one needs to run /etc/profile.d/32dev.sh to reset > PKG_CONFIG_PATH to > > PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" > > before compiling 32-bit software. > > -Ed > I'm not saying that there is anything wrong with using LDFLAGS to adjust things for the linker. I'm not an expert on autotools stuff, either, but I try to pick stuff up as I go along. Hopefully, someone who understands this stuff better than me is willing to correct me if I get something wrong. My first reason about using the pkg-config environment variable was that it is more general. The man page for pkg-config describes the uses of both PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR. The first one gives a list, just like PATH, for pkg-config to search for .pc files; the second one replaces the default search directory. I'm not sure, and I would have to play around some more with them, which is actually more appropriate for what we're talking about here. I think the point is to get the pkg-config to only spit out appropriate libdir and includedir values in the CFLAGS, CPPFLAGS, LDFLAGS, and LDLIBS variables for the arch being built for. Overriding or bypassing a library that is installed on the host with one that is locally built is another usage. Like you are talking about with qemu and libusb; just using LDFLAGS wouldn't be enough there, you need adjustments to CPPFLAGS and CFLAGS, and possibly LDLIBS also. I'm nearly in over my head here, so if someone can correct me where or if I've strayed, please feel free to step in. John _______________________________________________ SlackBuilds-users mailing list [email protected] http://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - http://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - http://slackbuilds.org/faq/
