Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101397 - libmovtar-0.1.3-r1 failed to compile with CFLAGS="-O2"
Summary: libmovtar-0.1.3-r1 failed to compile with CFLAGS="-O2"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-04 17:40 UTC by miolinux
Modified: 2005-08-20 19:46 UTC (History)
2 users (show)

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


Attachments
patch that adds flag-o-matic and -fno-unit-at-a-time to ebuild (libmovtar.patch,152 bytes, patch)
2005-08-07 16:24 UTC, bunkacid
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description miolinux 2005-08-04 17:40:58 UTC
libmovtar fail to compile when CFLAGS is >"-O1"

Reproducible: Always
Steps to Reproduce:
1.CFLAGS="-O2"
2.emerge libmovtar
3.

Actual Results:  
movtar_play.o(.text+0x258): In function `ycc_rgb16_convert_mmx':
: undefined reference to `te0'
movtar_play.o(.text+0x25f): In function `ycc_rgb16_convert_mmx':
: undefined reference to `te0'
movtar_play.o(.text+0x27a): In function `ycc_rgb16_convert_mmx':
: undefined reference to `te1'
movtar_play.o(.text+0x281): In function `ycc_rgb16_convert_mmx':
: undefined reference to `te2'
movtar_play.o(.text+0x2d1): In function `ycc_rgb16_convert_mmx':
: undefined reference to `te1'
movtar_play.o(.text+0x2d8): In function `ycc_rgb16_convert_mmx':
: undefined reference to `te2'
movtar_play.o(.text+0x364): In function `ycc_rgb16_convert_mmx':
: undefined reference to `shiftmask'
movtar_play.o(.text+0x378): In function `ycc_rgb16_convert_mmx':
: undefined reference to `shiftmask'
collect2: ld returned 1 exit status


Expected Results:  
compile :)

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.10-cko3-jb.r6 i686)
=================================================================
System uname: 2.6.10-cko3-jb.r6 i686 Intel(R) Pentium(R) M processor 1500MHz
Gentoo Base System version 1.6.13
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.11
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.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://www.die.unipd.it/pub/Linux/distributions/gentoo-sources/
http://darkstar.ist.utl.pt/gentoo/ http://ftp.easynet.nl/mirror/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="X aalib acpi alsa avi bash-completion bitmap-fonts bluetooth bzlib cdr
crypt cups dga divx4linux doc dv dvd dvdread eds emboss encode ethereal evo exif
fbcon ffmpeg foomaticdb ftp gif gnome gphoto2 gpm gtk gtk2 hal icq jabber java
javascript jpeg lirc lm_sensors mac mad maildir mikmod mime mmx mp3 mpeg ncurses
nls nptl nptlonly offensive ogg oggvorbis opengl pam pcmcia pda pdflib perl png
pnp posix ppds python quicktime readline samba sdl shared sockets spell sse ssl
svg sysvipc tiff truetype truetype-fonts trusted type1-fonts unicode usb v4l vcd
vorbis wifi x86 xine xml xml2 xmms xosd xpm xv xvid zlib userland_GNU
kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 miolinux 2005-08-04 17:56:34 UTC
ok, i found the problem: -funit-at-a-time.

compiling with:

CFLAGS="$CFLAGS -fno-unit-at-a-time" emerge libmovtar

works...

so i think ebuild should filter this flag.

bye
Comment 2 bunkacid 2005-08-07 16:24:53 UTC
Created attachment 65363 [details, diff]
patch that adds flag-o-matic and -fno-unit-at-a-time to ebuild

this is one of my first patches, comments welcomed.
Comment 3 bunkacid 2005-08-07 16:26:47 UTC
compiles OK with patch ( http://bugs.gentoo.org/attachment.cgi?id=65363 )
any comments welcomed as this is one of my first patches.

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.12-gentoo-r6 i686)
=================================================================
System uname: 2.6.12-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz
Gentoo Base System version 1.6.13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [disabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
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.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -fforce-addr
-falign-functions=16 -falign-jumps=16 -falign-loops=16 -falign-labels=1
-fprefetch-loop-arrays -maccumulate-outgoing-args -funroll-all-loops
-freorder-blocks -fcaller-saves -fno-loop-optimize -fno-signaling-nans"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -fforce-addr
-falign-functions=16 -falign-jumps=16 -falign-loops=16 -falign-labels=1
-fprefetch-loop-arrays -maccumulate-outgoing-args -funroll-all-loops
-freorder-blocks -fcaller-saves -fno-loop-optimize -fno-signaling-nans"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig candy digest distcc distlocks fixpackages sandbox sfperms
strict"
GENTOO_MIRRORS="http://gentoo.llarian.net/ http://gentoo.osuosl.org/ 
http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.mirrors.pair.com/
http://gentoo.ccccom.com http://gentoo.netnitco.net
http://mirrors.acm.cs.rpi.edu/gentoo/  http://mirror.datapipe.net/gentoo
http://www.gigaload.org/gentoo.org/ ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp/portage"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local"
SYNC="rsync://portageproxy/gentoo-portage"
USE="x86 X aalib adns alsa apm arts avi bash-completion berkdb bitmap-fonts
bonobo cdr crypt cups curl directfb dts eds emboss encode esd fam flac
foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml
guile imagemagick imlib ipv6 jack java jikes jpeg junit kde ldap libg++ libwww
mad mikmod mmx motif mozilla mp3 mpeg mysql nas ncurses nls ogg oggvorbis opengl
oss pam pdflib perl png python qt quicktime readline ruby samba scanner sdl
slang snmp speex spell sqlite sse sse2 ssl svga tcltk tcpd tiff truetype
truetype-fonts type1-fonts unicode vorbis xine xml xml2 xmms xv zlib
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 4 Lance Lucas 2005-08-10 01:11:54 UTC
is the problematic flag enabled by the -O2 directive?  this would also seem to
be a gcc3.4-only problem, as my system was previously built (cleanly) with gcc
3.3.6.  the two other reporters also have gcc 3.4.4 systems.

im getting the error with this system:

Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r1, 2.6.1
2-morph7 i686)
=================================================================
System uname: 2.6.12-morph7 i686 Mobile Intel(R) Celeron(R) CPU 2.20GHz
Gentoo Base System version 1.6.13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disable d]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
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.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share
/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/
mozilla/defaults/pref /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/
distributions/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 X a52 aac aalib acpi aim alsa arts avi berkdb bitmap-fonts browserplugi
n bzip2 cd cdr crypt css cups curl dbus divx4linux dv dvd dvdread eds emboss enc
ode esd fam fame firefox flac foomaticdb fortran gdbm gif gimpprint gnome gpm gs
treamer gtk gtk2 gtkhtml hal imagemagick imlib ipv6 java javascript jikes jpeg l
dap libcaca libg++ libwww mad mikmod mjpeg mmx mng motif mozilla mp3 mpeg ncurse
s nls nptl nsplugin offensive ogg oggvorbis opengl oss pam pcmcia pdflib perl pi
c png posix python quicktime readline sdl spell sse sse2 ssl svga tcltk tcpd the
ora tiff truetype truetype-fonts type1-fonts unicode usb vorbis win32codecs xine
 xml2 xmms xv xvid xvmc zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 5 Lance Lucas 2005-08-10 02:27:41 UTC
patch works for me
Comment 6 Peter Dedecker 2005-08-13 08:43:02 UTC
I had the same problem.

CFLAGS="$CFLAGS -fno-unit-at-a-time" emerge libmovtar
works for me
Comment 7 Ed Catmur 2005-08-20 15:13:05 UTC
Confirmed with gcc-3.4.4; fix works.

Re comment 2: please use diff -u (unified diff format).
Comment 8 Mark Loeser (RETIRED) gentoo-dev 2005-08-20 19:46:49 UTC
This also causes failures on gcc4.  Instead of appending the -fno-unit-at-a-time
flag, I fixed the asm code.  The fix is in the tree.