SPAM: Re: [OPEN-ILS-DEV] Debian version/GCC version

Mike Rylander mrylander at gmail.com
Tue Feb 20 01:05:07 EST 2007


On 2/20/07, Bill Erickson <billserickson at gmail.com> wrote:
> On 2/19/07, Mike Rylander <mrylander at gmail.com> wrote:
> > >
> > > The guys here [1] suggest using pkg-config to find the apr build flags.
> > > E.g.:
> > >
> > > % pkg-config --cflags apr-1
> > >
> > > -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
> > > -I/usr/include/apr- 1.0
> > >
> > > We could just add pkg-config as a dependency and add the `pkg-config
> > > --cflags apr-1` to the makefile when necessary.
> >
> > I don't like that at all.  This is exactly the job that
> > autoconf/automake are meant for,
>
> Sure, but in the mean time, it's also what pkg-config is meant for.
>

Well, my concern is coverage.  If it's just me that isn't getting the
.pc for apr-1 with the distro package then I'm all for it.

> > and adding YAD that won't work on
> > many, if not most, systems sounds like a BadIdea(tm).
>
> Hmm.  Why won't it work on most systems?  It supposedly works on *NIX, Mac,
> and (*cough*) Windows and is designed to be used for just such purposes:
>

It's not that the tool doesn't compile, but that it doesn't seem to be
in use for dependent packages in some cases.  I have apr installed
from the distro on 2 boxes but there's no .pc for it on either.  I'm
not saying it won't work in some cases, or even that it's not a good
thing, just that there are probably going to be holes.

If others out there (nudge-nudge, everyone) would like to test it then
I see no reason not to try.  Sorry if I came off all jumpy-like, but
it isn't working for me.

> gcc -o test test.c `pkg-config --libs --cflags glib-2.0`
>
>  I wasn't proposing a hack... ;)
>

I wasn't suggesting you were, but unfortunately my first tests (apr on
fw1 and my desktop) failed.  That makes me very leery of depending on
it as the "right way" to get compilation settings.  Maybe my boxes are
just whacked out, though... that is entirely possible.  ;)

> > For now, I
> > think we should have 'make' pull in any CFLAGS environment vars and
> > specify that _LARGEFILE64_SOURCE is required on 32 bit machines.
>
> Yep, that's fine with me too.
>

Is it trivial to have the makefile attempt pkg-config? if so, and it
won't fail the build (may just be a matter of redirecting stderr to
/dev/null), let's try it out.  If it ends up working then
_LARGEFILE64_SOURCE-from-env is just belt-and-suspenders and everybody
wins.  :)

>
> --
>
> Bill Erickson
> PINES Systems Developer
> Georgia Public Library Service
> billserickson at gmail.com
> http://open-ils.org


-- 
Mike Rylander
mrylander at gmail.com
GPLS -- PINES Development
Database Developer
http://open-ils.org


More information about the Open-ils-dev mailing list