Configure failing with gtk-2.2.0



Hi.

I'm having what seems to be a recurring but infrequent problem with
gtk-2.2.0 configuration.  I get:

[snip]
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for XOpenDisplay in -lX11... no
configure: error: *** libX11 not found. Check 'config.log' for more details.

And config.log shows:

/* Override any gcc2 internal prototype to avoid an error.  */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char XOpenDisplay ();
int
main ()
{
XOpenDisplay ();
  ;
  return 0;
}
configure:14559: result: no
configure:14564: error: *** libX11 not found. Check 'config.log' for more detail
s.

(Which really isn't a whole lot more in the way of details :-))

My system is:

Generic linux box, 2.4.20, but generally Slackware-ish (I use very basic
items, such as gcc and glibc, from Slackware; almost everything else is
self-built directly from source packages).

XFree86 4.2.1 (binary install from xfree86.org)
gcc 2.95.3
glibc 2.2.5

Anything else you need to know about my system and versions, let me know.

I compile dozens of complex X apps, and haven't run into this before.
I did all the perfunctory checks - that libX11 is in /usr/X11R6/lib (it is),
that the X headers are proper and in the right place (they are).  Based
on one archive item, I reinstalled gcc and glibc from the Slackware distro,
just in case I had some corrupted headers.  No change.  I also reinstalled
XFree86 4.2.1, in case in some way I had damaged something there.  Also
no change.

Finally, I compiled a simple C program that I believe replicates what's
going on in the configure script:

#include <X11/Xlib.h>
Display* XOpenDisplay ();
int main ()
{
  XOpenDisplay (NULL);
  ;
  return 0;
}

I compiled this with:

gcc -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 try.c -o try

Compiled just fine (though I had to use 'Display' as the type for
XOpenDisplay; using 'char' as configure produces:

try.c:2: conflicting types for `XOpenDisplay'
/usr/X11R6/include/X11/Xlib.h:1514: previous declaration of `XOpenDisplay'

(I presume something has been done in configure that makes char the
appropriate choice).  Also, note that I had to make the type Display*, and
I had to pass NULL as an argument, since the function wants a display_name
as an argument.

Point is, my headers and libs seem to be getting found here, so I have
no clue why they'd not be found with use of configure.

I've been through what I believe to be all the relevant gtk-list archives,
and found this referenced over the years.  Most of the replies on the
problem have dealt with things like installing a development package
(I've got everything up), making sure ld.so.conf is correct (it is),
and a few other things that I've checked on my box, and found all to be
as it should be.

One factoid that might be of interest:  In June, I successfully and without
any incident compiled gtk+-2.0.5 and friends; I tried that again tonight
and get exactly the same result (XOpenDisplay fails).  The only significant
change I can think of that I did in the meantime was going from XFree86
3.3.6 to XFree86 4.2.1, and that didn't seem to louse up anything else.
(Many, many other things of varying complexity have compiled and run just
fine).

Any help someone can offer would be a big help, since I've just spent
4 hours on this, and it's really killing me; and likewise, I have no
other good ideas (or even bad ones).

thx,
jbh



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