public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lucabon at interfree dot it" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug java/41802] When attempting to compile pdftk-1.41 my machine comes to a grind
Date: Thu, 11 Feb 2010 15:38:00 -0000	[thread overview]
Message-ID: <20100211153808.20672.qmail@sourceware.org> (raw)
In-Reply-To: <bug-41802-18349@http.gcc.gnu.org/bugzilla/>



------- Comment #7 from lucabon at interfree dot it  2010-02-11 15:38 -------
(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > 
> > Use another Java-to-bytecode compiler and feed gcc with bytecode.

I'd like to use only free software... There is another free (GPL-compatible)
java-to-bytecode compiler?

> Btw, the symptoms you are seeing hint at not working garbage collection.
> You might want to report this to your operating system vendor.

Sorry, but I think the garbage collector is from gcc (libgcj), not from
operating system.
I try to substitute ecj1 with a shell script:

#!/usr/bin/sh
gij -cp /usr/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.GCCMain
"$@"

And the simptom are the same, so I think the problem is inside gcc java
interpreter. If I substitute "gij" with Sun "java", the compilation ends with
"only" about 400MB memory used.
Go deeply, gcj call ecj1 with the following arguments:
ecj1 Anchor.java -w -fbootclasspath=../../../:/usr/share/java/libgcj-4.3.3.jar
-fencoding=utf8 -fsource=1.5 -ftarget=1.5 -fzip-dependency /tmp/ccAgHLvl.zip
-fzip-target /tmp/cccrxtPw.jar
If I remove the last argument, class files are generated in the file system and
ecj1/gij uses "only" about 130MB of memory. If I re-add the -fzip-target
parameter with .class files into the file system, compilation is really fast.

So, I think the problem is in gcc 64bit java interpreter when it stores the
.class files in memory instead of file system.

(In reply to comment #6)
> Even if you fix this issue, I don't believe you will be able to compile
> pdftk.cc with gcc 4.3 or later...
> 
> http://gcc.gnu.org/ml/java/2008-03/msg00028.html
> 
> due to the code incorrectly mixing c++ and java exceptions which are no longer
> allowed under FSF gcc.

pdftk will finally compile correctly (I have the executable), but it takes many
hours to compile... I have only to apply a little patch to remove local
java.security.MessageDigest.

Luca


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41802


  parent reply	other threads:[~2010-02-11 15:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-22 22:36 [Bug java/41802] New: " tink dot lq at gmail dot com
2010-02-06 21:09 ` [Bug java/41802] " lucabon at interfree dot it
2010-02-06 21:29 ` rguenth at gcc dot gnu dot org
2010-02-10 19:56 ` lucabon at interfree dot it
2010-02-10 20:46 ` rguenth at gcc dot gnu dot org
2010-02-10 20:47 ` rguenth at gcc dot gnu dot org
2010-02-10 21:39 ` howarth at nitro dot med dot uc dot edu
2010-02-11 15:38 ` lucabon at interfree dot it [this message]
2010-02-11 18:10 ` pinskia at gcc dot gnu dot org
2010-02-11 21:14 ` lucabon at interfree dot it
2010-02-12 14:40 ` howarth at nitro dot med dot uc dot edu
2010-02-12 17:18 ` lucabon at interfree dot it
2010-02-13 10:28 ` lucabon at interfree dot it
2010-02-13 10:58 ` rguenth at gcc dot gnu dot org
2010-02-13 11:52 ` mikpe at it dot uu dot se
2010-02-13 13:31 ` rguenth at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100211153808.20672.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).