Bug 25026 - -libXtst not detected [--enable-java-awt=gtk]
Summary: -libXtst not detected [--enable-java-awt=gtk]
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 29460 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-24 20:44 UTC by Pawel Sikora
Modified: 2006-10-16 20:18 UTC (History)
4 users (show)

See Also:
Host: *-linux
Target: *-linux
Build: *-linux
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Sikora 2005-11-24 20:44:32 UTC
my gcc is configured with:

../configure 
--prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib
--infodir=/usr/share/info --mandir=/usr/share/man 
--x-libraries=/usr/X11R6/lib --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-languages=c,c++,ada,java --enable-c99
--enable-long-long --disable-multilib --enable-nls --disable-werror
--with-gnu-as --with-gnu-ld --without-x --with-demangler-in-ld
--with-system-zlib --with-slibdir=/lib --enable-libgcj
--enable-libgcj-multifile --enable-libgcj-database --enable-gtk-cairo
--enable-java-awt=gtk ppc-pld-linux
CFLAGS=-O2 -ggdb
CXXFLAGS=-O2 -ggdb
TEXCONFIG=false

but libgcj configure fails:

(...)
checking for gtk+-2.0 >= 2.4... yes
checking GTK_CFLAGS... -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/X11R6/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2
checking GTK_LIBS... -L/usr/X11R6/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -lXrandr -lXi -lXinerama -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lXcursor -lXfixes -lcairo -lpangoft2-1.0 -lfontconfig -lfreetype -lz -lpango-1.0 -lm -lXrender -lX11 -lXext -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
checking for glib-2.0 >= 2.4 gthread-2.0 >= 2.4... yes
checking GLIB_CFLAGS... -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
checking GLIB_LIBS... -pthread -lgthread-2.0 -lglib-2.0
checking for libart-2.0 >= 2.1... yes
checking LIBART_CFLAGS... -I/usr/include/libart-2.0
checking LIBART_LIBS... -lart_lgpl_2
checking for XTestQueryExtension in -lXtst... no
configure: error: libXtst not found, required by java.awt.Robot
make[2]: *** [configure-target-libjava] Error 1


$ ls -la /usr/X11R6/lib/libXtst*
   14 Nov 15 08:01 /usr/X11R6/lib/libXtst.so -> libXtst.so.6.1
   14 Aug  1 23:06 /usr/X11R6/lib/libXtst.so.6 -> libXtst.so.6.1
27012 Nov 15 01:26 /usr/X11R6/lib/libXtst.so.6.1

config.log:
(...)
configure:13839: checking for XTestQueryExtension in -lXtst
configure:13874: /home/users/builder2/rpm/BUILD/gcc/obj-ppc-pld-linux/./gcc/xgcc -B/home/users/builder2/rpm/BUILD/gcc/obj-ppc-pld-linux/./gcc/ -B/usr/ppc-pld-linux/bin/ -B/usr/ppc-pld-linux/lib/ -isystem /usr/ppc-pld-linux/include -isystem /usr/ppc-pld-linux/sys-include -o conftest -O2 -O2 -ggdb conftest.c -lXtst   >&5
/usr/bin/ld: cannot find -lXtst
collect2: ld returned 1 exit status
configure:13880: $? = 1
(...)

i don't see a -L/usr/X11R6/lib in test.
Comment 1 Jonathan Smith 2005-12-21 02:49:37 UTC
I have this issue as well, but only with x86_64; x86 configures and compiles fine. x11 and gcc are both built with the same configure options between the archs.
Comment 2 Jonathan Smith 2005-12-21 02:51:04 UTC
oh, and i also get this on 4.0.2, the 4.0 weekly snapshots, and the 4.2 snapshots (sorry, i meant to say that in the first post)
Comment 3 Jonathan Smith 2006-02-21 20:30:43 UTC
http://gcc.gnu.org/ml/java/2005-08/msg00161.html

however, the proposed fix does not help me
Comment 4 Andrew Pinski 2006-10-16 15:40:41 UTC
*** Bug 29460 has been marked as a duplicate of this bug. ***
Comment 5 Dale Ranta 2006-10-16 15:53:38 UTC
powerpc-apple-darwin8.7.0 does not come with 64 bit libraries for x-windows - is there some way to turn of the 64 bit branch of the build ?
Comment 6 Jonathan Smith 2006-10-16 16:53:31 UTC
if are are using 4.2: http://people.rpath.com/~smithj/gcc-java-nomulti.patch
if 4.1.1: http://tinyurl.com/y37csd
Comment 7 Dale Ranta 2006-10-16 18:53:29 UTC
I tried installing the patch (the two patch files in comment #6 were identical) into 4.2 , but it failed -

[dranta:~/gfortran/gcc/libjava] dir% patch -p2 <gcc-java-nomulti.patch
patching file configure
Hunk #1 succeeded at 4892 (offset 309 lines).
patching file configure.ac
Hunk #1 succeeded at 209 (offset 36 lines).
patching file Makefile.in
Hunk #1 succeeded at 7510 with fuzz 1 (offset 1524 lines).
Hunk #2 FAILED at 8896.
1 out of 2 hunks FAILED -- saving rejects to file Makefile.in.rej
Comment 8 Jonathan Smith 2006-10-16 18:55:57 UTC
sorry about that. http://people.rpath.com/~smithj/gcc42-java-nomulti.patch
Comment 9 Tom Tromey 2006-10-16 19:00:20 UTC
You may want to try --disable-multilib.
Comment 10 Dale Ranta 2006-10-16 19:57:47 UTC
What does --disable-multilib do ?
Comment 11 Andrew Pinski 2006-10-16 20:00:14 UTC
(In reply to comment #10)
> What does --disable-multilib do ?
It disables all the creation of the multi arch libraries so only the default archeture is created for the libraries.
Comment 12 Jonathan Smith 2006-10-16 20:03:13 UTC
Be that as it may, there are plenty of cases where multilib is desired, just not for java. That should be an option.
Comment 13 Andrew Pinski 2006-10-16 20:10:47 UTC
(In reply to comment #12)
> Be that as it may, there are plenty of cases where multilib is desired, just
> not for java. That should be an option.

Not really, if you don't have the libraries, you should not be building multilib in general anyways.

Closing as invalid.
Comment 14 Jonathan Smith 2006-10-16 20:13:04 UTC
Java multilib is very difficult to bootstrap. For distros which require a clean bootstrap, yet want multilib support, having it without java is an acceptable compromise.
Comment 15 Andrew Pinski 2006-10-16 20:14:21 UTC
(In reply to comment #14)
> Java multilib is very difficult to bootstrap. For distros which require a clean
> bootstrap, yet want multilib support, having it without java is an acceptable
> compromise.

Is it?  You do first a C/C++ build and then build all the libraries which is needed for libjava and then do a full GCC build and then rebuild the libraries if really needed.
Comment 16 Dale Ranta 2006-10-16 20:18:47 UTC
The patch from comment #8 partly fails on a 4.2 tree created this afternoon -

[dranta:~/gfortran/gcc/libjava] dir% patch -p2 < gcc42-java-nomulti.patch
patching file Makefile.in
Hunk #1 FAILED at 9006.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.in.rej
patching file configure
Hunk #1 succeeded at 4892 (offset 309 lines).
patching file configure.ac
Hunk #1 succeeded at 209 (offset 36 lines).
[dranta:~/gfortran/gcc/libjava] dir%