Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 22936

Summary: Mozilla (1.3-r2) compilation failed (missing library in a linking phase)
Product: Gentoo Linux Reporter: Mathieu MILLET <htam>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: Alpha   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Mathieu MILLET 2003-06-16 11:17:10 UTC
I try to compile mozilla 1.3-r2 and the compilation failed with the following error:
nsDeviceContextGTK.o(.text._Z9GetXftDPIv+0x2c): In function `GetXftDPI()':
: undefined reference to `XGetDefault'
nsDeviceContextGTK.o(.text._Z9GetXftDPIv+0x30): In function `GetXftDPI()':
: undefined reference to `XGetDefault'
collect2: ld returned 1 exit status
make[1]: *** [libgfx_gtk.so] Error 1
make[1]: Leaving directory `/home/var/tmp/portage/mozilla-1.3-r2/work/mozilla/gfx/src/gtk'
make: *** [all] Error 2

As I find, the XGetDefault function is provided by the file libX11.a|so (meaning linked with a -lX11) and it seems that the linking command doesn't reference that library.

Reproducible: Always
Steps to Reproduce:
1.emerge mozilla
2.
3.
Actual Results:  
compilation failed at this step:
g++ -I/usr/X11R6/include -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-long-long -mcpu=ev56 -pipe -Wno-deprecated -mieee -fshort-wchar -pthread -pipe  -DNDEBUG -DTRIMMED -ffunction-sections -O2  -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/X11R6/include -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -fPIC -shared -Wl,-h -Wl,libgfx_gtk.so -o libgfx_gtk.so  nsPrintdGTK.o nsDeviceContextGTK.o nsDeviceContextSpecFactoryG.o nsDeviceContextSpecG.o nsDrawingSurfaceGTK.o nsGfxFactoryGTK.o nsGraphicsStateGTK.o nsImageGTK.o nsGCCache.o nsRenderingContextGTK.o nsScreenGtk.o nsScreenManagerGtk.o nsPrintOptionsGTK.o nsFontMetricsUtils.o nsAntiAliasedGlyph.o nsFontFreeType.o nsFT2FontNode.o nsFT2FontCatalog.o nsX11AlphaBlend.o nsXFontAAScaledBitmap.o nsXFontNormal.o nsFontMetricsGTK.o nsGdkUtils.o nsFontMetricsXft.o nsRegionGTK2.o     -Wl,--version
nsDeviceContextGTK.o(.text._Z9GetXftDPIv+0x2c): In function `GetXftDPI()':
: undefined reference to `XGetDefault'
nsDeviceContextGTK.o(.text._Z9GetXftDPIv+0x30): In function `GetXftDPI()':
: undefined reference to `XGetDefault'
collect2: ld returned 1 exit status
make[1]: *** [libgfx_gtk.so] Error 1
make[1]: Leaving directory `/home/var/tmp/portage/mozilla-1.3-r2/work/mozilla/gfx/src/gtk'
make: *** [all] Error 2

Expected Results:  
No error

Portage 2.0.48-r1 (default-alpha-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.20-raid2 alpha EV56
GENTOO_MIRRORS="ftp://gentoo.irisa.fr/pub/gentoo-sources http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="alpha crypt cups encode gif jpeg libg++ mikmod ncurses nls oss pdflib png quicktime sdl spell truetype xml2 xmms xv zlib gnome-libs gdbm berkdb slang readline tetex ruby mysql X gpm tcpd pam libwww ssl perl python esd imlib oggvorbis gnome gtk motif opengl ldap acl alsa avi doc dvd evo flash gb gd gtk2 gtkhtml guile imap innodb ipv6 kerberos libgda mcal mdb mozaccess mozcalendar mozilla mozinterfaceinfo mozirc mozp3p mozxmlterm mpeg pda plotutils samba sasl scanner snmp tcltk tiff usb vim-with-x wmf xfs xinerama xml xosd -kde -qt"
COMPILER="gcc3"
CHOST="alpha-unknown-linux-gnu"
CFLAGS="-mcpu=ev56 -O3 -pipe "
CXXFLAGS="-mcpu=ev56 -O3 -pipe "
ACCEPT_KEYWORDS="alpha ~alpha"
MAKEOPTS=""
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="ccache"
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2003-06-16 15:21:06 UTC

*** This bug has been marked as a duplicate of 22935 ***