Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 99813 - vlc 0.8.2-r1 fails to build on a system with the pic useflag (prelinked)
Summary: vlc 0.8.2-r1 fails to build on a system with the pic useflag (prelinked)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Developers for the x86 Architecture
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-21 09:56 UTC by Genia Bezman
Modified: 2005-10-30 12:33 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Genia Bezman 2005-07-21 09:56:59 UTC
Tried to emerge vlc with various cflags and use flags, always fails at a file 
which seems to have something to do with pic. I have the pic use flag set (glibc 
is compiled with it)

Reproducible: Always
Steps to Reproduce:
1.emerge vlc


Actual Results:  
Compile failed.

Expected Results:  
Compile should succeed.

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 2.6.
12-gentoo-r4 i686)
=================================================================
System uname: 2.6.12-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 1500MHz
Gentoo Base System version
dev-lang/python:     2.4.1-r1
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -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/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-Os -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.hamakor.org.il/pub/mirrors/gentoo/"
MAKEOPTS="-j1"
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 alsa cups gif jpeg nls nptl opengl pam pic png sdl tiff truetype 
unicode xv video_cards_nvidia userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-21 10:54:28 UTC
As my crystal ball broke, I can't try to fix this without having the error 
message ;) 
 
Can you please paste the last lines before the first error? 
 
Comment 2 Genia Bezman 2005-07-21 12:23:18 UTC
(In reply to comment #1)
> As my crystal ball broke, I can't try to fix this without having the error 
> message ;) 
>  
> Can you please paste the last lines before the first error? 
>  

Woops, sorry :(
Here is the error:

i686-pc-linux-gnu-ar cru libi420_rgb_mmx_pic.a libi420_rgb_mmx_pic_a-i420_rgb.o 
libi420_rgb_mmx_pic_a-i420_rgb16.o
i686-pc-linux-gnu-ranlib libi420_rgb_mmx_pic.a
if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I../..   -DSYS_LINUX -I../../
include `top_builddir="../.." ../../vlc-config --cflags builtin pic 
i420_yuy2_mmx` -Wsign-compare -Wall -Os -pipe -pipe -MT libi420_yuy2_mmx_pic_a-
i420_yuy2.o -MD -MP -MF ".deps/libi420_yuy2_mmx_pic_a-i420_yuy2.Tpo" \
  -c -o libi420_yuy2_mmx_pic_a-i420_yuy2.o `test -f 'i420_yuy2.c' || echo './
'`i420_yuy2.c; \
then mv -f ".deps/libi420_yuy2_mmx_pic_a-i420_yuy2.Tpo" ".deps/
libi420_yuy2_mmx_pic_a-i420_yuy2.Po"; \
else rm -f ".deps/libi420_yuy2_mmx_pic_a-i420_yuy2.Tpo"; exit 1; \
fi
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
i420_yuy2.c: In function `I420_YUY2':
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while 
reloading `asm'
make[4]: *** [libi420_yuy2_mmx_pic_a-i420_yuy2.o] Error 1
make[4]: Leaving directory `/var/tmp/portage/vlc-0.8.2-r1/work/vlc-0.8.2/
modules/video_chroma'
make[3]: *** [all-modules] Error 1
make[3]: Leaving directory `/var/tmp/portage/vlc-0.8.2-r1/work/vlc-0.8.2/
modules/video_chroma'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/vlc-0.8.2-r1/work/vlc-0.8.2/
modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/vlc-0.8.2-r1/work/vlc-0.8.2'
make: *** [all] Error 2

!!! ERROR: media-video/vlc-0.8.2-r1 failed.
!!! Function src_compile, Line 231, Exitcode 2
!!! make of VLC failed
!!! If you need support, post the topmost build error, NOT this status message.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-21 12:48:32 UTC
Ok this seems to be a bug, also if I'm not sure what's throwing it in, as the 
pic version should be fixed to not create this problem in general situations. 
 
Comment 4 Stian Skjelstad 2005-07-28 05:01:20 UTC
PIC is not the issue, since it can't find a register from GENERAL_REGS. I think
the -Os thingy is the problem, since it enables things like reorder-blocks.
Probably, the targets that have assembler should filter these out or ebuild.

Can reporter try to Replace -Os with -O2 ?
Comment 5 Genia Bezman 2005-07-30 11:05:01 UTC
(In reply to comment #4)
> PIC is not the issue, since it can't find a register from GENERAL_REGS. I 
think
> the -Os thingy is the problem, since it enables things like reorder-blocks.
> Probably, the targets that have assembler should filter these out or ebuild.
> 
> Can reporter try to Replace -Os with -O2 ?

Tried compiling with -O0, same error more or less, just less GENERAL_REGS not 
found.
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-08-07 04:03:09 UTC
-O0 is broken, try with -O2. 
 
Comment 7 Genia Bezman 2005-08-08 07:47:49 UTC
(In reply to comment #6)
> -O0 is broken, try with -O2. 
>  

Tried with -O2 only (not even -pipe), exact same error.
Comment 8 Ulrich Plate (RETIRED) gentoo-dev 2005-08-19 06:30:56 UTC
Quick "me, too" here. Happened rather by accident, not when upgrading, but after
enabling USE=nsplugin in make.conf and doing an `emerge --newuse world`.

Don't know if it matters in terms of context, but the build changes the CFLAGS
all by itself: I'm getting lots of "'-mcpu=' is deprecated" warnings that
couldn't possibly be meant for me, I never set that anywhere... And indeed,
after the configure there's a message that says "You can tune the compiler flags
in vlc-config." When called to show its current flags it says:

# vlc-config --cflags
-Iinclude -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
-D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE -DLOCALEDIR="/usr/share/locale"
-DDATA_PATH="/usr/share/vlc" -DPLUGIN_PATH="/usr/lib/vlc"  -O3 -ffast-math
-funroll-loops -mcpu=pentiumpro

For completeness, here's my `emerge info`: 

Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.13-rc6 i686)
=================================================================
System uname: 2.6.13-rc6 i686 Pentium III (Coppermine)
Gentoo Base System version 1.12.0_pre6
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.2.3-r5, 2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/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/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks fixpackages sandbox sfperms strict
usersandbox"
GENTOO_MIRRORS="http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.inode.at/"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="x86 X aalib alsa apm arts avi berkdb bitmap-fonts canna cdr cjk crypt
cscope cups curl eds emboss encode esd faad fam fbcon flac foomaticdb
foreign-package fortran gd gdbm gif gimpprint gnome gpm gstreamer gtk gtk2 guile
i8x0 iconv imagemagick imlib immqt-bc ipv6 java jpeg junit kde kdeenablefinal
libg++ libwww mad matroska mikmod mng motif mozilla moznocompose moznoirc
moznomail mozsvg mp3 mpeg ncurses network nls nsplugin ogg oggvorbis opengl
operanom2 oss pam pcmcia pdflib perl png python qt quicktime readline samba sdl
slang smime speex spell ssl svg svga tcpd tetex tidy tiff truetype
truetype-fonts type1-fonts unicode userlocales utf8 vorbis wifi win32codecs wmf
wxwindows xface xim xine xml xml2 xmms xv xvid xvmc zeroconf video_cards_i810
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS

Needless to say, setting "-O2" manually has no effect whatsoever...
Comment 9 Gergan Penkov 2005-08-30 12:25:38 UTC
this solves the problems with the incorrect cflags and with the compilation
(diff to the current ebuild):
@@ -226,8 +232,14 @@
                --disable-slp \
                ${myconf} || die "configuration failed"

-       sed -i -e s:"-fomit-frame-pointer":: vlc-config || die
"-fomit-frame-pointer patching failed"
-
+       #sed -i -e s:"-fomit-frame-pointer":: vlc-config || die
"-fomit-frame-pointer patching failed"
+       sed -i -e "s|\(^cflags=\"\)\(.*\)|\1${CFLAGS}\"|
+               s|\(^cxxflags=\"\)\(.*\)|\1${CXXFLAGS}\"|
+               s|\(^cflags_tuning=\"\)\(.*\)|\1\"|
+               s|\(^cflags_optim=\"\)\(.*\)|\1\"|
+               s|\(^cflags_optim_nodebug=\"\)\(.*\)|\1\"|
+               s|\(^cflags_nooptim=\"\)\(.*\)|\1\"|" \
+               ${S}/vlc-config || die "patching the flags failed"
If you want only to be able to install the ebuild, comment the following line 
#sed -i -e s:"-fomit-frame-pointer":: vlc-config || die "-fomit-frame-pointer
patching failed"
as in the configure-script is following to be read:
if test "${ac_cv_c_omit_frame_pointer}" != "no"; then
    CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
    # this plugin does not compile without -fomit-frame-pointer, damn gcc!

  for element in i420_yuy2_mmx; do
    eval "CFLAGS_${element}="'"$'"{CFLAGS_${element}} -fomit-frame-pointer"'"'
    am_modules_with_cflags="${am_modules_with_cflags} ${element}"
  done

fi
So removing the -fomit-frame-pointer breaks the module, what we now experience.
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-09-02 15:54:19 UTC
Passing down... 
Comment 11 Mark Loeser (RETIRED) gentoo-dev 2005-09-24 12:24:36 UTC
Is this still an issue?  I'm having a hard time reproducing this with
gcc-3.4.4-r1 and the flags you guys showed here.
Comment 12 Ulrich Plate (RETIRED) gentoo-dev 2005-09-30 07:40:55 UTC
Yes, I just had this again:

i420_yuy2.c: In function `I420_YUY2':
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while
reloading `asm'
i420_yuy2.c:275: error: can't find a register in class `GENERAL_REGS' while
reloading `asm'
distcc[20687] ERROR: compile i420_yuy2.c on localhost failed
make[4]: *** [libi420_yuy2_mmx_pic_a-i420_yuy2.o] Error 1

Gergan's patch in comment #9 makes it compile successfully (or at least the
commented -fomit-frame-pointer line does, that's as far as I bothered trying
just now). 

This is reproducible with both gcc version 3.4.4 (Gentoo 3.4.4-r1,
ssp-3.4.4-1.0, pie-8.7.8) and gcc version 3.4.3-20050110 (Gentoo Linux
3.4.3.20050110-r2, ssp-3.4.3.20050110-0, pie-8.7.7), by the way.
Comment 13 Alok Singhal 2005-10-03 18:54:26 UTC
I am getting the same problem.  Doing a google search, I found this page:

http://itdp.fh-biergarten.de/transcode-devel/2004-09/msg00325.html

When I emerged VLC by doing:

CFLAGS=-fomit-frame-pointer emerge vlc

it compiled cleanly and seems to work for me.  The page above has an explanation
about the error message, which may apply to VLC (or not, I don't know much about
x86 assembly).
Comment 14 Dan 2005-10-03 18:59:53 UTC
If it helps any... I cannot reproduce 
 
Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r1, 
2.6.12-9-386 i686) 
================================================================= 
System uname: 2.6.12-9-386 i686 AMD Athlon(tm) XP 2500+ 
Gentoo Base System version 1.6.13 
dev-lang/python:     2.3.5-r2 
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.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="-Os -pipe" 
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="-Os -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com http://gentoo.mirrors.tds.net" 
LANG="en_US.UTF-8" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="x86 X alsa apache2 apm arts avi berkdb bitmap-fonts crypt curl eds emboss 
encode foomaticdb fortran gd gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 
jpeg kde libg++ libwww mad mikmod motif mp3 mpeg mysql ncurses nls ogg 
oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl spell 
ssl tcpd truetype truetype-fonts type1-fonts vorbis xml2 xmms xv zlib 
userland_GNU kernel_linux elibc_glibc" 
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY 
 
Comment 15 Thomas Meyer 2005-10-07 10:25:23 UTC
Problem still persists with vlc-0.8.2-r2.
i use the "hardened" flag. switching to vanilla specs with
"gcc-config i686-pc-linux-gnu-3.4.4-vanilla"  solves the problem.
Comment 16 Zac Medico gentoo-dev 2005-10-10 19:04:31 UTC
Temporarily adding CFLAGS=-fomit-frame-pointer as suggested in comment #13 works
for me with gcc-3.4.3-r1 and vlc-0.8.2-r2.
Comment 17 Olivier Castan 2005-10-16 10:15:36 UTC
Same problem here on x86 hardened config. Switching to vanilla gcc did not
solved the problem, but adding -fomit-frame-pointer to CFLAGS gives a successful
build both with vanilla and hardened gcc.
Comment 18 Mark Loeser (RETIRED) gentoo-dev 2005-10-30 12:33:55 UTC
This should be fixed in the tree now.  I added back the logic to only strip
-fomit-frame-pointer for gcc-2, which was mysteriously dropped.