[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#108729: package declarations in main class file fail



Package: gcj-3.0
Version: 1:3.0.1-0pre010811
Severity: important

I'm having trouble with the GCJ included in Debian sid.  Here's a
sample file:

,----[ Test.java ]
| package gnu.foo;
| 
| class Test {
|     public static void main(String[] args) {
| 	System.out.println("Hello, World!");
|     }
| }
`----

But:

,----[ *compilation* ]
| gcj-3.0 -o Test --main=Test Test.java
| /tmp/cctAs4jG.o: In function `main':
| /tmp/ccvuhFZz.i(.text+0x2e): undefined reference to `Test::class$'
| /tmp/ccvuhFZz.i(.text+0x32): undefined reference to `Test::class$'
| collect2: ld returned 1 exit status
`----

However, if I remove the package declaration, everything seems to work
fine.

FWIW, I'm running on a host of type powerpc-debian-linux-gnu.

-- System Information
Debian Release: testing/unstable
Kernel Version: Linux space-ghost 2.4.8-pre3+ipsec+xfs #3 Sun Aug 5 04:19:42 EDT 2001 ppc unknown

Versions of the packages gcj-3.0 depends on:
ii  gcc-3.0        3.0.1-0pre0108 The GNU C compiler.
ii  gcc-3.0-base   3.0.1-0pre0108 The GNU Compiler Collection (base package).
ii  java-common    0.7            Base of all Java packages
ii  libc6          2.2.3-6        GNU C Library: Shared libraries and Timezone
ii  libgcj2-dev    3.0.1-0pre0108 Java development headers and static library 
ii  zlib1g         1.1.3-15       compression library - runtime



Reply to: