Bug 297961 - gcj (aot-compile-rpm) causes assembler errors!
Summary: gcj (aot-compile-rpm) causes assembler errors!
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-20 11:55 UTC by Hans de Goede
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-10-17 21:22:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Hans de Goede 2007-09-20 11:55:28 UTC
To reproduce, download:
http://people.atrpms.net/~hdegoede/sdljava-0.9.1-4.fc8.src.rpm
(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:
<snip>
+ /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 `-'
<snip>
{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 14:10:09 UTC
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:

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

*/
package foo;

doesn't create any output and gcj -S package-info.java ICEs.

Comment 2 Hans de Goede 2007-09-20 14:52:46 UTC
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 13:02:14 UTC
Patch upstream; see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33639.

Comment 4 Jakub Jelinek 2007-10-17 21:22:54 UTC
In gcc-4.1.2-32.


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