Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 134586 - freeglut-2.4.0 fails to build with certain march/mtune settings
Summary: freeglut-2.4.0 fails to build with certain march/mtune settings
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High critical (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 134583 134584 134585 137919 139433 139568 145385 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-05-27 21:47 UTC by Sergio Alonso
Modified: 2010-02-15 14:20 UTC (History)
9 users (show)

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


Attachments
Build log of freeglut-2.4.0-r1 (media-libs:freeglut-2.4.0-r1:20100215-135641.log,9.97 KB, text/plain)
2010-02-15 14:20 UTC, Honza
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Alonso 2006-05-27 21:47:21 UTC
Portage 2.0.54-r2 (default-linux/x86/no-nptl, gcc-3.4.5, glibc-2.3.5-r2, 2.6.16-gentoo-r7 i66)
=================================================================
System uname: 2.6.16-gentoo-r7 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
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
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-pc-linux-gnu"
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/lb/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platx/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/rc.d /etc/terminfo /etc/wget /etc/env.d"
CXXFLAGS="-mcpu=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://www.las.ic.unicamp.br/pub/gentoo/ http://ftp.twaren.net/Linux/Gentoo/"
LANG="es_ES.UTF-8"
LINGUAS="es"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext S3TC X aac aalib acpi alsa alsai apm arts artworkextra asf asm asyncaudacious audiofile avi bash-completion beagle berkdb bitmap-fonts bonobo bootsplash bzip2 ciro cdda cddb cdio cdparanoia cdr cdrom cg cli cpudetection crypt cscope css cups curl curlwappers dbase dbus dcraw dict directfb dnd dpms dri dts dvb dvd dvdr dvdread dvi dxr3 editor ds emboss encode epiphany escreen esd examples exif exim expat extraicons extras fam fat fbcn fbsplash ffmpeg figlet firefox flash fluidsynth font-server fontconfig foomaticdb fortran tp gaim gcj gdb gdbm gif gimp gkrellm glitz gmail gmailtimestamps gnome gnome-print gnomecanas gnomedb gnustep gpm gs gstreamer gtalk gtk gtk2 gtkhtml guionly gvim hal hddtemp hou howlhtml icecast icon iconv icq id3 ident idn imap imlib infopipe ipv6 irc isdnlog j2ee jabber jvascript jboss jpeg kde kexi lame largeterminal latex lcms libcaca libclamav libg++ libsexy ibwww lm_sensors mad maildir mbox mbx menubar mikmod mime ming mjpeg mng motif mouse mozcaledar mozilla mp3 mp4 mp4live mpd-mad mpeg mpeg2 msn mssql musepack music mysql nas ncurses ne netbeans nethack network new-login nforce2 nls nntp ntfs nvidia nvram nvtv nxclient oav odb ogg ole openal opengl oss pam pango pcre pda pdf pdflib perl pfpro php physfs pink player pg pnp pop pop3d pppd preview-latex print ps python qt quicktime rdesktop readline reflectionreiser4 reiserfs rhythmbox rle roe rogue rplay rss rtsp ruby samba sblive scenarios scp scren sdl sendfile serial server session setup-plugin shorten skins slang sndfile sou sounds spel spl sql sqlite sqlite3 ssl stream submenu subp subtitles svg svga swat syslog tcpd teamarea tetex threads thumbnail thunar-vfs tiff transcode truetype truetype-fonts type1 type1-font udev usb vcd vcdimager vdr verbose vidix vim vim-pager vim-with-x vnc vorbis vorbisi webminminimal webservices win32codecsi wma wma123 wv xanim xatrix xbase xchat xchattext xcompositexfs xine xinerama xml xml2 xmlreader xmlrpc xmms xorg xosd xrandr xv xvid xvmc yaepg zlib liguas_es userland_GNU kernel_linux elibc_glibc"
Unset:  CTARGET, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS PORTDIR_OVERLAY
Comment 1 Sergio Alonso 2006-05-27 21:47:27 UTC
 emerge freeglut
...
...
... etc

	   `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
	   mv -f libglut_la-freeglut_callbacks.o .libs/libglut_la-freeglut_callbacks.lo
	   mv: cannot stat `libglut_la-freeglut_callbacks.o': No such file or directory
	   make[2]: *** [libglut_la-freeglut_callbacks.lo] Error 1
	   make[2]: *** Se espera a que terminen otras tareas....
	   mv -f libglut_la-freeglut_cursor.o .libs/libglut_la-freeglut_cursor.lo
	   mv: cannot stat `libglut_la-freeglut_cursor.o': No such file or directory
	   make[2]: *** [libglut_la-freeglut_cursor.lo] Error 1
	   make[2]: Leaving directory `/var/tmp/portage/freeglut-2.4.0/work/freeglut-2.4.0/src'
	   make[1]: *** [all-recursive] Error 1
	   make[1]: Leaving directory `/var/tmp/portage/freeglut-2.4.0/work/freeglut-2.4.0'
	   make: *** [all] Error 2

	   !!! ERROR: media-libs/freeglut-2.4.0 failed.
	   !!! Function src_compile, Line 566, Exitcode 2
	   !!! emake failed
	   
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-05-27 23:48:17 UTC
*** Bug 134583 has been marked as a duplicate of this bug. ***
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-05-27 23:48:26 UTC
*** Bug 134584 has been marked as a duplicate of this bug. ***
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2006-05-27 23:48:33 UTC
*** Bug 134585 has been marked as a duplicate of this bug. ***
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-05-27 23:51:15 UTC
This has nothing in common w/ bugzilla product. Also, fix your browser refresh...
Comment 6 Joshua Baergen (RETIRED) gentoo-dev 2006-05-28 08:43:23 UTC
Try emerging with CFLAGS="-march=athlon-xp -O2 -pipe", or even -O1.
Comment 7 Donnie Berkholz (RETIRED) gentoo-dev 2006-05-28 13:53:11 UTC
Assuming that doesn't work, set MAKEOPTS="-j1" or unset it entirely in make.conf and try again.
Comment 8 Sergio Alonso 2006-05-28 14:44:16 UTC
Coment #6 (https://bugs.gentoo.org/show_bug.cgi?id=134586#c6) works fine.

Thanks Joshua Baergen!
Comment 9 Donnie Berkholz (RETIRED) gentoo-dev 2006-05-28 15:02:33 UTC
That looks a bit like an odd race condition due to parallel builds that won't be easily reproduceable at the same place.
Comment 10 Joshua Baergen (RETIRED) gentoo-dev 2006-06-04 07:58:21 UTC
Yeah, it's even possible that changing the optimization of the package changes the order of compile enough that the race condition is satisfied.  Interesting that we haven't seen more complaints of this, though.
Comment 11 Lau 2006-06-25 11:37:55 UTC
FYI, I had the same problem with the optimisation level set to 3. Setting it to 2 worked for me as well. Thanks.
Comment 12 Donnie Berkholz (RETIRED) gentoo-dev 2006-06-25 15:07:40 UTC
OK, I'm going to filter -O3 to -O2.
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-07-06 08:10:45 UTC
*** Bug 139433 has been marked as a duplicate of this bug. ***
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2006-07-06 08:13:56 UTC
*** Bug 137919 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2006-07-06 08:16:08 UTC
Well, this doesn't look like really fixed. We should force -j1 here since there are duplicate reports w/ -Os and -O2 as well.
Comment 16 Maciej Grela 2006-07-06 08:44:31 UTC
Unfortunately on my machine setting MAKEOPTS="-j1" and even disabling optimizations doesn`t help. 
If this is a race condition as you say then maybe we should consider it a bug in libtool and pass it to them ???
Comment 17 Donnie Berkholz (RETIRED) gentoo-dev 2006-07-06 08:54:08 UTC
Everyone having this problem, what are your CFLAGS?
Comment 18 Maciej Grela 2006-07-06 10:45:27 UTC
I tried to compile using:

CFLAGS="-O2 -mtune=pentium3 -march=i686 -pipe"
and
CFLAGS="-O1 -mtune=pentium3 -march=i686 -pipe"
and
CFLAGS="-mtune=pentium3 -march=i686 -pipe"
and even without CFLAGS defined

Nothing helps ...
Comment 19 Joshua Baergen (RETIRED) gentoo-dev 2006-07-06 18:52:13 UTC
Try
CFLAGS="-O2 -march=pentium3 -pipe"
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2006-07-07 09:43:22 UTC
*** Bug 139568 has been marked as a duplicate of this bug. ***
Comment 21 Maciej Grela 2006-07-07 13:51:38 UTC
Thans, that helped. What does it have to do with the -mtune flag ??? It`s just beyond me :)
Comment 22 Joshua Baergen (RETIRED) gentoo-dev 2006-07-09 20:45:18 UTC
It's not the mtune flag, but rather the lack of -march.  I'm not sure why, but it would appear that some bad code is being generated without architecture-specific optimizations enabled.

Re-opening until we solve this properly.
Comment 23 Edmar Rezende 2006-07-13 15:28:00 UTC
Temporary solution:

ebuild /usr/portage/media-libs/freeglut/freeglut-2.4.0.ebuild unpack
cd /var/tmp/portage/freeglut-2.4.0/work/freeglut-2.4.0/
./configure 
make
touch .compiled
(cd back to avoid complaints while cleaning /var/tmp/portage)
ebuild /usr/portage/media-libs/freeglut/freeglut-2.4.0.ebuild merge
Comment 24 Edmar Rezende 2006-07-14 15:18:04 UTC
This problem was fixed by moving mcpu -> mtune in CFLAGS.
The "-mcpu" option is deprecated. 
Comment 25 Joshua Baergen (RETIRED) gentoo-dev 2006-07-14 18:28:11 UTC
(In reply to comment #24)
> This problem was fixed by moving mcpu -> mtune in CFLAGS.
> The "-mcpu" option is deprecated. 
> 

This has failed for people using mtune as well.
Comment 26 Jakub Moc (RETIRED) gentoo-dev 2006-08-28 11:32:52 UTC
*** Bug 145385 has been marked as a duplicate of this bug. ***
Comment 27 Joshua Baergen (RETIRED) gentoo-dev 2006-08-31 10:23:21 UTC
I'm going to add a warning to the ebuild about this issue.

Does anyone know the proper venue for reporting this issue upstream?  freeglut.sourceforge.net looks quite out of date.
Comment 28 Chema Alonso 2006-09-26 00:16:26 UTC
(In reply to comment #18)
> I tried to compile using:
> 
> CFLAGS="-O2 -mtune=pentium3 -march=i686 -pipe"
> and
> CFLAGS="-O1 -mtune=pentium3 -march=i686 -pipe"
> and
> CFLAGS="-mtune=pentium3 -march=i686 -pipe"
> and even without CFLAGS defined
> 
> Nothing helps ...
> 

CFLAGS="-mtune=athlon -mcpu=athlon -march=i686 -pipe" wroked for me on an AMD Semprom 2600+

Cheers!
Comment 29 Pacho Ramos gentoo-dev 2006-11-26 12:29:30 UTC
Have you tried with 2.4.0-r1?

It worked for me

Good luck!
Comment 30 nightmare 2007-04-08 15:16:54 UTC
I got a PS3 and install Gentoo on it.
On PS3, CFLAGS cann't set to "-march=G5" or "-mtune=G5",or it'll show error messages such like "cann't create excutable files".
The only solution seems to use the manually-compile method mentioned above.
Comment 31 karpi 2007-11-07 11:32:48 UTC
on mac mini:
CFLAGS="-O2 -mtune=powerpc -fno-strict-aliasing -pipe"

..freeglut does not compile, and forces me to set -march..

so when:
CFLAGS="-O2 -march=G4 -fno-strict-aliasing -pipe"

configure: error: C compiler cannot create executables
(gcc version 3.4.4 (Gentoo 3.4.4, ssp-3.4.4-1.0, pie-8.7.8))

Comment 32 Robin Bermanseder 2008-08-19 10:29:58 UTC
Installing gentoo on an AMD Phenom quad core.
CFLAGS="-march=k8 -O2 -msse3 -pipe"
MAKEOPTS="-j5"

While emerging xorg-x11 I was getting the dreaded missing lGL error during the freeglut install.

After viewing MANY bug reports here and elsewhere I discovered that
in /usr/lib64, my libGL.so was red blinking (ie pointing to a file that no longer exists). I removed it and ran 
eselect opengl set xorg-x11
and a correct link was created.

I was then able to successfully emerge xorg-x11
Comment 33 Roy Wright 2009-02-06 06:14:19 UTC
Just another data point.

I experienced this on a new install when using distcc.  Work around was disabling distcc.

FEATURES="-distcc" emerge -uDNAv world

freeglut-2.4.0-r1

# emerge --info
Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.28-gentoo-r1 i686)
=================================================================                                   
System uname: Linux-2.6.28-gentoo-r1-i686-AMD_Athlon-tm-_X2_Dual_Core_Processor_BE-2400-with-glibc2.0
Timestamp of tree: Thu, 05 Feb 2009 04:45:01 +0000
distcc[10549] (dcc_trace_version) distcc 3.1 i686-pc-linux-gnu; built Feb  5 2009 23:11:49 [enabled] 
app-shells/bash:     3.2_p48
dev-lang/python:     2.4.4-r13, 2.5.4-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.2
sys-apps/sandbox:    1.3.2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r1, 2.19
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"                                                                                
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distcc distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://mirror.fslutd.org/linux/distributions/gentoo/ "
LDFLAGS="-Wl,-O1"
LINGUAS="en en_US"
MAKEOPTS="-j13"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="X a52 aac acl alsa ao apache2 arts artswrappersuid audiofile avahi bash-completion bidi bluetooth bsf bzip2 cairo calendar caps cdda cddb cdio cdparanoia cdr cli cracklib crypt css curl cvs cxx dbus dri dts dvd dvdr dvdread encode esd evdev examples exif expat faad fbcondecor ffmpeg flac font-server fontconfig foomaticdb fortran freetype ftp gd gdbm geoip gif gimp git glep glitz gnome gnutls gphoto2 gpm graphviz gtk hal htmlhandbook httpd iconv icq imagemagick imap imlib ipod isdnlog jabber jack java java5 java6 javascript jpeg jpeg2k kde kdehiddenvisibility kdeprefix kerberos lame lash ldap libnotify libwww live lm_sensors logitech-mouse loop-aes lzo mad mailwrapper matroska mbox mdnsresponder-compat midi mime mjpeg mng mod mozilla mp3 mpeg mplayer mudflap multislot musepack mysql mysqli nas ncurses networkmanager nfs nls nptlonly nsplugin nvidia ocaml ogg oggvorbis openal opengl openmp pam pcre pdf perl php plotutils png pppd python qt3 qt3support qt4 raw rdesktop readline reflection rss ruby screen session sndfile soap sockets sox spell spl ssl stream streamout subversion svg svga sysfs syslog szip taglib tcl tcpd theora tidy tiff timidity tk tokenizer tordns truetype type1 unicode usb utempter utils v4l2 vcd vim-pager vim-syntax vim-with-x vlm vnc vorbis wavpack webkit win32codecs wmf wxwindows x11 x264 x86 xcomposite xine xorg xpm xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 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" 
ELIBC="glibc" 
INPUT_DEVICES="keyboard mouse" 
KERNEL="linux" 
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" 
LINGUAS="en en_US" 
USERLAND="GNU" 
VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 34 Joe Guithues 2009-03-08 03:04:23 UTC
(In reply to comment #32)
> Installing gentoo on an AMD Phenom quad core.
> CFLAGS="-march=k8 -O2 -msse3 -pipe"
> MAKEOPTS="-j5"
> 
> While emerging xorg-x11 I was getting the dreaded missing lGL error during the
> freeglut install.
> 
> After viewing MANY bug reports here and elsewhere I discovered that
> in /usr/lib64, my libGL.so was red blinking (ie pointing to a file that no
> longer exists). I removed it and ran 
> eselect opengl set xorg-x11
> and a correct link was created.
> 
> I was then able to successfully emerge xorg-x11
> 

I was going to file a bug report about something like this, but tried removing the libGL.so files suggested.  Deleting four files fixed it /usr/lib32/libGL.so /usr/lib32/libGLcore.so /usr/lib64/libGL.so and /usr/lib64/libGLcore.so

CFLAGS="-march=k8" -02 -pipe"
MAKEOPTS="-j2"
Comment 35 Rémi Cardona (RETIRED) gentoo-dev 2009-05-06 14:40:02 UTC
This report has a mix of various bugs, it's hard to tell anything from the comments anymore.

If anyone can still reproduce this bug with the latest (and only) version of freeglut, please don't hesitate to reopen this bug and don't forget to *attach* the full *build.log*.

Thanks
Comment 36 yaverot 2009-08-22 19:56:14 UTC
It looks like I'm currently being bitten by this bug. 

Apparently from what _is_ here, the bug appears to be that freeglut requires a "march" setting, but the ebuild fails to add "-march=native" if it is not already set at all. Still sounds wrong... Adds a "march" but won't change an existing "march".

http://www.gentoo.org/doc/en/gcc-optimization.xml indicates that there is no sensible way for me to add "-march=" to just this one buggy package that requires it. (Much like I have listings in package.use for those where I need to use flags different from my sane system-wide set.) 

I'll provide emerge --info, build.log, etc if it would be useful, but you'll likely need to send me directions how (private email, even if it is just a link to page I haven't seen here on gentoo.org).  I'm not certain the machine with the problem has firefox installed, and even if it did, I don't know if a user has access to the info instead of just root. 
Comment 37 Honza 2010-02-15 14:20:21 UTC
Created attachment 219781 [details]
Build log of freeglut-2.4.0-r1

Note that it DOES compile with CFLAGS="-O2 -mtune=athlon -march=i686 -pipe -fomit-frame-pointer" emerge -1 virtual/glut on same machine, so the reason seems to be unreasonable requirements on CFLAGS.