public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mike Hearn <mike@plan99.net>
To: Andrew Haley <aph@redhat.com>
Cc: GCC Java <java@gcc.gnu.org>
Subject: Re: Trouble building gcj 4.8.1
Date: Tue, 25 Jun 2013 13:39:00 -0000	[thread overview]
Message-ID: <CANEZrP0WwGL40Vguonwb2CLvpvYmCaRTkO+wZqZ6uTGvtGxu0w@mail.gmail.com> (raw)
In-Reply-To: <51C88147.8060508@redhat.com>

Hmm, it seems there's one on my system already and it looks like the
script at the bottom of this mail. I guess it's from Debian and isn't
correct in some way. There's also an ecj1 that was installed when I
ran without --enable-java-maintainer-mode but it's in
$PREFIX/libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/ecj1 - it seems
like running them gives the same outputs. Perhaps ecj1 was meant to be
installed as a symlink to the binary in libexec?

I put Andrew's script in my PATH and tried again, eventually got it
working. Unfortunately now I have another problem - it seems that
String.java is special, and that's the one I want to be recompiled. If
I introduce a syntax error into some  other class like
java.util.ArrayList and do a "rm compile-classes; make" in the libjava
build dir, it does indeed fail. Although it's impossible to see the
error as there are ~100,000+ warnings and I'm not sure yet how to
disable them :-) But, if I introduce a syntax error into String.java
and do the same thing, the compilation works fine.

I am not entirely surprised by the special-ness of String.java given
the comment at the top which says

  // WARNING: String is a CORE class in the bootstrap cycle. See the comments
  // in vm/reference/java/lang/Runtime for implications of this fact.

but the named file does not exist and the closest one that does
(VMRuntime.java) doesn't talk about bootstrap cycles at all.

Any idea why it's not building? Perhaps this is why the class file
didn't get refreshed last time ....



#! /bin/sh

case "$*" in
  *-bootclasspath*) ;;
  *)
    if [ ! -f /usr/lib/jvm/java-gcj/jre/lib/rt.jar ]; then
      bcoption="-bootclasspath /usr/share/java/libgcj-4.6.jar"
    fi
esac

if [ -x /usr/bin/ecj-gcj ]; then

    exec /usr/bin/ecj-gcj \
$bcoption ${1+"$@"}

else

    case $CLASSPATH in
      */usr/share/java/ecj.jar*) ;;
      */usr/share/java/eclipse-ecj.jar*) ;;
      *) CLASSPATH=${CLASSPATH:+$CLASSPATH:}/usr/share/java/eclipse-ecj.jar
    esac
    export CLASSPATH

    exec /usr/bin/gij-4.6 \
        -Dgnu.gcj.precompiled.db.path=/var/lib/gcj-$ver/classmap.db \
        -Djava.ext.dirs=/usr/lib/java-ext:/usr/share/java-ext \
        org.eclipse.jdt.internal.compiler.batch.Main $bcoption ${1+"$@"}

fi

On Mon, Jun 24, 2013 at 7:26 PM, Andrew Haley <aph@redhat.com> wrote:
> On 06/24/2013 06:17 PM, Mike Hearn wrote:
>>> It should have happened the last time there was a Classpath import.
>>> You should be able to see this in the revision history.
>>
>> Seems like it didn't always happen - compare:
>>
>> http://gcc.gnu.org/viewcvs/gcc/trunk/libjava/classpath/java/lang/?dir_pagestart=75
>> http://gcc.gnu.org/viewcvs/gcc/trunk/libjava/classpath/lib/java/lang/String.class?view=log
>>
>> The last time String.java was touched was 6 months ago, but the class
>> file was last updated 15 months ago.
>>
>> If I could make --enable-java-maintainer-mode work then it wouldn't
>> matter, but maybe re-genning the class files and checking them in
>> would be a good idea, seeing as they're provided.
>
> OK, so let's try to find out why it doesn't work.  You must have an
> executable called ecj1 in your path for use by the build.  My ecj1 is:
>
> #!/bin/sh
> unset LD_LIBRARY_PATH
> gij -cp /home/aph/gcc/trunk/ecj.jar \
>     org.eclipse.jdt.internal.compiler.batch.GCCMain \
>     ${1+"$@"}
>
> Andrew.
>

  parent reply	other threads:[~2013-06-25 13:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-24 13:21 Mike Hearn
2013-06-24 16:48 ` Mike Hearn
2013-06-24 17:04   ` Andrew Haley
2013-06-24 17:17     ` Mike Hearn
2013-06-24 17:26       ` Andrew Haley
2013-06-24 20:36         ` Matthias Klose
2013-06-25 13:39         ` Mike Hearn [this message]
2013-06-25 13:53           ` Mike Hearn
2013-06-25 14:07             ` Andrew Haley
2013-06-25 14:05           ` Andrew Haley
2013-06-25 14:05           ` Andrew Haley
2013-06-25 14:10             ` Mike Hearn
2013-06-25 14:12               ` Andrew Haley
2013-06-25 14:15                 ` Mike Hearn
2013-06-25 14:21                   ` Andrew Haley
2013-06-28  1:28                     ` Andïï
2013-06-28  9:06                       ` Andrew Haley
2013-07-02 14:53                     ` Bryce McKinlay
     [not found]                       ` <CANEZrP1tLxpu818cFGdgma+RVL32yRJJUOyb5m8QF=mhTZVueg@mail.gmail.com>
2013-07-03 13:43                         ` Mike Hearn
2013-07-03 13:47                           ` Andrew Haley
2013-07-03 21:31                             ` Bryce McKinlay

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=CANEZrP0WwGL40Vguonwb2CLvpvYmCaRTkO+wZqZ6uTGvtGxu0w@mail.gmail.com \
    --to=mike@plan99.net \
    --cc=aph@redhat.com \
    --cc=java@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).