Re: configure error: "Can't find X11 headers and libs"
Re: configure error: "Can't find X11 headers and libs"
- Subject: Re: configure error: "Can't find X11 headers and libs"
- From: Tom Lane <email@hidden>
- Date: Mon, 07 Jul 2008 19:37:26 -0400
- Comments: In-reply-to Martin Costabel <email@hidden> message dated "Mon, 07 Jul 2008 22:50:34 +0200"
>> I wasn't aware that "mere users" actually built software themselves
>> these days, but in any case, this debate is as dead as xmkmf.
The reason the argument is not dead is that, despite claims to the
contrary upthread, autoconf scripts WILL NOT WORK without xmkmf on
current Apple systems. I just experimented with this and found out
why not: in the absence of xmkmf, _AC_PATH_X_DIRECT tries to find
the X11 libraries by searching for libXt. It does look in the right
place (/usr/X11/lib/), but what it checks for is
/usr/X11/lib/libXt.a
/usr/X11/lib/libXt.so
/usr/X11/lib/libXt.sl
and guess what, none of those extensions are shipped by Apple.
What I see on my 2.2.3 installation is
$ ls /usr/X11/lib/libXt.*
/usr/X11/lib/libXt.6.0.0.dylib@ /usr/X11/lib/libXt.dylib@
/usr/X11/lib/libXt.6.dylib* /usr/X11/lib/libXt.la*
$
So it fails to find the libraries and goes down in flames.
An ideal fix would be to get the autoconf boys to include .dylib in the
set of extensions probed for, but it would take many years for that to
propagate into the field adequately.
Perhaps a suitable compromise is to ship libXt.a. I don't think it
even has to be a real library; any old file would satisfy the
standard autoconf probe. A quick test here suggested that even
ten-year-old versions of autoconf would work after
sudo touch /usr/X11/lib/libXt.a
... at least for finding the libraries. There is a secondary problem,
which is that the presence of the /usr/include/X11 symlink convinces
_AC_PATH_X_DIRECT that no special -I switch is needed, because it can
find <X11/Intrinsic.h> without one. The result is that X11 programs
will build if they reference stuff under /usr/X11/include/X11/, but not
if they need anything else under /usr/X11/include/. This is probably
not good enough. I recommend rethinking providing that symlink: it's
not a net benefit. Or else symlink *everything* under /usr/X11/include
into /usr/include.
regards, tom lane
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden