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

Bug 413963

Summary: sys-boot/grub-2.00_beta3 with gcc-4.7: unrecognized command line option '-melf_x86_64'
Product: Gentoo Linux Reporter: Nicolas Schlumberger <n.schlumberger>
Component: [OLD] Core systemAssignee: Mike Gilbert <floppym>
Status: RESOLVED UPSTREAM    
Severity: normal CC: base-system
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 390247    
Attachments: build.log.gz

Description Nicolas Schlumberger 2012-04-29 08:55:03 UTC
* confirm, that it works with gcc-4.5.3 and gcc-4.6.2
* removing -melf_x86_64 from /var/tmp/portage/sys-boot/grub-2.00_beta3/work/build-efi-64/grub-core/Makefile allows grub to build.

Reproducible: Always

Actual Results:  
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-boot/grub-2.00_beta3/work/grub-2.00~beta3/grub-core -I..  -Wall -W -I/var/tmp/portage/sys-boot/grub-2.00_beta3/work/grub-2.00~beta3/include -I../include  -DGRUB_MACHINE_EFI=1 -DGRUB_MACHINE=X86_64_EFI -DGRUB_TARGET_CPU_X86_64=1 -m64 -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.0/include -DGRUB_FILE=\"bus/cs5536.c\" -I. -I/var/tmp/portage/sys-boot/grub-2.00_beta3/work/grub-2.00~beta3/grub-core -I.. -I/var/tmp/portage/sys-boot/grub-2.00_beta3/work/grub-2.00~beta3 -I/var/tmp/portage/sys-boot/grub-2.00_beta3/work/grub-2.00~beta3/include -I../include     -Os -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -m64 -mcmodel=large -mno-red-zone -fno-PIE -fno-PIC -fno-stack-protector -mno-stack-arg-probe -Wno-trampolines -DUSE_ASCII_FAILBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1         -ffreestanding   -c -o bus/cs5536_module-cs5536.o `test -f 'bus/cs5536.c' || echo '/var/tmp/portage/sys-boot/grub-2.00_beta3/work/grub-2.00~beta3/grub-core/'`bus/cs5536.c
x86_64-pc-linux-gnu-gcc: error: unrecognized command line option '-melf_x86_64'
make[3]: *** [trig.module] Error 1
make[3]: *** Waiting for unfinished jobs....
grep 'MARKER' gcry_serpent.marker.new > gcry_serpent.marker; rm -f gcry_serpent.marker.new
make[3]: Leaving directory `/var/tmp/portage/sys-boot/grub-2.00_beta3/work/build-efi-64/grub-core'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-boot/grub-2.00_beta3/work/build-efi-64/grub-core'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-boot/grub-2.00_beta3/work/build-efi-64'
make: *** [all] Error 2
 * ERROR: sys-boot/grub-2.00_beta3 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of 'emerge --info =sys-boot/grub-2.00_beta3',
 * the complete build log and the output of 'emerge -pqv =sys-boot/grub-2.00_beta3'.
 * The complete build log is located at '/var/log/portage/sys-boot:grub-2.00_beta3:20120429-080404.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-boot/grub-2.00_beta3/temp/build.00_beta3:20120429-080404.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-boot/grub-2.00_beta3/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-boot/grub-2.00_beta3/work/build-efi-64'
 * S: '/var/tmp/portage/sys-boot/grub-2.00_beta3/work/grub-2.00~beta3'



Portage 2.2.0_alpha101 (hardened/linux/amd64/desktop, gcc-4.7.0, glibc-2.15-r1, 3.3.3-hardened x86_64)
=================================================================
System uname: Linux-3.3.3-hardened-x86_64-Intel-R-_Core-TM-_i7-2620M_CPU_@_2.70GHz-with-gentoo-2.1
Timestamp of tree: Sat, 28 Apr 2012 22:45:01 +0000
app-shells/bash:          4.2_p24-r1
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r1, 3.2.3
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1
sys-apps/openrc:          0.9.9.3
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.5
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.2, 4.7.0::hardened-dev
sys-devel/gcc-config:     1.7
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.3 (virtual/os-headers)
sys-libs/glibc:           2.15-r1
Repositories: gentoo kde hardened-dev local
Installed sets: @kde-telepathy, @kdeaccessibility-4.8, @kdeadmin-4.8, @kdeartwork-4.8, @kdebase-4.8, @kdegraphics-4.8, @kdelibs-4.8, @kdemultimedia-4.8, @kdenetwork-4.8, @kdepim-4.8, @kdetoys-4.8, @kdeutils-4.8, @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -floop-interchange -floop-strip-mine -floop-block"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe -floop-interchange -floop-strip-mine -floop-block"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--misspell-suggestions=n --jobs=3"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox usersync xattr"
FFLAGS=""
GENTOO_MIRRORS="http://sunsite.cnlab-switch.ch/mirror/gentoo/  http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,relro -Wl,-z,now"
LINGUAS="en en_US"
MAKEOPTS="-j5 -l11"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/kde /var/lib/layman/hardened-development /usr/local/portage"
SYNC="rsync://blakharaz.schlumberger.soho/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 bash-completion berkdb bluetooth branding bzip2 c++0x cairo caps cli consolekit cracklib crypt cups cxx dbus dri dts dvd emboss encode exif expat fam ffmpeg fftw firefox flac gdbm gdu gif gpm gstreamer handbook hardened iconv icu idn introspection ipv6 jpeg justify kde kerberos lcms ldap libedit libnotify logrotate lzma mad mmx mng modules mp3 mp4 mpeg mpi mudflap multilib mysql ncurses networkmanager nls nptl nptlonly ogg openexr opengl openmp pam pango pax_kernel pcre pdf png policykit ppds pppd qt3support qt4 sdl semantic-desktop session smp spell sqlite sse sse2 ssl svg sysfs syslog tcpd theora threads tiff truetype udev unicode urandom usb v4l v4l2 vim-syntax vorbis wxwidgets x264 xattr xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="biosdevname btrfs caps crypt crypt-gpg syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="intel vesa v4l v4l2" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.2"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Nicolas Schlumberger 2012-04-29 09:00:53 UTC
Created attachment 310399 [details]
build.log.gz

complete build log for sys-boot/grub-2.00_beta3-r2
Comment 2 Mike Gilbert gentoo-dev 2012-05-09 23:40:04 UTC
Please report this upstream.
Comment 3 Nicolas Schlumberger 2012-05-12 11:35:05 UTC
(In reply to comment #2)
> Please report this upstream.

Seems fixed in 2.00_beta5.

But I did not have time reboot the machine yet, to fully confirm, that it is working.
Comment 4 Mike Gilbert gentoo-dev 2012-05-12 16:07:18 UTC
(In reply to comment #3)
> Seems fixed in 2.00_beta5.

Looks like this change did it:

2012-04-18  Vladimir Serbinenko  <phcoder@gmail.com>

        * conf/Makefile.common (LDFLAGS_PLATFORM): Use explicit -Wl.