[Top][All Lists]

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

Re: [Bug-gnubg] Compile: Solaris 9

From: Jim Segrave
Subject: Re: [Bug-gnubg] Compile: Solaris 9
Date: Fri, 8 Aug 2003 23:25:18 +0200
User-agent: Mutt/1.4.1i

On Fri 08 Aug 2003 (22:54 +0200), Holger wrote:
> At 02:23 08.08.2003 +0200, Jim Segrave wrote:
> >On Fri 08 Aug 2003 (00:50 +0200), Holger wrote:
> >Can you capture the output of the compile of gtk-multiview.c? I'd like
> >to see what the include path is there
> source='gtk-multiview.c' object='gtk-multiview.o' libtool=no \
> depfile='.deps/gtk-multiview.Po' tmpdepfile='.deps/gtk-multiview.TPo' \
> depmode=gcc3 /bin/bash ./depcomp \
> gcc -DHAVE_CONFIG_H -I. -I. -I. -I./lib  -I/usr/include/libxml2 -I./intl 
> -DLOCALEDIR=\"/home/pub/lib/gnubg-030808/share/locale\" 
> -I/usr/KDE/3.1/include 
> -I/usr/KDE/3.1/include/freetype2  -I/usr/python/include/python2.2 
> -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/include/glib-2.0 
> -I/usr/lib/glib-2.0/include    -I/home/pub/include    -v -g -O2 -c `test -f 
> 'gtk-multiview.c' || echo './'`gtk-multiview.c
> Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/specs
> Configured with: ../configure --disable-nls --with-as=/usr/ccs/bin/as 
> --with-ld=/usr/ccs/bin/ld
> Thread model: posix
> gcc version 3.3
>  /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3/cc1 -quiet -v -I. -I. -I. 
> -I./lib -I/usr/include/libxml2 -I./intl -I/usr/KDE/3.1/include 
> -I/usr/KDE/3.1/include/freetype2 -I/usr/python/include/python2.2 
> -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/include/glib-2.0 
> -I/usr/lib/glib-2.0/include -I/home/pub/include -MD gtk-multiview.d -MF 
> .deps/gtk-multiview.TPo -MP -MT gtk-multiview.o -D__GNUC__=3 
> -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -Dsparc -D__sparc__ -D__sparc 
> -D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc -DHAVE_CONFIG_H 
> -DLOCALEDIR="/home/pub/lib/gnubg-030808/share/locale" gtk-multiview.c 
> -quiet -dumpbase gtk-multiview.c -auxbase gtk-multiview -g -O2 -version -o 
> /var/tmp//cc2WFfIX.s
> GNU C version 3.3 (sparc-sun-solaris2.9)
>         compiled by GNU C version 3.3.
> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> ignoring nonexistent directory "NONE/include"
> ignoring nonexistent directory "/usr/local/sparc-sun-solaris2.9/include"
> ignoring duplicate directory "."
> ignoring duplicate directory "."
> #include "..." search starts here:
> #include <...> search starts here:
>  .
>  lib
>  /usr/include/libxml2
>  intl
>  /usr/KDE/3.1/include
>  /usr/KDE/3.1/include/freetype2
>  /usr/python/include/python2.2
>  /usr/include/gtk-2.0

This has been told to build with gtk-2 and is using the gtk-2 include
> the linking step being:
> /usr/ccs/bin/as: Sun WorkShop 6 update 2 Compiler Common 6.2 Solaris_9_CBE 
> 2001/04/02
> gcc  -v -g -O2   -o gnubg  gnubg.o getopt.o getopt1.o eval.o play.o 
> gnubgmodule.o -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm 

Here you've asked for gtk-2


> ld: Software Generation Utilities - Solaris Link Editors: 5.9-1.376
> Undefined                       first referenced
>  symbol                             in file
> XFlush                              gnubg.o  (symbol belongs to implicit 
> dependency /usr/lib/libX11.so.4)
> XEventsQueued                       gnubg.o  (symbol belongs to implicit 
> dependency /usr/lib/libX11.so.4)
> ld: fatal: Symbol referencing errors. No output written to gnubg

As you note later, there's no X11 libraries being pulled in, so this
isn't surprising. I wonder how configure got through its tests without
getting similar errors.

> >> gcc -DHAVE_CONFIG_H -I. -I. -I. -I./lib  -I/usr/include/libxml2 -I./intl
> >> -DLOCALEDIR=\"/home/pub/lib/gnubg-030807/share/locale\"
> >> -I/usr/KDE/3.1/include
> >> -I/usr/KDE/3.1/include/freetype2  -I/usr/python/include/python2.2
> >> -I/home/pub/lib/gtk+-1.2.10/include/gtk-1.2 -I/home/pub/lib/glib-
> >> 1.2.10/include/glib-1.2 -I/home/pub/lib/glib-1.2.10/lib/glib/include
> >> -I/usr/openwin/include  -I/home/pub/include    -g -O2 -c `test -f
> >> 'gtkoptions.c' || echo './'`gtkoptions.c

This is a totally different compiler invocation, this time asking for

I'm very confused. Some of these compiles are running gcc with gtk-2
paths, some with gtk-1.2 paths. When you re-ran configure to change
from one version of gtk to the other, did you do a 'make clean'? I
would have expected everything to be rebuilt because of the changes to
config.h, but if there are files that don't include it, the .o files
might not be rebuilt and you would see this gtk-2/gtk-1.2 conflict.

> If I edit Makefile after configure and add:
> gnubg_LDFLAGS = -lX11
> it links without problems.
> I'm not sure if Makefile.am should be changed since it seems to be just 
> this system. What is the best option to set it up? Just setting 
> LDFLAGS=-X11 before configure?

I'd do that.

% export LDFLAGS=-X11
% ./configure 2>&1 | tee configure.out
% make clean
% make 2>&1 | tee make.out

I do something like that under FreeBSD to get some weird libraries
in. One problem this caused was that doing something like this
prevented getting /usr/local/lib added to the Makefile link steps. I
ended up with 

export LDFLAGS="-lc_r -L/usr/local/lib -L/usr/X11R6/lib"

because trying to force -lc_r using LDFLAGS prevented configure from
adding /usr/local/lib and /usr/X11R6/lib. I had even worse problems
when compiling the 3d code and had to force about 3 libraries in
explicitly just to get it to work.

I think I'd recommend setting LDFLAGS, doing a configure for gtk-2,
doing a make clean and see what happens. I'm almost sure that you have
a mixture of .o files built from Makefiles with different configure

Jim Segrave           address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]