Bug 297961 - gcj (aot-compile-rpm) causes assembler errors!
gcj (aot-compile-rpm) causes assembler errors!
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2007-09-20 07:55 EDT by Hans de Goede
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-10-17 17:22:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Hans de Goede 2007-09-20 07:55:28 EDT
To reproduce, download:
(100% free software, under review for Fedora)

Make sure your java and javac alternatives point to gcj
Build it on rawhide (using gcc & friends: 4.1.2-25), result:
+ /usr/bin/aot-compile-rpm
/usr/bin/gcj -c -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic
-fasynchronous-unwind-tables -fPIC -findirect-dispatch -fjni
sdljava-0.9.1.jar.1.jar -o sdljava-0.9.1.jar.1.o
{standard input}: Assembler messages:
{standard input}:156056: Error: junk at end of line, first unrecognized
character is `-'
{standard input}:156057: Error: bad or irreducible absolute expression
{standard input}:156057: Error: junk at end of line, first unrecognized
character is `,'
{standard input}:156060: Error: unrecognized symbol type ""
{standard input}:156060: Error: junk at end of line, first unrecognized
character is `-'
{standard input}:156061: Error: expected comma after name
`_CD_sdljava_audio_package' in .size directive
{standard input}:156062: Error: invalid character '_' in mnemonic
{standard input}:156066: Error: unrecognized symbol type ""
{standard input}:156066: Error: junk at end of line, first unrecognized
character is `-'
{standard input}:422422: Error: expected comma after name
`_catch_classes_sdljavax.gfx.package' in .size directive
{standard input}:422423: Error: invalid character '_' in mnemonic
make: *** [sdljava-0.9.1.jar.1.o] Error 1
aot-compile-rpm: error: /usr/bin/make exited with code 2
error: Bad exit status from /var/tmp/rpm-tmp.57191 (%install)


Now install java-1.7.0-icedtea-devel if not already installed and set the
java and javac alternatives to auto. Build again -> build succeeds.

Additional notes:
1) Note that even when using icedtea, eventually gcj still gets called, so
appearantly the .class files build by gcj's own javac are not liked by it (jar
being the fault is highly unlikely)! 

2) The sdljava demos will run fine using gcj when build with icedtea
Comment 1 Jakub Jelinek 2007-09-20 10:10:09 EDT
The problem is that ant jar which is used for *.java -> *.class compilation
in this package (why?) creates from package-info.java sources package-info.class
(unlike e.g. ecj or gcj) and gcj assumes classes don't contain invalid characters
in class names.
Not sure if ant must be fixed not to do that, or instead gcj should
somehow special case package-info.class, or something else.

BTW, gcj -C on package-info.java, e.g.:

Provides foo

<h2>Package Specification</h2>

Detailed documentation can be found here:

  <li><a href="http://www.foo.com">Foobar</a>

package foo;

doesn't create any output and gcj -S package-info.java ICEs.
Comment 2 Hans de Goede 2007-09-20 10:52:46 EDT
About comment #2, I'm a bit new to the java packaging game and I can't follow
you, if you want any info / answers from me can you rephrase please?

Also I just tried doing an F-7 mock build of this and there things work fine, so
this is a regression compared to F-7.
Comment 3 Andrew Haley 2007-10-03 09:02:14 EDT
Patch upstream; see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33639.
Comment 4 Jakub Jelinek 2007-10-17 17:22:54 EDT
In gcc-4.1.2-32.

Note You need to log in before you can comment on or make changes to this bug.