After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 136658 - gst-ffmpeg : asm compilation problem
gst-ffmpeg : asm compilation problem
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal normal
: 0.8.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-03-09 16:19 UTC by Stephane Loeuillet
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: 2.6.next
GNOME version: 2.3/2.4


Attachments
build log when it fails (the usual way i compile it) (45.81 KB, patch)
2004-03-15 23:27 UTC, Stephane Loeuillet
none Details | Review
build log when it works (building it manually after autoregen with params) (121.51 KB, text/plain)
2004-03-15 23:28 UTC, Stephane Loeuillet
  Details

Description Stephane Loeuillet 2004-03-09 16:19:59 UTC
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libavcodec
-DHAVE_AV_CONFIG_H=1 -msse -O0 -ggdb -MT libmmxsse_la-dsputil_mmx.lo -MD
-MP -MF .deps/libmmxsse_la-dsputil_mmx.Tpo -c dsputil_mmx.c  -fPIC -DPIC -o
.libs/libmmxsse_la-dsputil_mmx.o
dsputil_mmx.c: In function `h263_h_loop_filter_mmx':
dsputil_mmx.c:614: error: can't find a register in class `GENERAL_REGS'
while reloading `asm'
make[8]: *** [libmmxsse_la-dsputil_mmx.lo] Erreur 1
make[8]: Leaving directory
`/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg/libavcodec/i386'
make[7]: *** [all-recursive] Erreur 1
make[7]: Leaving directory
`/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg/libavcodec'
make[6]: *** [all-recursive] Erreur 1
make[6]: Leaving directory
`/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg'
make[5]: *** [all] Erreur 2
make[5]: Leaving directory
`/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg/ffmpeg'
make[4]: *** [all-recursive] Erreur 1
make[4]: Leaving directory
`/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext/ffmpeg'
make[3]: *** [all-recursive] Erreur 1
make[3]: Leaving directory
`/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs/ext'
make[2]: *** [all-recursive] Erreur 1
make[2]: Leaving directory
`/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg/gst-libs'
make[1]: *** [all-recursive] Erreur 1
make[1]: Leaving directory
`/usr/portage/tmp/portage/gst-plugins-ffmpeg-0.7.4/work/gst-ffmpeg'
make: *** [all] Erreur 2

gcc-3.3.3, glibc-2.3.3_pre20040207-r0, linux kernel 2.4.25
Athlon XP
Comment 1 Stephane Loeuillet 2004-03-15 23:27:31 UTC
Created attachment 25679 [details] [review]
build log when it fails (the usual way i compile it)
Comment 2 Stephane Loeuillet 2004-03-15 23:28:25 UTC
Created attachment 25680 [details]
build log when it works (building it manually after autoregen with params)
Comment 3 Thomas Vander Stichele 2004-03-16 10:00:21 UTC
a few observations on the first one:

a)
 [32;01m*[0m Patching ${S}/gst-libs/ext/ffmpeg/ltmain.sh...
 [33;01m*[0m   Could not apply portage.patch!
 [33;01m*[0m   Please verify that it is not needed.
 [33;01m*[0m Cannot apply any patch, running libtoolize...
 [32;01m*[0m Patching ${S}/ltmain.sh...
 [33;01m*[0m   Could not apply portage.patch!
 [33;01m*[0m   Please verify that it is not needed.
 [33;01m*[0m Cannot apply any patch, running libtoolize...

1) why is it trying to do these patches ?
2) why does it run libtoolize ?

IMO it shouldn't be trying to do this.

b) I cannot see the line it uses to run configure.  What does it use ?
c) 
There's a clear warning in the configure run:
configure: WARNING: If you wanted to set the --build type, don't use
--host.
    If a cross compiler is detected then cross compile mode will be used.

I think this probably should be heeded, ie don't use --host

d) there are some more problems further down during configure:
checking whether stripping libraries is possible... yes
./configure: line 20638: test: too many arguments
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking for log... no
checking for log in -lm... yes
checking whether compiler understands -Wall... yes
./configure: line 21437: test: too many arguments

maybe check what's being tested on those two lines in configure

e) This part is giving the error:
f /bin/sh ../../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I.
-I../.. -I../../libavcodec -DHAVE_AV_CONFIG_H=1   -msse -O0 -ggdb -MT
libmmxsse_la-dsputil_mmx.lo -MD -MP -MF
".deps/libmmxsse_la-dsputil_mmx.Tpo" -c -o libmmxsse_la-dsputil_mmx.lo
`test -f 'dsputil_mmx.c' || echo './'`dsputil_mmx.c; \
then mv -f ".deps/libmmxsse_la-dsputil_mmx.Tpo"
".deps/libmmxsse_la-dsputil_mmx.Plo"; else rm -f
".deps/libmmxsse_la-dsputil_mmx.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../libavcodec
-DHAVE_AV_CONFIG_H=1 -msse -O0 -ggdb -MT libmmxsse_la-dsputil_mmx.lo
-MD -MP -MF .deps/libmmxsse_la-dsputil_mmx.Tpo -c dsputil_mmx.c  -fPIC
-DPIC -o .libs/libmmxsse_la-dsputil_mmx.o
dsputil_mmx.c: In function `h263_h_loop_filter_mmx':
dsputil_mmx.c:614: error: can't find a register in class
`GENERAL_REGS' while reloading `asm'
make[8]: *** [libmmxsse_la-dsputil_mmx.lo] Erreur 1

You said it seems the only difference seems to be -O0 -ggdb right ?
Maybe try to use this line manually in that dir, but use -O2 like you
do in the other one, and see if that works.  If it does, you can be
reasonably sure it's a problem with these cflags, but I'm not yet
convinced.

Basically, the thing to do is to compare both outputs, and compare the
differences in environment and invocation between the two runs.
Comment 4 Ronald Bultje 2004-03-16 15:15:01 UTC
-ggdb sounds like a register-eater. Remove that please? Why don't you
"just" use -g?
Comment 5 Stephane Loeuillet 2004-03-26 22:16:52 UTC
well, i've found the truth there :
http://gcc.gnu.org/ml/gcc-bugs/2004-01/msg03115.html
http://gcc.gnu.org/ml/gcc-bugs/2004-01/msg03121.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13850

it seems that this bug was specialy invented for ffmpeg compilation (quite all
the first google page is about ffmpeg miscompiling)

in the end, -O0 won't work, same for -O2, -O3 ... but -O1 works

someone give me a gun