Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66836 - emerge gnome-libs generates Makefiles that are missing needed "-ldl -lpthread"
Summary: emerge gnome-libs generates Makefiles that are missing needed "-ldl -lpthread"
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: x86 Linux
: Lowest normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 70466 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-08 20:29 UTC by Stephen Anderson
Modified: 2005-07-15 17:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Anderson 2004-10-08 20:29:59 UTC
When I run "emerge gnome-libs", I get these errors in the output:

ranlib .libs/libgnome.a
creating libgnome.la
(cd .libs && rm -f libgnome.la && ln -s ../libgnome.la libgnome.la)
/bin/sh ../libtool --mode=link gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -I/usr/include/db1 -Wall -Wunused   -o gnome-dump-metadata -L/usr/lib -lglib gnome-dump.o libgnome.la ../support/libgnomesupport.la -L/usr/lib -lesd -laudiofile -lm -lasound -L/usr/lib -laudiofile -lm -ldb1 -L/usr/lib -lglib   -lz -lm
/bin/sh ../libtool --mode=link gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -I/usr/include/db1 -Wall -Wunused   -o gnome-moz-remote  gnome-moz-remote.o libgnome.la ../support/libgnomesupport.la -L/usr/lib -lesd -laudiofile -lm -lasound -L/usr/lib -laudiofile -lm -ldb1 -L/usr/lib -lglib  -L/usr/X11R6/lib -lSM -lICE -lXext -lX11   -lz -lm
gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -I/usr/include/db1 -Wall -Wunused -o .libs/gnome-dump-metadata gnome-dump.o  -L/usr/lib ./.libs/libgnome.so ../support/.libs/libgnomesupport.so /usr/lib/libesd.so -lm /usr/lib/libasound.a /usr/lib/libaudiofile.so -lm -ldb1 /usr/lib/libglib.so -lz -lm
/usr/lib/libesd.so: undefined reference to `pthread_create'
/usr/lib/libesd.so: undefined reference to `dlclose'
/usr/lib/libesd.so: undefined reference to `dlopen'
/usr/lib/libesd.so: undefined reference to `dlsym'
/usr/lib/libesd.so: undefined reference to `pthread_mutex_trylock'
/usr/lib/libesd.so: undefined reference to `pthread_join'
collect2: ld returned 1 exit status
make[2]: *** [gnome-dump-metadata] Error 1
make[2]: *** Waiting for unfinished jobs....
gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -I/usr/include/db1 -Wall -Wunused -o .libs/gnome-moz-remote gnome-moz-remote.o  ./.libs/libgnome.so ../support/.libs/libgnomesupport.so -L/usr/lib /usr/lib/libesd.so -lm /usr/lib/libasound.a /usr/lib/libaudiofile.so -lm -ldb1 /usr/lib/libglib.so -L/usr/X11R6/lib -lSM -lICE -lXext -lX11 -lz -lm
/usr/lib/libesd.so: undefined reference to `pthread_create'
/usr/lib/libesd.so: undefined reference to `pthread_mutex_trylock'
/usr/lib/libesd.so: undefined reference to `pthread_join'
collect2: ld returned 1 exit status
make[2]: *** [gnome-moz-remote] Error 1
make[2]: Leaving directory `/var/tmp/portage/gnome-libs-1.4.2/work/gnome-libs-1.4.2/libgnome'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/gnome-libs-1.4.2/work/gnome-libs-1.4.2'
make: *** [all-recursive-am] Error 2

!!! ERROR: gnome-base/gnome-libs-1.4.2 failed.
!!! Function src_compile, Line 69, Exitcode 2
!!! (no error message)


I reinstalled everything from scratch, and got the same error again.  The full reinstall made no difference.

Other than trying to get past this point for weeks, I'm very new to Gentoo, so if I'm doing something wrong, I'll be happy to learn.  Thanks!

Reproducible: Always
Steps to Reproduce:
1. run emerge gnome-libs



Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.3.20040420-r1,
2.6.8-gentoo-r3)
=================================================================
System uname: 2.6.8-gentoo-r3 i686 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /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/mozilla/defaults/pref /usr/share/config
/var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/
ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
http://ftp-mirror.internap.com/pub/gentoo/ http://gentoo.binarycompass.org"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X alsa apm arts avi berkdb bitmap-fonts bzlib cdr crypt cups doc dvd dvdr
encode esd exif foomaticdb ftp gdbm gif gnome gphoto2 gpm gtk gtk2 hardened
hardenedphp imagemagick imap imlib ipv6 java jpeg junit libg++ libwww mad
maildir mikmod mime mmx mng motif mozilla mpeg mysql mysqli ncurses nls
offensive oggvorbis opengl oss pam pdflib perl php png python quicktime readline
rplay ruby samba sdl slang soap spell spl sse ssl stroke svga tcltk tcpd tidy
tiff truetype videos x86 xine xml xml2 xmlrpc xmms xprint xv zlib"
Comment 1 foser (RETIRED) gentoo-dev 2004-10-10 14:16:32 UTC
somehow it doesn't include the pthread libs, i don't know why.

I do know that you run x86 profile on an amd64 machine & since i haven't seen this before i cannot help myself when i think that is related somehow.

I'm actually very much inclined to close this for that reason, cause i really don't want to spend much time figuring out possible weird issues related to an ancient lib.
Comment 2 foser (RETIRED) gentoo-dev 2004-10-10 14:20:30 UTC
not fixed..
Comment 3 Stephen Anderson 2004-10-10 19:25:44 UTC
I'm really new to Gentoo, so it is very likely I'm doing something wrong here.

Comments on several forum threads lead me to believe that the code would be more stable, and I would suffer fewer headaches going with x86 as the architecture, instead of amd64.  Are some of my make.conf settings counteracting that choice?

If that's not a path for me to pursue, should I try a replacement threads package like NPTL?

Any advice, or pointers to useful doc, or forum threads, is welcome.  Anything to get Gentoo working!

Thanks!
-Steve-
Comment 4 foser (RETIRED) gentoo-dev 2004-10-11 04:02:26 UTC
what is the output of 'glib-config --cflags --libs gthread' ?

I think your glib is for some reason compiled incorrectly ..

what is the ouput of 'qpkg -l glib-1' (needs gentoolkit ) ?
Comment 5 Stephen Anderson 2004-10-11 06:30:46 UTC
-I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT
-L/usr/lib -lgthread -lglib -lpthread
Comment 6 Stephen Anderson 2004-10-11 19:06:34 UTC
Oops!  Sorry I missed part of what you wanted.  This should be better:

# glib-config --cflags --libs gthread
-I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT
-L/usr/lib -lgthread -lglib -lpthread

# qpkg -l glib-1
dev-libs/glib-1.2.10-r5 *
CONTENTS:
/usr
/usr/bin
/usr/bin/glib-config
/usr/lib
/usr/lib/glib
/usr/lib/glib/include
/usr/lib/glib/include/glibconfig.h
/usr/lib/libglib.a
/usr/lib/libgmodule.la
/usr/lib/libgmodule.so -> libgmodule-1.2.so.0.0.10 1097443948
/usr/lib/libgmodule-1.2.so.0.0.10
/usr/lib/libgthread-1.2.so.0.0.10
/usr/lib/libgthread.a
/usr/lib/pkgconfig
/usr/lib/pkgconfig/gthread.pc
/usr/lib/pkgconfig/glib.pc
/usr/lib/pkgconfig/gmodule.pc
/usr/lib/libglib.la
/usr/lib/libglib.so -> libglib-1.2.so.0.0.10 1097443948
/usr/lib/libgthread-1.2.so.0 -> libgthread-1.2.so.0.0.10 1097443948
/usr/lib/libglib-1.2.so.0.0.10
/usr/lib/libglib-1.2.so.0 -> libglib-1.2.so.0.0.10 1097443948
/usr/lib/libgthread.la
/usr/lib/libgthread.so -> libgthread-1.2.so.0.0.10 1097443948
/usr/lib/libgmodule.a
/usr/lib/libgmodule-1.2.so.0 -> libgmodule-1.2.so.0.0.10 1097443948
/usr/share
/usr/share/doc
/usr/share/doc/glib-1.2.10-r5
/usr/share/doc/glib-1.2.10-r5/html
/usr/share/doc/glib-1.2.10-r5/html/docs
/usr/share/doc/glib-1.2.10-r5/html/docs/glib_toc.html
/usr/share/doc/glib-1.2.10-r5/html/docs/glib.html
/usr/share/doc/glib-1.2.10-r5/README.win32.gz
/usr/share/doc/glib-1.2.10-r5/README.gz
/usr/share/doc/glib-1.2.10-r5/NEWS.gz
/usr/share/doc/glib-1.2.10-r5/INSTALL.gz
/usr/share/doc/glib-1.2.10-r5/AUTHORS.gz
/usr/share/doc/glib-1.2.10-r5/ChangeLog.gz
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/glib-config.1.gz
/usr/share/info
/usr/share/info/glib.info.gz
/usr/share/aclocal
/usr/share/aclocal/glib.m4
/usr/include
/usr/include/glib-1.2
/usr/include/glib-1.2/gmodule.h
/usr/include/glib-1.2/glib.h
Comment 7 Stephen Anderson 2004-10-13 12:10:13 UTC
Is it possible this is the same bug referred to in the "Changes" notes for glibc 2.3.4.20041006?

Changes:
"13 Oct 2004; Travis Tilley <lv@gentoo.org> glibc-2.3.4.20040808-r1.ebuild,
glibc-2.3.4.20041006.ebuild:
it seems the strange libpthread-not-installed bug was an ebuild quirk and not
a portage quirk. it should hopefully be fixed now. i've also added a safety
function to 2.3.4.20040808 and 2.3.4.20041006 that will prevent glibc from
installing if libpthread is missing, which will likely be expanded further in
the future. re-keyworded 2.3.4.20041006 ~amd64."
Comment 8 foser (RETIRED) gentoo-dev 2004-10-13 14:23:50 UTC
could well be, although the reporters glibc is not at that exact version.

@ lv : is this a glibc problem ?
Comment 9 Stephen Anderson 2004-10-16 14:15:30 UTC
OK, I've narrowed this down some more on my own.

My pthreads library appears to be fine.  I can fix the problem by hand on my machine by just doing this:

cd /var/tmp/portage/gnome-libs-1.4.2/work/gnome-libs-1.4.2/libgnome
gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -I/usr/include/db1 -Wall -Wunused -o .libs/gnome-dump-metadata gnome-dump.o  -L/usr/lib ./.libs/libgnome.so ../support/.libs/libgnomesupport.so /usr/lib/libesd.so -lm /usr/lib/libasound.a /usr/lib/libaudiofile.so -lm -ldb1 /usr/lib/libglib.so -lz -lm -ldl -lpthread

Note addition of "-ldl -lpthread" at the end of the command.

Continuing to run make in that directory, and then running make all-recursive in the parent directory reveals that this same problem occurs for many Makefile entries.  Adding the desired "-ldl -lpthread" entries at the end of the "LIBS=..." Makefile entries in each of the subfolders seems to allow the compilation to succeed.

How do I fix Makefile.am, et al in order to make the fix permanent?  Changes to Makefile files just get overwritten.

Also, this bug is keeping me from using Gentoo for anything other than trying to fix this problem.  Any possibility the priority could be upped from P5 if I can help whoever works on it?

Thanks!
-Steve-
Comment 10 Stephen Anderson 2004-10-16 14:18:18 UTC
Also, I've changed my system a fair amount.  Here's my new emerge info output:

Portage 2.0.50-r11 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20041006-r0, 2.6.8-gentoo-r3)
=================================================================
System uname: 2.6.8-gentoo-r3 i686 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.4.16
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /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/mozilla/defaults/pref /usr/share/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/ ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp-mirror.internap.com/pub/gentoo/ http://gentoo.binarycompass.org"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups encode esd f77 foomaticdb gdbm gif gnome gpm gtk gtk2 imlib ipv6 java jpeg libg++ libwww mad mikmod motif mozilla mpeg mysql ncurses nls nptl oggvorbis opengl oss pam pdflib perl png python quicktime readline ruby sdl slang spell ssl svga tcltk tcpd truetype x86 xml2 xmms xprint xv zlib"
Comment 11 Stephen Anderson 2004-10-16 15:07:55 UTC
Is it possible that libesd.so is the cause, and SHOULD contain a reference to libpthread?

# ldd /usr/lib/libesd.so
        linux-gate.so.1 =>  (0xffffe000)
        libaudiofile.so.0 => /usr/lib/libaudiofile.so.0 (0x400ef000)
        libm.so.6 => /lib/tls/libm.so.6 (0x40120000)
        libc.so.6 => /lib/tls/libc.so.6 (0x40143000)
        /lib/ld-linux.so.2 (0x80000000)

marienz on the #gentoo IRC seems to think that this is the cause of my problems...
Comment 12 Stephen Anderson 2004-10-16 16:21:38 UTC
OK.  This command allows me to emerge gnome-libs:

LDFLAGS="-lpthread -ldl" emerge gnome-libs

Is this a solution, or just a band-aid?

I can move forward (FINALLY!!!!), but was all of this just the symptom of something else wrong?

Also, should a more permanent, less patchwork fix be put in place?

Thanks!
-Steve-
Comment 13 foser (RETIRED) gentoo-dev 2004-10-27 08:50:24 UTC
this could well have been a bug with a glibc version, try upgrading your glibc & rebuilding.
Comment 14 foser (RETIRED) gentoo-dev 2004-11-08 08:46:25 UTC
*** Bug 70466 has been marked as a duplicate of this bug. ***
Comment 15 Stefan Schweizer (RETIRED) gentoo-dev 2004-11-08 08:56:22 UTC
We could add use ntpl && LDFLAGS="${LDFLAGS} -lpthread -ldl" in the ebuild.
Is this a good solution? Can we do it that way? any other solution?
Comment 16 foser (RETIRED) gentoo-dev 2004-11-08 08:59:40 UTC
it's a workaround, my problem with that is that nobody really knows why it is suddenly failing and only for a few users.
Comment 17 John N. Laliberte (RETIRED) gentoo-dev 2005-07-03 08:16:03 UTC
reporter: do you still have to use a workaround to emerge gnome-libs? ( ie, with
newer version of glibc is it okay ? )
Comment 18 John N. Laliberte (RETIRED) gentoo-dev 2005-07-15 17:38:51 UTC
no response from reporter, most likely a problem with glibc that has been
resolved in a newer version ( or a local issue ).