public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Dummy resources in object files?
@ 2010-03-02 15:28 Michele Bini
  0 siblings, 0 replies; only message in thread
From: Michele Bini @ 2010-03-02 15:28 UTC (permalink / raw)
  To: java

Hello everybody and please excuse me if this is not the proper place to
ask but I didn't find another one.

After upgrading from gcc 4.2.2 to 4.4.3 I started to get link-time
complaints about "multiple definition of `java resource .dummy'".

My executable is made in two steps. First groups of java sources are
compiled to .o files (the sources come from various java libraries and I
have one .o file per library) and then these .o files are linked into an
executable like this:

gcj -o myprg --main=MyProg bins.o lib1.o lib2.o ...

Here I get the "multiple definition" error and indeed most of the .o
files I produce with gcj 4.4.3 define the symbol _ZGr8_$_dummy which,
looking gcj sources, should be a resource called ".dummy".

As I have no .dummy resource (actually, I have no resources at all) I
started digging. A minimal example to get a .o file containing .dummy is
a foo.java containing just:

public class foo {}

If I build this with:

gcj -c -o foo.o foo.java

foo.o defines _ZGr8_$_dummy. I added a -save-temps and the produced
foo.jar contains an empty .dummy file, too. I also get a foo.zip
containing *only* an empty .dummy entry.

This happens on a centos 5.3 with a self-compiled gcc 4.4.3 configured with:

../gcc-4.4.3/configure --prefix="/opt/focuseek-build-fsk" \
	    --program-suffix=-fsk \
	    --enable-languages=c,c++,java \
	    --enable-shared --enable-threads \
	    --enable-__cxa_atexit \
	    --enable-libgcj-multifile

The configuration is what I used for years with 4.2.2. The md5 for
ecj.jar is d7cd6a27c8801e66cbaa964a039ecfdb and it was retrieved today
with contrib/download_ecj.

Looking in bugzilla I found bug #42143 which looks quite similar but I
don't really know whether this is the same problem, another one or if
I'm doing something wrong.

Thus, any help would be appreciated :)

Thanks,
Michele

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-02 15:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-02 15:28 Dummy resources in object files? Michele Bini

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).