| Summary: | sys-apps/module-init-tools-0.9.14 fails to compile | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Lisa Seelye (RETIRED) <lisa> |
| Component: | [OLD] Core system | Assignee: | Martin Schlemmer (RETIRED) <azarah> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | andreas.w.simon, cretin, x86-kernel |
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
|
Description
Lisa Seelye (RETIRED)
2003-09-16 13:12:21 UTC
The same situation, but other error: gcc -march=athlon-xp -O3 -pipe -fomit-frame-pointer -Wunused -Wall -Wcast-align -o depmod depmod.o moduleops.o tables.o zlibsupport.o gcc -march=athlon-xp -O3 -pipe -fomit-frame-pointer -Wunused -Wall -Wcast-align -o modinfo modinfo.o zlibsupport.o /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/libgcc_eh.a(unwind-dw2-fde-glibc.o)(.text+0x1651): In function `_Unwind_Find_FDE': /var/tmp/portage/gcc-3.3.1-r1/work/gcc-3.3.1/gcc/unwind-dw2-fde-glibc.c:283: undefined reference to `dl_iterate_phdr' collect2: ld returned 1 exit status make: *** [insmod.static] Error 1 Portage 2.0.49-r4 (default-x86-1.4, gcc-3.3.1, glibc-2.3.2-r4, 2.6.0-test5) ================================================================= System uname: 2.6.0-test5 i686 AMD Athlon(tm) XP 3000+ ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs sandbox ccache nostrip" GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo" MAKEOPTS="-j2" 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 oss avi crypt cups encode foomaticdb gif jpeg libg++ libwww mad mikmod mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gdbm berkdb slang readline svga java X sdl gpm tcpd pam ssl perl python esd imlib oggvorbis gnome gtk motif opengl 3dnow sse mmx -apm -kde -qt acpi bonobo cdr dvd gtk2 tiff wmf jikes mozilla apache2 ipv6 alsa -arts cscope dga flash jack -tetex nptl" Lisa Marie: Try without -Os please. Or maybe with -march=i686.
Wojciech Milkowski: Known issue from 3.3.1 - supposed to be what -r2 also
should have fixed (did here actually =). Should be
hacked not to compile static.
Fails without -Os too Fails without -Os and while using -march=i686 -pipe I get the same error as in comment #1 when compiling with gcc-3.3.1-r1 but not with gcc-3.3.1-r2. This problem applies to sys-apps/module-init-tools-0.9.15_pre1 as well. I get the errors in comment #1, but only when compiling using hardened-gcc. After hardened-gcc -R it compiles that bit fine. (This is with gcc 3.3.1-r1) An email I sent, only found this bug after I sent it! Martin, As I remember from http://gcc.gnu.org/ml/gcc/2003-08/msg00664.html you had problems statically linking binaries with the new glibc. I have since found a sort of quick fix, it is the following: Edit the file: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/specs and in the last section: *link_command: %{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %l %{pie:-pie} %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}} %{static:-lc} %{L*} %(link_libgcc) %o %{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}} %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}} edit it so it has "%{static:-lc}" not "%{static:}" as it normally has. ( for me anyway) Now I can compile static binaries again without the undefined reference errors ... Stefan Stefan's fix works for me also. Stephan, yes, it does work. Also work if you add '-lc' to the libgcc link stuff (first directive for static linking). I however do not like this, so tried an alternative that would not always just stick libc in there (and worked fine here, but failed for others badly). Anyhow, -r3 should fix this (if you do not use propolice, as this could still break static linking in some weird ways). |