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 141083 - gstreamer-0.8.1 compile failure with gcc-3.4: error: PIC register `ebx' clobbered in `asm'
gstreamer-0.8.1 compile failure with gcc-3.4: error: PIC register `ebx' clobb...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.1
Other Linux
: Normal normal
: 0.8.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 141216 142554 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-04-25 17:05 UTC by Ed Catmur
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
gstreamer-0.8.1-ebx-clobber.patch (1.14 KB, patch)
2004-04-25 17:11 UTC, Ed Catmur
none Details | Review

Description Ed Catmur 2004-04-25 17:05:42 UTC
On x86 (i686-pc-linux-gnu):

if /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..   
-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2
  -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -I..  -Wall
-DGST_DISABLE_DEPRECATED -g -I../libs -I../include 
-DG_LOG_DOMAIN=g_log_domain_gstreamer -DGST_MAJORMINOR=\""0.8"\"  -O2 -pipe
-march=athlon-xp -fprefetch-loop-arrays -MT libgstreamer_0.8_la-gstelement.lo
-MD -MP -MF ".deps/libgstreamer_0.8_la-gstelement.Tpo" \
  -c -o libgstreamer_0.8_la-gstelement.lo `test -f 'gstelement.c' || echo
'./'`gstelement.c; \
then mv -f ".deps/libgstreamer_0.8_la-gstelement.Tpo"
".deps/libgstreamer_0.8_la-gstelement.Plo"; \
else rm -f ".deps/libgstreamer_0.8_la-gstelement.Tpo"; exit 1; \
fi
gstcpu.c: In function `gst_cpuid_i386':
gstcpu.c:72: error: PIC register `ebx' clobbered in `asm'

Also in gst/gsttrashstack.h.

Tentative patch attached (needs review by someone who groks x86 asm)
Comment 1 Ed Catmur 2004-04-25 17:11:36 UTC
Created attachment 27080 [details] [review]
gstreamer-0.8.1-ebx-clobber.patch

In gstcpu.c: removes mark ebx as clobbered
In gsttrashstack.h: saves and restores ebx, removes mark ebx as clobbered

Downstream: http://bugs.gentoo.org/show_bug.cgi?id=48953
Comment 2 Ronald Bultje 2004-04-25 20:11:30 UTC
Can you confirm that this isn't just a compiler bug? Gentoo often uses
non-official or just plain buggy versions of gcc (not on purpose, but that's the
point here). RedHat/Debian & co all use versions with several patches added to
fix those issues.

Note that I know nothing about assembler. ;).
Comment 3 Robert Moss 2004-04-25 22:21:57 UTC
This isn't a compiler bug. It's your bug. From here:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8546

We have the following:

State-Changed-From-To: analyzed->closed
State-Changed-Why: Clobbering %ebx is now illegal in PIC mode on mainline (which
will likely become gcc 3.4).

As such, you shouldn't be clobbering it.
Comment 4 Robert Moss 2004-04-25 22:51:38 UTC
Also please note that the above mentioned bug was closed in December 2002, and
AFAIK the illegality of clobbering %ebx in PIC mode has been documented since
even before that.
Comment 5 David Schleef 2004-04-26 20:05:26 UTC
Ok, fixed in CVS.
Comment 6 David Schleef 2004-04-27 17:50:24 UTC
*** Bug 141216 has been marked as a duplicate of this bug. ***
Comment 7 David Schleef 2004-05-14 19:07:55 UTC
*** Bug 142554 has been marked as a duplicate of this bug. ***