From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7590 invoked by alias); 2 Mar 2010 15:28:11 -0000 Received: (qmail 7575 invoked by uid 22791); 2 Mar 2010 15:28:10 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from gundam.focuseek.com (HELO smtp.focuseek.com) (95.110.193.79) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Mar 2010 15:28:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.focuseek.com (Postfix) with ESMTP id 3BC70C8051 for ; Tue, 2 Mar 2010 16:28:04 +0100 (CET) Received: from smtp.focuseek.com ([127.0.0.1]) by localhost (smtp.focuseek.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id WxcdU0WIlhmr for ; Tue, 2 Mar 2010 16:27:55 +0100 (CET) Received: from nestor.cb.focuseek.com (host35-206-dynamic.9-79-r.retail.telecomitalia.it [79.9.206.35]) (Authenticated sender: michele) by smtp.focuseek.com (Postfix) with ESMTP id C0D5CC8047 for ; Tue, 2 Mar 2010 16:27:54 +0100 (CET) Message-ID: <4B8D2E7A.5050503@focuseek.com> Date: Tue, 02 Mar 2010 15:28:00 -0000 From: Michele Bini User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.8) Gecko/20100216 Thunderbird/3.0.2 MIME-Version: 1.0 To: java@gcc.gnu.org Subject: Dummy resources in object files? Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg00001.txt.bz2 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