[Slackbuilds-users] libgda compile is "brittle" fix
jvogel4 at stny.rr.com
Sun Aug 2 15:17:15 UTC 2015
On Sun, 2 Aug 2015 00:30:56 -0700
King Beowulf <kingbeowulf at gmail.com> wrote:
> On 08/01/2015 03:25 PM, John Vogel wrote:
> > On Sat, 1 Aug 2015 15:03:01 -0700
> > King Beowulf <kingbeowulf at gmail.com> wrote:
> >> On Saturday, August 1, 2015, John Vogel <jvogel4 at stny.rr.com> 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
> 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
> To cross-compile x86, one needs to run /etc/profile.d/32dev.sh to reset
> PKG_CONFIG_PATH to
> before compiling 32-bit software.
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
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.
More information about the SlackBuilds-users