Wireshark-users: [Wireshark-users] test case in configure script fails for gtk on Solaris with gc

From: "Dr. David Kirkby" <david.kirkby@xxxxxxxxxx>
Date: Wed, 06 Feb 2008 22:48:15 +0000
I have a Sun Blade 2000 running Solaris 10

# cat /etc/release
                      Solaris 10 8/07 s10s_u4wos_12b SPARC
          Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
                       Use is subject to license terms.
                           Assembled 16 August 2007



and are trying to build wireshark-0.99.7, but have hit a few issues.

1) Trying to configure with gcc (/usr/sfw/bin/gcc 3.4.3 which came with Solaris and 3.4.5 from Blastwave) I find it bombs out very quickly with:


./configure CC=/opt/csw/gcc3/bin/gcc CXX=/opt/csw/gcc3/bin/g++



checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 2.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the *** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error: GTK+ isn't available, so Wireshark can't be compiled



This seems odd, since they are present, as can be seen if I call pkg-config from the command line.

kestrel /tmp/wireshark-0.99.7 % /usr/bin/pkg-config  glib-2.0 --modversion
2.4.1
kestrel /tmp/wireshark-0.99.7 % /usr/bin/pkg-config gtk+-2.0 --modversion
2.4.9

Looking at config.log, it looks to me as if the compiler is complaining about an invalid option 't'.


configure:22616: result: no
configure:22685: checking if profile builds must be generated
configure:22698: result: no
configure:22746: checking for pkg-config
configure:22764: found /usr/bin/pkg-config
configure:22777: result: /usr/bin/pkg-config
configure:22799: checking for GTK+ - version >= 2.0.0
configure:22919: /opt/csw/gcc3/bin/gcc -o conftest -D_U_="__attribute__((unused))" -g -O2 -Wall -W -Wdeclaration-after-statement -Wendif-labels -Wpointer-arith -Wno-return-type -DFUNCPROTO=15 -I/usr/local/include -mt -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/openwin/include -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/local/include -L/usr/local/lib -R/usr/local/lib conftest.c -mt -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lmlib -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -R/usr/lib:/usr/openwin/lib:/usr/local/lib:/usr/local/lib/X11:/usr/local/X11R6.4/lib:/usr/ucblib:/opt/hpnpl/lib:/opt/csw/lib >&5
cc1: error: invalid option `t'
cc1: error: invalid option `t'
configure:22922: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""




I've tried building with Suns compiler and get a lot further, as it compiles hundreds of files OK before generating an error(s). The errors I get there will be reported in another email, as they are quite different to this which occurs during the configure process.