When I try to compile a source file with inline assembly in it, I receive an error message indicating an internal error and advised to submit a bug report. Reproducible: Always Steps to Reproduce: 1. In a console, I tried to compile the source file without any switches i.e. gcc inline.c 2. 3. Actual Results: Source doesn't compile and I get an error message Expected Results: The output of a compiled binary Portage 2.0.48-r5 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1) ================================================================= System uname: 2.4.21 i686 AMD Athlon(TM) XP 1800+ GENTOO_MIRRORS="http://mirror.3fl.net/pub/gentoo rsync://203.16.234.20/gentoo/ ftp://203.16.234.20/pub/gentoo/ ftp://203.16.234.19/pub/gentoo/ http://203.16.234.19/pub/gentoo/ http://203.16.234.20/pub/gentoo/ http://www.ibiblio.org/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="" USE="foomaticdb libg++ mad mikmod nls quicktime xml2 xv readline tetex tcltk sdl libwww python imlib motif mozilla radeon -sis -rage128 -i8x0 -matrox -gamma -3dfx 3dnow sse -acl -afs -apm -atlas X gtk -kde -qt -gnome -arts alsa avi -berkdb -bonobo -canna -cdr -cjk crypt cups -dga -directfb -doc dvd encode -esd -evo fbcon -flash -freewnn -gb gd gdbm -ggi -ggz -gphoto2 gpm gtk2 -gtkhtml -guile -innodb -junit imap ncurses java jikes -ldap -leim -mysql -mule -nas -nocardbus -oci8 -pcmcia -pda -plotutils opengl oggvorbis -oss pdflib perl png -ruby -scanner -slang sasl spell -voodoo3 -trusted -wavelan -zeo -ppc -sparc -sparc64 -alpha tcpd xmms x86 gif ipv6 jpeg kerberos mbox mmx mpeg pam ssl svga truetype zlib qt31patch" COMPILER="gcc3" CHOST="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -fforce-addr -falign-functions=4" CXXFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -fforce-addr -falign-functions=4" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="ccache buildpkg sandbox"
Created attachment 16316 [details] Error messaged outputted by GCC
Created attachment 16317 [details] Strace of GCC compile
Created attachment 16318 [details] Source file trying to compile
*** Bug 26923 has been marked as a duplicate of this bug. ***
Could you please provide the name of the package that produced this error? I attempted to compile the inline assembler source file you provided, but I get a different error than what your posted error shows.
All I used is gcc, package: sys-devel/gcc-3.2.3-r1. If it's due to some other package (glibc etc.) I wouldn't know. If this isn't the info you needed let me know
I mean, can you provide the name of a package that has inline assembly in it that you attempted to compile and thus generated the failure. Or did you attempt to compile a package (or source file) outside of Portage which generated this error?
I tried to compile the source (outside of portage) attached above i.e. inline.c. No other packages have caused this error.
This apparently doesn't seem to conern Gentoo specifically...You could have bad ASM that GCC just doesn't like or something, it;s tricky to tell. All of my machines run gcc-3.3.1 now, so I can't exactly test your case, however, under gcc-3.3.1, gcc gives the following errors with your provided inline asm example: (the source was saved as t.c): ]# gcc t.c -o t t.c: In function `main': t.c:8: error: impossible constraint in `asm' Might I inquire what this source is from? a package not in gentoo yet, or some personal project of your own?
It's some source a lecturer gave me to show some differences between intel syntax and AT&T syntax. My lecturer claimed he could compile it on gcc3.2 (non-gentoo, not sure of setup) and I can compile it under gcc2.95 (under debian), however,I get the same error under debian using gcc3.3. Google indicates that this error has happened before under gcc3.3, and that it's not a bug but something wrong with the syntax. I only sent in the bug-report due to the request in the initial (gcc3.2) error message and apologise for wasting your (and anyone elses) time.
When I say I get the same error under gcc3.3, that's the same as you not the same as my previous.
I would not be honestly surprised if something got changed in gcc-3.3 that rendered this code invalid. The move to gcc-3.3 has caused a number of headaches, hence what the gcc-porting team is for. One of the fun little aspects is the fact that gcc-3.3 no longer accepts multi-line strings, so everytime a package is discovered with a multi-line string, it has to be patched up so that gcc-3.3 will compile it. This subtle change in accepted assembler syntax with gcc is likely another strange tweak. I myself know virtually nothing about assembler except that it can give you gray hairs, so I do not understand the cause as to why this fails. I'm sure somewheres on the gcc website (http://gcc.gnu.org/), they have some kind of a document explaining in detail all of the changes from 3.2 to 3.3, and that may have information regarding the change that causes your assembler source to fail. I would look there for further information, as well as inform your lecturer (assuming a professor or instructor of a class) of this issue and see if they may know something (this may even be news to them as well). All in all, I'll mark this bug as INVALID, since there's really not much that can be done about it. It wasn't exactly a bug in gentoo per-say, just that Gentoo changes the original gcc error message to inform users to report failures on gentoo systems to Gentoo's bugzilla. This is likely in an attempt to prevent a deluge of bugs reports to GCC's own bugzilla team. Since you've seen this oddity on debian's gcc-3.3, I'd bet you would also see it on Redhat's and SuSE's as well. And I wouldn't consider this a waste of time either....it's something learned that may prove of use.