[xml] (Broken) multi-arch support in xml2-config
- From: Daniel Richard G. <oss teragram com>
- To: <xml gnome org>
- Subject: [xml] (Broken) multi-arch support in xml2-config
- Date: Wed, 7 Nov 2012 15:49:47 -0500
I noticed that this bit was added about a month ago to xml2-config.in:
if [ "`ldd /bin/sh | grep lib64`" = "" ]
then
libdir=${exec_prefix}/lib
else
libdir=${exec_prefix}/lib64
fi
This caused a subsequent build of LibXSLT to fail, because the needed
library was under $prefix/lib/, and the build system was looking under
$prefix/lib64/.
I'm not seeing why this code is there. There are multiple problems with
this approach:
* Custom libdir values specified at configure time (i.e. --libdir=blah)
are ignored in favor of the common-case default
* The lib64 subdir, if returned, is returned solely based on how /bin/sh
is linked---rather than whether "make install" actually puts the library
there or not
* As written, there isn't even a way to request an architecture explicitly
if more than one is installed (something like --lib32/--lib64 options or
similar)
* "lib" versus "lib64" isn't the only possible distinction, either; my
64-bit Ubuntu system, for example, has /usr/lib/ and /usr/lib32/.
* The "foo-config" script mechanism, to the degree that it can work in a
multi-arch scenario, works a lot more cleanly when you have one instance
of the script per architecture (rather than one script handling multiple
architectures). All I would do then is set my PATH appropriately, e.g.
PATH=/usr/arch/x86_64-linux-gnu/bin:/usr/bin
or
PATH=/usr/arch/i386-linux-gnu/bin:/usr/bin
when LibXML2 is installed for both amd64 and i386 under /usr/arch/.
What was the motivation for trying to shoehorn multi-arch support into
xml2-config?
--Daniel
--
Daniel Richard G. || danielg teragram com || Software Developer
Teragram Linguistic Technologies (a division of SAS)
http://www.teragram.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]