From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18449 invoked by alias); 3 May 2010 18:36:03 -0000 Received: (qmail 18429 invoked by uid 48); 3 May 2010 18:36:02 -0000 Date: Mon, 03 May 2010 18:36:00 -0000 Message-ID: <20100503183602.18428.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug java/42143] [4.3/4.4/4.5/4.6 Regression] gcj creates "dummy" variables In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "glarkin at FreeBSD dot org" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2010-q2/txt/msg00032.txt.bz2 ------- 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 = (); 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