Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 117523 - uclibc++ fails to compile due to missing dl_iterate_phdr()
Summary: uclibc++ fails to compile due to missing dl_iterate_phdr()
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on: 276246
Blocks:
  Show dependency tree
 
Reported: 2006-01-02 17:56 UTC by Stefan de Konink
Modified: 2009-10-13 11:15 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 Stefan de Konink 2006-01-02 17:56:05 UTC
i686-gentoo-linux-uclibc-ranlib libuClibc++.a
i686-gentoo-linux-uclibc-gcc -Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc -Wl,-z,defs -nodefaultlibs -shared -Wl,-soname,libuClibc++.so.0 -Wl,-s -o libuClibc++-0.1.12.so algorithm.o bitset.o char_traits.o complex.o del_op.o del_opnt.o del_opv.o del_opvnt.o deque.o exception.o fstream.o func_exception.o iomanip.o ios.o iostream.o istream.o iterator.o list.o locale.o map.o new_handler.o new_op.o new_opnt.o new_opv.o new_opvnt.o numeric.o ostream.o queue.o set.o sstream.o stack.o stdexcept.o streambuf.o string.o utility.o valarray.o vector.o abi/abi.o abi/libsupc/cp-demangle.o abi/libsupc/eh_alloc.o abi/libsupc/eh_aux_runtime.o abi/libsupc/eh_catch.o abi/libsupc/eh_exception.o abi/libsupc/eh_globals.o abi/libsupc/eh_personality.o abi/libsupc/eh_term_handler.o abi/libsupc/eh_terminate.o abi/libsupc/eh_throw.o abi/libsupc/eh_type.o abi/libsupc/eh_unex_handler.o abi/libsupc/guard.o abi/libsupc/tinfo.o abi/libsupc/tinfo2.o abi/libsupc/vec.o abi/libsupc/vterminate.o abi/libgcc_eh/gthr-gnat.o abi/libgcc_eh/unwind-c.o abi/libgcc_eh/unwind-dw2-fde-glibc.o abi/libgcc_eh/unwind-dw2.o abi/libgcc_eh/unwind-sjlj.o  -L/usr/lib/gcc/i686-gentoo-linux-uclibc/3.4.5/ -lc -lgcc
abi/libgcc_eh/unwind-dw2-fde-glibc.o: In function `_Unwind_Find_FDE':
/var/tmp/portage/gcc-3.4.5/work/gcc-3.4.5/gcc/unwind-dw2-fde-glibc.c:281: undefined reference to `dl_iterate_phdr'
collect2: ld returned 1 exit status
make[1]: *** [libuClibc++-0.1.12.so] Error 1
make[1]: Leaving directory `/var/tmp/portage/uclibc++-0.1.12/work/uClibc++/src'
make: *** [all] Error 2

Portage 2.1_pre3-r1 (uclibc/x86/2005.1, gcc-3.4.5, uclibc-0.9.28-r0, 2.6.14-gentoo-r1 x86_64)
=================================================================
System uname: 2.6.14-gentoo-r1 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.0_pre12
dev-lang/python:     2.3.4-r1, 2.4.2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-gentoo-linux-uclibc"
CFLAGS="-march=athlon-xp -Os -fomit-frame-pointer -pipe"
CHOST="i686-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -Os -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distlocks fixpackages nodoc noinfo noman sandbox sfperms strict"
GENTOO_MIRRORS="ftp://192.168.1.2/ http://distfiles.gentoo.org/"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 bitmap-fonts bzip2 expat ncurses readline sqlite truetype-fonts type1-fonts uclibc udev zlib elibc_uclibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 1 Stefan de Konink 2006-02-02 13:48:50 UTC
Since changing the Rules.mak:

LDFLAGS:=-Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc -Wl,-z,defs

to 

LDFLAGS:=

makes the library 'compile'. I wonder if it can be fixed this way around, instead of GCC fixing. http://sourceware.org/ml/crossgcc/2004-01/msg00026.html
Comment 2 Peter S. Mazinger 2006-02-02 14:58:39 UTC
Something is wrong w/ gcc, gcc shouldn't have used unwind-dw2-fde-glibc.c, you
can check this by running ar t libgcc_eh.a (the object shouldnt be there, only
unwind-dw2-fde.o). uClibc++ does not have own implementation of stuff in
libgcc_eh.a and libsupc++.a, so it copies them into libuClibc++.so from the
gcc version used for compiling. Your gcc is using the glibc unwinding code because
toolchain.eclass is buggy (SJLJ exceptions are not enabled) and/or the gcc uclibc
patch (*100-*) is incorrect (it should disable the use of the glibc version of
unwinding code). The SJLJ exceptions should stay there for uClibc until .29 is
released (2 features will change then their defaults to be more like glibc)
Comment 3 Stefan de Konink 2006-02-02 15:05:18 UTC
I installed GCC 3.4.5 again this evening, but 3.3.6 does work without problems to compile uclibc++.

But when I get it installed (removing the LDFLAGS or lowering gcc version) it seems to have a different issue:

g++-uc 
/usr/lib/gcc/i486-gentoo-linux-uclibc/3.4.5/../../../crt1.o: In function `_start':
crt1.S:(.text+0x27): undefined reference to `main'
collect2: ld returned 1 exit status

Tested for the SVN version of uclibc++ (ebuild) or the 'normal' version. The reason why I need this SVN version are 3 bugs that came up in the current version.
Comment 4 Stefan de Konink 2006-02-02 15:09:42 UTC
ar t libgcc_eh.a 
unwind-dw2.o
unwind-dw2-fde-glibc.o
unwind-sjlj.o
gthr-gnat.o
unwind-c.o

So thats why that issue is in for 3.4.5, and not for 3.3.6

ar t libgcc_eh.a 
unwind-dw2.o
unwind-dw2-fde.o
unwind-sjlj.o
unwind-c.o
Comment 5 Stefan de Konink 2006-03-15 07:32:04 UTC
Even with the new version issue still exists. Hope assignement can be extended to gcc people.

zwartepiet 3.4.5 # g++-uc 
/usr/lib/gcc/i586-gentoo-linux-uclibc/3.4.5/../../../crt1.o: In function `_start':
crt1.S:(.text+0x27): undefined reference to `main'
collect2: ld returned 1 exit status

zwartepiet 3.4.5 #  ar t libgcc_eh.a
unwind-dw2.o
unwind-dw2-fde.o
unwind-sjlj.o
gthr-gnat.o
unwind-c.o

Portage 2.1_pre6-r2 (uclibc/x86/2005.1, gcc-3.4.5, uclibc-0.9.28-r0, 2.6.15-gentoo i686)
=================================================================
System uname: 2.6.15-gentoo i686 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.0_pre16
ccache version 2.4 [enabled]
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i586-gentoo-linux-uclibc"
CFLAGS="-march=i586 -Os -fomit-frame-pointer -pipe"
CHOST="i586-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d"
CXXFLAGS="-march=i586 -Os -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distlocks fixpackages metadata-transfer nodoc noinfo noman sandbox sfperms strict"
GENTOO_MIRRORS="ftp://192.168.1.2/ http://distfiles.gentoo.org/"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 bitmap-fonts dri ipv6 minimal ncurses readline snmp truetype-fonts type1-fonts uclibc zlib elibc_uclibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 6 solar (RETIRED) gentoo-dev 2006-05-24 14:45:18 UTC
Adding Peter to the CC: list. (only person I know that correctly uses uclibc++)
Comment 7 Peter S. Mazinger 2006-05-24 15:12:26 UTC
is this an issue with 0.2.0 as well?
be aware that if you built uClibc++ w/ one version of gcc, then you need to
compile all apps using uClibc++ w/ the same g++ version (because uClibc++
imports parts of libgcc_eh/libsupc++ into the shared lib and that won't be
compatible w/ any other version of gcc
Comment 8 Stefan Hellermann 2008-01-24 16:00:01 UTC
I hit the same problem with uclibc++-0.2.2-r1 and gcc-4.2.2

$ emerge --info
Portage 2.1.4 (uclibc/x86, gcc-4.2.2, uclibc-0.9.28.3-r2, 2.6.24-rc8-git3 i686)
=================================================================
System uname: 2.6.24-rc8-git3 i686 AMD Athlon(tm) 64 X2 Dual Core Processor 5200+
Timestamp of tree: Thu, 24 Jan 2008 08:46:01 +0000
app-shells/bash:     3.2_p33
dev-lang/python:     2.5.1-r5
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i386-gentoo-linux-uclibc"
CFLAGS="-O2 -march=pentium3 -mtune=k8 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs"
CHOST="i386-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium3 -mtune=k8 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs"
DISTDIR="/var/db/distfiles"
FEATURES="autoconfig distlocks metadata-transfer nodoc noinfo noman parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/"
MAKEOPTS="-j3 -s"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/var/db/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="minimal unicode x86" ELIBC="uclibc" KERNEL="linux" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2009-10-13 11:15:44 UTC
Removed from tree (see bug 276246).