Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163855 - sys-apps/memtest86+-1.70 fails to link w/ >=binutils-2.17.50.0.10 and doesn't respect ${CFLAGS,CC,AS}
Summary: sys-apps/memtest86+-1.70 fails to link w/ >=binutils-2.17.50.0.10 and doesn't...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-26 02:17 UTC by Volker Hemmann
Modified: 2007-01-27 14:54 UTC (History)
2 users (show)

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


Attachments
the build log mentioned in the error (build.log,3.30 KB, text/plain)
2007-01-26 02:18 UTC, Volker Hemmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Hemmann 2007-01-26 02:17:49 UTC
updating memtest86+ fails with this error:
gcc -c -Wall -m32 -march=i486 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector -fPIC dmi.c
gcc -E -traditional bootsect.S -o bootsect.s
gcc -E -traditional setup.S -o setup.s
as -32 -o head.o head.s
as -32 -o bootsect.o bootsect.s
as -32 -o setup.o setup.s
ld --warn-constructors --warn-common -static -T memtest_shared.lds -o memtest_shared head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o linuxbios.o memsize.o pci.o controller.o extra.o random.o dmi.o && \
        ld -shared -Bsymbolic -T memtest_shared.lds -o memtest_shared head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o linuxbios.o memsize.o pci.o controller.o extra.o random.o dmi.o
ld: memtest_shared: could not find output section .gnu.hash
ld: final link failed: Nonrepresentable section on output
make: *** [memtest_shared] Fehler 1

!!! ERROR: sys-apps/memtest86+-1.70 failed.
Call stack:
  ebuild.sh, line 1611:   Called dyn_compile
  ebuild.sh, line 968:   Called qa_call 'src_compile'
  environment, line 3104:   Called src_compile
  memtest86+-1.70.ebuild, line 30:   Called die

!!! (no error message)
!!! If you need support, post the topmost build error, and the call stack if relevant.
!!! A complete build log is located at '/mnt/portvar/var/tmp/portage/sys-apps/memtest86+-1.70/temp/build.log'.


Reproducible: Always




emerge --info
Portage 2.1.2-r4 (default-linux/amd64/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.19.1 x86_64)
=================================================================
System uname: 2.6.19.1 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4600+
Gentoo Base System version 1.12.9
Timestamp of tree: Thu, 25 Jan 2007 21:00:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.3.6, 2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17.50.0.10
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.19.2-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -fweb -ftracer -fpeel-loops -ftree-vectorize -frename-registers -floop-optimize2 -msse3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=k8 -O2 -fweb -ftracer -fpeel-loops -ftree-vectorize -frename-registers -floop-optimize2 -msse3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
LC_ALL="de_DE@euro"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/portage/gentoo-de /usr/portage/local/layman/portage-xgl /usr/portage/local/layman/nxsty /usr/portage/local/layman/xwing"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip S3TC X Xaw3d a52 aac acpi addbookmarks aiglx aim aio akode alias alsa altenburgcards amarok amd64 aotuv aqua_theme asf athena audiofile avahi bash-completion berkdb bitmap-fonts bluetooth bzip2 cairo cdda cddb cdinstall cdparanoia cdr cdrom cdsound cegui cg clamav cli cracklib crypt css cups curl dio divx dlloader dnd double-precision dpms dri dts dv dvd dvdr dvdread emul-linux-x86 encode exif expat exscalibar fame fasttrack ffmpeg fftw flac foomaticdb fortran ftp gadu gcc64 gdbm gif gimp gimpprint glitz glut glx gnokii gnutella gpm gtk gtk2 highlight history iconv icq id3 imagemagick imlib irmc isdnlog jabber java javascript jce joystick jpeg jpeg2k kcal kde kdecards kdeenablefinal kdehiddenvisibility kdepim kdm kexi kipi kqemu lame lcms lesstif libg++ libwww lm_sensors logitech-mouse lzo lzw mad magic maps matroska mime mjpeg mmap mng mp3 mp4 mpeg mpeg2 mplayer msn mule musepack ncurses neXt net ngui nls no-old-linux nocd nosendmail nowin nowlistening nptl nptlonly nsplugin nvidia offensive ogg openexr opengl oscar pam paste64 pch pcre pdf perl physfs player png posix ppds pppd python qt3 qt4 quicktime rar readline recode reflection reiserfs remix resolvconf rogue rtc scanner sdl sdl-sound sendfile server session sharedmem smp sms sndfile sockets sounds spell spl sqlite sqlite3 srt sse-filters sse3 ssl startup-notification statistics stats stencil-buffer stroke subp subtitles svg sysfs sysvipc szip tcpd textures tga theora threads tiff timidity tk toolbar tools transcode truetype truetype-fonts type1 type1-fonts udev unicode unzip usb userlocales v4l v4l2 vcd videos visualization vorbis webdav wmf wxwindows x264 xanim xcomposite xemacs xext xface xine xml xorg xosd xpm xrandr xscreensaver xskatcards xv xvid xvmc yiff yv12 zlib zvbi" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nvidia vesa vga v4l nv"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Volker Hemmann 2007-01-26 02:18:38 UTC
Created attachment 108171 [details]
the build log mentioned in the error
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-01-26 08:15:53 UTC
> gcc -c -Wall -m32 -march=i486 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fno-stack-protector

No wonder that is compiles complete crap... Won't crosscompile either.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-01-26 10:09:13 UTC
Fails on x86 as well with same error, even after fixing the hardcoded CCFLAGS/CC/AS junk...
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-01-26 10:15:44 UTC
OK, the failed linking is binutils-2.17.50.0.10 bug... Compiles fine w/ 2.17.50.0.9; I'll try w/ 2.17.50.0.11 later. The rest still needs to be fixed in the ebuild.
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2007-01-26 10:54:49 UTC
(In reply to comment #4)
> I'll try w/ 2.17.50.0.11 later.

Still fails...

ld --warn-constructors --warn-common -static -T memtest_shared.lds -o memtest_shared head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o linuxbios.o memsize.o pci.o controller.o extra.o random.o dmi.o && \
	ld -shared -Bsymbolic -T memtest_shared.lds -o memtest_shared head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o config.o linuxbios.o memsize.o pci.o controller.o extra.o random.o dmi.o
i686-pc-linux-gnu-as -o setup.o setup.s
ld: memtest_shared: could not find output section .gnu.hash
ld: final link failed: Nonrepresentable section on output
make: *** [memtest_shared] Error 1
Comment 6 SpanKY gentoo-dev 2007-01-26 11:00:54 UTC
not a toolchain bug ... the custom linker script does not contain a line for the .gnu.hash section which is now enabled by default with binutils-2.17.50.0.10
Comment 7 SpanKY gentoo-dev 2007-01-27 03:29:56 UTC
this should be sufficient, not that i've tested it though:
memtest_shared.lds:
    .hash       : { *(.hash) }
+   .gnu.hash   : { *(.gnu.hash) }
    .dynamic    : { *(.dynamic) }
Comment 8 Michal Januszewski (RETIRED) gentoo-dev 2007-01-27 14:54:24 UTC
This is now fixed in CVS (thanks for the .gnu.hash fix -- it works perfectly). Note that you can't easily use the user's CFLAGS for a low-level, standalone application such as memtest86+.