public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug libgcj/55716] New: [4.8 Regression] gjavah crashes
Date: Mon, 17 Dec 2012 09:03:00 -0000	[thread overview]
Message-ID: <bug-55716-8172@http.gcc.gnu.org/bugzilla/> (raw)


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

             Bug #: 55716
           Summary: [4.8 Regression] gjavah crashes
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org


For redhat/gcc-4_X-branch, I remove all gjavah --cni generated headers (and
*.class files and *.jar files except for libjava.jar testcase), then build with
--enable-java-maintainer-mode.
If I use gcc 4.7.2 gjavah for that (also on the trunk tree), everything works
fine, but with gcc 4.8.0 gjavah it fails.

$ gjavah --cni --all ../../../libjava/classpath/lib
--cmdfile=../../../libjava/headers.txt -d ../../../libjava --force
java.io.IOException: can't find class file
gnu/xml/stream/XMLParser$ContentModel.class in
java.net.URLClassLoader{urls=[file:/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre/lib/rt.jar],
parent=gnu.gcj.runtime.SystemClassLoader{urls=[file:./],
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}}
    at gnu.classpath.tools.javah.Main.getClass(libgcj-tools.so.14)
    at gnu.classpath.tools.javah.Main.parseClasses(libgcj-tools.so.14)
    at gnu.classpath.tools.javah.Main.parseClasses(libgcj-tools.so.14)
    at gnu.classpath.tools.javah.Main.run(libgcj-tools.so.14)
    at gnu.classpath.tools.javah.Main.main(libgcj-tools.so.14)

Usually I'm using hack like
# If we don't have gjavah in $PATH, try to build it with the old gij            
mkdir java_hacks                                                                
cd java_hacks                                                                   
cp -a ../../libjava/classpath/tools/external external                           
mkdir -p gnu/classpath/tools                                                    
cp -a ../../libjava/classpath/tools/gnu/classpath/tools/{common,javah,getopt}
gnu/classpath/tools/                                                 
cp -a
../../libjava/classpath/tools/resource/gnu/classpath/tools/common/messages.properties
gnu/classpath/tools/common                             
cp -a
../../libjava/classpath/tools/resource/gnu/classpath/tools/getopt/messages.properties
gnu/classpath/tools/getopt                             
cd external/asm; for i in `find . -name \*.java`; do gcj --encoding ISO-8859-1
-C $i -I.; done; cd ../..                                           
for i in `find gnu -name \*.java`; do gcj -C $i -I. -Iexternal/asm/; done       
gcj -findirect-dispatch -O2 -fmain=gnu.classpath.tools.javah.Main -I.
-Iexternal/asm/ `find . -name \*.class` -o gjavah.real                       
cat > gjavah <<EOF                                                              
#!/bin/sh                                                                       
export CLASSPATH=`pwd`${CLASSPATH:+:$CLASSPATH}                                 
exec `pwd`/gjavah.real "\$@"                                                    
EOF                                                                             
chmod +x `pwd`/gjavah                                                           

and prepend that java_hacks/ into $PATH for gcc bootstrap, that method fails
the exact same way.  Initially I thought there would be some issue with this
way
of creating gjavah, but when I've used system gjavah (removed this one),
bootstrapped/regtested it fine, then installed the new gcc + gcc-java/libgcj
etc.,
and using the new (4.8.0) system gjavah it failed the same way.


             reply	other threads:[~2012-12-17  9:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-17  9:03 jakub at gcc dot gnu.org [this message]
2012-12-17  9:04 ` [Bug libgcj/55716] " jakub at gcc dot gnu.org
2012-12-17  9:43 ` mark at gcc dot gnu.org
2012-12-17 10:16 ` mark at gcc dot gnu.org
2012-12-17 10:23 ` [Bug libgcj/55716] [4.8 Regression] gjavah throws an exception jakub at gcc dot gnu.org
2012-12-18 10:00 ` aph at gcc dot gnu.org
2012-12-18 10:01 ` aph at gcc dot gnu.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=bug-55716-8172@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@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).