Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't compile GTK-based apps
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
lduperval
Apprentice
Apprentice


Joined: 14 Jun 2003
Posts: 189

PostPosted: Wed May 04, 2005 4:56 pm    Post subject: Can't compile GTK-based apps Reply with quote

Hi,

Whenever I try to compile any application that uses GTK+, I get this error:

Code:

configure:21062: checking for gtk-config
configure:21080: found /usr/bin/gtk-config
configure:21093: result: /usr/bin/gtk-config
configure:21101: checking for GTK - version >= 1.2.2
configure:21207: i686-pc-linux-gnu-gcc -o conftest -O3 -mcpu=pentium4 -march=pentium4 -funroll-loops -pipe -Wl,--as-needed -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT -I/usr/X11R6/include   conftest.c -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk -rdynamic -lgmodule -lgthread -lglib -lpthread -ldl -lXi -lXext -lX11 -lm  >&5
configure:21210: $? = 0
configure:21212: ./conftest
./conftest: symbol lookup error: /usr/lib/libgtk-1.2.so.0: undefined symbol: gdk_root_window


I tried recompiling but I still get the error. If I try to run the configure script outside of the emerge environment, it works correctly.

Can anyone explain to me what the problem could be?

Thanks,

L
Back to top
View user's profile Send private message
golloza
Guru
Guru


Joined: 14 Mar 2004
Posts: 427

PostPosted: Wed May 04, 2005 5:14 pm    Post subject: Reply with quote

Output of ldd /usr/lib/libgtk-1.2.so.0, please.
Back to top
View user's profile Send private message
lduperval
Apprentice
Apprentice


Joined: 14 Jun 2003
Posts: 189

PostPosted: Wed May 04, 2005 5:37 pm    Post subject: Reply with quote

Sorry:

Code:

root@laptop ~ # ldd /usr/lib/libgtk-1.2.so.0
        linux-gate.so.1 =>  (0xffffe000)
        libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0xb7e84000)
        libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0xb7e5f000)
        libdl.so.2 => /lib/libdl.so.2 (0xb7e5b000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0xb7e53000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb7e44000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb7d7b000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb7d58000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7c46000)
        /lib/ld-linux.so.2 (0x80000000)


emerge --info:

Code:

Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.3.5-20050130, glibc-2.3.4.20041102-r1, 2.6.9-gentoo-r6 i686)
=================================================================
System uname: 2.6.9-gentoo-r6 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.40GHz
Gentoo Base System version 1.6.11
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Feb 20 2005, 11:55:37)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-apps/sandbox:    [Not Present]
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.8.5-r3, 1.5, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=pentium4 -march=pentium4 -funroll-loops -pipe -Wl,--as-needed"CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mcpu=pentium4 -march=pentium4 -funroll-loops -pipe -Wl,--as-needed"
DISTDIR="/mnt/share/gentoo/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS=" http://mirror.clarkson.edu/pub/distributions/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/mnt/share/gentoo/packages"
PORTAGE_TMPDIR="/mnt/share/gentoo/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/mnt/share/ebuilds"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aalib acpi adns apache2 apm arts avi berkdb bitmap-fonts bonobo cdr crypt cups curl dvd emboss encode esd fam firebird flac foomaticdb fortran gd gda gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imagemagick imlib innodb jack java jikes jpeg junit libg++ libwww live mad mikmod motif mozilla mp3 mpeg mysql nas ncurses nls nptl ogg oggvorbis opengl oss pam pdflib perl png postgres ppds python qt quicktime readline samba sdl slang speex spell sqlite ssl svga tcl tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts usb videos vorbis xine xml xml2 xmms xv zlib video_cards_i810 userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS


L
Back to top
View user's profile Send private message
ag
n00b
n00b


Joined: 09 Oct 2003
Posts: 5

PostPosted: Sat May 28, 2005 3:47 pm    Post subject: Reply with quote

CFLAGS="-march=i686" helped
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Sat May 28, 2005 3:59 pm    Post subject: Reply with quote

Moved from Portage & Programming -- using -as-needed in your LDFLAGS (or appending it to your CFLAGS) will break things.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum