public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/42143] New: gcj creates "dummy" variables
@ 2009-11-22 12:51 kurt at roeckx dot be
2009-12-06 16:03 ` [Bug java/42143] " kurt at roeckx dot be
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: kurt at roeckx dot be @ 2009-11-22 12:51 UTC (permalink / raw)
To: java-prs
Hi,
When running the libtool regression tests, I get the following error:
gcj -shared -Wl,--whole-archive ./.libs/liba1.a ./.libs/liba2.a
-Wl,--no-whole-archive -Wl,-soname -Wl,liba12.so.0 -o .libs/liba12.so.0.0.0
./.libs/liba2.a(A2.o):(.rodata+0x0): multiple definition of `java resource
.dummy'
./.libs/liba1.a(A1.o):(.rodata+0x0): first defined here collect2: ld returned 1
exit status
Looking at liba1.a I see:
Relocation section '.rela.text' at offset 0x1ad0 contains 3 entries:
Offset Info Type Sym. Value Sym. Name +
Addend000000000005 002600000004 R_X86_64_PLT32 0000000000000000
_ZN4java4lang6ObjectC1 - 4
000000000023 002300000002 R_X86_64_PC32 0000000000000000 _ZGr8_$_dummy - 4
[...]
Symbol table '.symtab' contains 54 entries:
Num: Value Size Type Bind Vis Ndx Name
[...]
35: 0000000000000000 16 OBJECT GLOBAL HIDDEN 11 _ZGr8_$_dummy
There is nothing called "dummy" in the source file. The source
file is:
public class foo1 {
public static void main(String[] argv) {
A1 a1 = new A1();
}
}
It can also be reproduced with a file that just
has "public class foo1 {}"
I get this error with Debian's 4.3.4-4. The version 4.3.2-2 does not generate
that symbol. An old build log of libtool with gcj version 4.3.3-3 also does
not show the error.
--
Summary: gcj creates "dummy" variables
Product: gcc
Version: 4.3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kurt at roeckx dot be
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/42143] gcj creates "dummy" variables
2009-11-22 12:51 [Bug java/42143] New: gcj creates "dummy" variables kurt at roeckx dot be
@ 2009-12-06 16:03 ` kurt at roeckx dot be
2010-02-16 10:34 ` [Bug java/42143] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: kurt at roeckx dot be @ 2009-12-06 16:03 UTC (permalink / raw)
To: java-prs
------- Comment #1 from kurt at roeckx dot be 2009-12-06 16:03 -------
Can someone please take a look at this?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/42143] [4.3/4.4/4.5 Regression] gcj creates "dummy" variables
2009-11-22 12:51 [Bug java/42143] New: gcj creates "dummy" variables kurt at roeckx dot be
2009-12-06 16:03 ` [Bug java/42143] " kurt at roeckx dot be
@ 2010-02-16 10:34 ` rguenth at gcc dot gnu dot org
2010-02-17 17:51 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-02-16 10:34 UTC (permalink / raw)
To: java-prs
------- Comment #2 from rguenth at gcc dot gnu dot org 2010-02-16 10:34 -------
It works for me with FSF 4.3.4. You might want to report this to Debian.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Target Milestone|--- |4.3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/42143] [4.3/4.4/4.5 Regression] gcj creates "dummy" variables
2009-11-22 12:51 [Bug java/42143] New: gcj creates "dummy" variables kurt at roeckx dot be
2009-12-06 16:03 ` [Bug java/42143] " kurt at roeckx dot be
2010-02-16 10:34 ` [Bug java/42143] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2010-02-17 17:51 ` mmitchel at gcc dot gnu dot org
2010-03-09 21:43 ` pjames at avtrex dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2010-02-17 17:51 UTC (permalink / raw)
To: java-prs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/42143] [4.3/4.4/4.5 Regression] gcj creates "dummy" variables
2009-11-22 12:51 [Bug java/42143] New: gcj creates "dummy" variables kurt at roeckx dot be
` (2 preceding siblings ...)
2010-02-17 17:51 ` mmitchel at gcc dot gnu dot org
@ 2010-03-09 21:43 ` pjames at avtrex dot com
2010-03-10 8:05 ` michele at focuseek dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pjames at avtrex dot com @ 2010-03-09 21:43 UTC (permalink / raw)
To: java-prs
------- Comment #3 from pjames at avtrex dot com 2010-03-09 21:43 -------
I was able to reproduce in Fedora Core 6 and Fedora Core 11
mipsel-linux-gcc (GCC) 4.3.4 20090326 (prerelease)
I was able to avoid the problem by first compiling my .java files to .class
files, then compiling the .class files to .o files. (compiling straight from
.java to .o introduced the dummy symbol)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/42143] [4.3/4.4/4.5 Regression] gcj creates "dummy" variables
2009-11-22 12:51 [Bug java/42143] New: gcj creates "dummy" variables kurt at roeckx dot be
` (3 preceding siblings ...)
2010-03-09 21:43 ` pjames at avtrex dot com
@ 2010-03-10 8:05 ` michele at focuseek dot com
2010-03-10 8:09 ` michele at focuseek dot com
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: michele at focuseek dot com @ 2010-03-10 8:05 UTC (permalink / raw)
To: java-prs
------- Comment #4 from michele at focuseek dot com 2010-03-10 08:05 -------
Yesterday I filed the suspiciously similar bug 42143 with a really simple test
case that fails on gcc 4.4.3 and used to work with gcc 4.2.2. As I wrote in the
description for that bug I suspect it's actually a duplicate of this bug but I
can't confirm it easily as I don't have binutils sources at hand.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/42143] [4.3/4.4/4.5 Regression] gcj creates "dummy" variables
2009-11-22 12:51 [Bug java/42143] New: gcj creates "dummy" variables kurt at roeckx dot be
` (4 preceding siblings ...)
2010-03-10 8:05 ` michele at focuseek dot com
@ 2010-03-10 8:09 ` michele at focuseek dot com
2010-04-23 19:49 ` [Bug java/42143] [4.3/4.4/4.5/4.6 " kurt at roeckx dot be
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: michele at focuseek dot com @ 2010-03-10 8:09 UTC (permalink / raw)
To: java-prs
------- Comment #5 from michele at focuseek dot com 2010-03-10 08:09 -------
(In reply to comment #4)
> [...] suspiciously similar bug 42143 [...]
I meant bug 43302...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/42143] [4.3/4.4/4.5/4.6 Regression] gcj creates "dummy" variables
2009-11-22 12:51 [Bug java/42143] New: gcj creates "dummy" variables kurt at roeckx dot be
` (5 preceding siblings ...)
2010-03-10 8:09 ` michele at focuseek dot com
@ 2010-04-23 19:49 ` kurt at roeckx dot be
2010-05-03 18:36 ` glarkin at FreeBSD dot org
2010-05-22 18:33 ` rguenth at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: kurt at roeckx dot be @ 2010-04-23 19:49 UTC (permalink / raw)
To: java-prs
------- Comment #6 from kurt at roeckx dot be 2010-04-23 19:49 -------
So can someone please comment on this?
--
kurt at roeckx dot be changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |UNCONFIRMED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/42143] [4.3/4.4/4.5/4.6 Regression] gcj creates "dummy" variables
2009-11-22 12:51 [Bug java/42143] New: gcj creates "dummy" variables kurt at roeckx dot be
` (6 preceding siblings ...)
2010-04-23 19:49 ` [Bug java/42143] [4.3/4.4/4.5/4.6 " kurt at roeckx dot be
@ 2010-05-03 18:36 ` glarkin at FreeBSD dot org
2010-05-22 18:33 ` rguenth at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: glarkin at FreeBSD dot org @ 2010-05-03 18:36 UTC (permalink / raw)
To: java-prs
------- Comment #7 from glarkin at FreeBSD dot org 2010-05-03 18:36 -------
(In reply to comment #6)
> So can someone please comment on this?
>
I recently encountered this problem while using gcc/gcj 4.5 with ecj-4.5.jar to
compile the pdftk utility (http://www.accesspdf.com/pdftk/) on FreeBSD. I
maintain the pdftk port for FreeBSD, and I previously used gcc/gcj 4.2 with
ecj-4.3.jar without any problems.
I found a workaround by patching the pdftk Makefiles like so:
##
# implicit rules for creating A from B
%.o : %.java
$(GCJ) $(GCJFLAGS) -c $< -o $@
+ ${OBJCOPY} -L '_ZGr8_$$_dummy' $@
The FreeBSD objcopy command changes the .dummy resource from global scope to
local scope in each .o file. After doing that, the pdftk link phase succeeded
instead of dying with a ton of "duplicate symbol" errors.
After searching for the source of the duplicate symbol, I think I found it
here:
http://gcc.gnu.org/ml/java-patches/2009-q1/msg00049.html
If the patch included in this message is the source of the duplicate symbol
problem, then I wonder if it could be fixed like so?
String someRandomString = <generate random string>();
ZipEntry entry = new ZipEntry(".dummy" + someRandomString);
Feedback welcome,
Greg Larkin
--
glarkin at FreeBSD dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |glarkin at FreeBSD dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug java/42143] [4.3/4.4/4.5/4.6 Regression] gcj creates "dummy" variables
2009-11-22 12:51 [Bug java/42143] New: gcj creates "dummy" variables kurt at roeckx dot be
` (7 preceding siblings ...)
2010-05-03 18:36 ` glarkin at FreeBSD dot org
@ 2010-05-22 18:33 ` rguenth at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-22 18:33 UTC (permalink / raw)
To: java-prs
------- Comment #8 from rguenth at gcc dot gnu dot org 2010-05-22 18:13 -------
GCC 4.3.5 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.5 |4.3.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-05-22 18:33 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-22 12:51 [Bug java/42143] New: gcj creates "dummy" variables kurt at roeckx dot be
2009-12-06 16:03 ` [Bug java/42143] " kurt at roeckx dot be
2010-02-16 10:34 ` [Bug java/42143] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
2010-02-17 17:51 ` mmitchel at gcc dot gnu dot org
2010-03-09 21:43 ` pjames at avtrex dot com
2010-03-10 8:05 ` michele at focuseek dot com
2010-03-10 8:09 ` michele at focuseek dot com
2010-04-23 19:49 ` [Bug java/42143] [4.3/4.4/4.5/4.6 " kurt at roeckx dot be
2010-05-03 18:36 ` glarkin at FreeBSD dot org
2010-05-22 18:33 ` rguenth at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).