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

Re: *-config programs and multi-arch

Simon McVittie <smcv@debian.org> writes:
> That's the missing piece of the puzzle: some sort of cross-toolchain
> package (which doesn't exist yet in Debian - but neither does a
> cross-gcc) should make the symlink
>     x86_64-w64-mingw32-pkg-config -> /usr/share/pkg-config-crosswrapper
> in your $PATH. For the moment, making that symlink is part of the
> process of installing a cross-toolchain manually.

Ok, but still, it should be more robust when things are not set up properly.

>> It seems to me that the right thing in this case (no host-prefix
>> tool is found) is simply to act as if pkg-config was not present at
>> all, instead of using the non-host-prefixed version.
> Well, it does give you a warning... perhaps the warning should
> default to being fatal, but it's basically the same situation as any
> other missing cross-tool (e.g. if you had a cross gcc but no cross
> ld). autoconf currently stumbles on regardless, in the hope that
> your non-cross (build-arch) tool

I dunno, pkg-config is different, I think -- unlike a missing compiler
or linker, a missing pkg-config often simply means "you can't use any
libraries for which pkg-config is required", and missing libraries
[etc] is an issue which configure scripts are often prepared.

So the "pkg-config missing" => "fatal error" decision is really
something that should be left left to the configure script, not embedded
in the pkg-config autoconf macros.

However, the current state, where it pretends pkg-config is present,
when it really isn't in a useful way, just fools the configure script
into doing the wrong thing.

[For very important libraries, I often write the library test twice,
once with pkg-config, and once using traditional autoconf methods to
handle the no-pkg-config case.]

AFAICT, the easiest way to handle all this is just to make a missing
cross-pkg-config look like a missing pkg-config to the configure
script.  Then whatever logic the script may have for detecting the
"not pkg-config at all" case, will do the right thing for the cross
case too.



The automobile has not merely taken over the street, it has dissolved the
living tissue of the city.  Its appetite for space is absolutely insatiable;
moving and parked, it devours urban land, leaving the buildings as mere
islands of habitable space in a sea of dangerous and ugly traffic.
[James Marston Fitch, New York Times, 1 May 1960]

Reply to: