User account creation filtered due to spam.

Bug 53400 - java build failure with NullPointerException
Summary: java build failure with NullPointerException
Status: RESOLVED DUPLICATE of bug 39177
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.6.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2012-05-18 14:51 UTC by John T
Modified: 2012-05-20 22:23 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description John T 2012-05-18 14:51:33 UTC
Compiler: gcc-4.6.1, building gcc-4.6.3 java with options /usr/local/gcc-4.6.3/configure --prefix=/usr --enable-languages=java --disable-bootstrap
(I used gcc 4.6.1 to build and test gcc 4.6.3 just recently. disable-bootstrap was used to save time, not going to waste time rebuilding gcc three times just to have java crash. That's the reason why I didn't build gcc-4.6.1 with java. java crashes and the build doesn't finish)

Original system java:
gcj -v
Using built-in specs.
Reading specs from /usr/lib/gcc/i586-manbo-linux-gnu/4.4.1/libgcj.spec
rename spec startfile to startfileorig
rename spec lib to liborig
Target: i586-manbo-linux-gnu
Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib --with-bugurl= --mandir=/usr/share/man --infodir=/usr/share/info --enable-checking=release --enable-languages=c,c++,ada,fortran,objc,obj-c++,java --build=i586-manbo-linux-gnu --host=i586-manbo-linux-gnu --with-cpu=generic --with-system-zlib --enable-threads=posix --enable-shared --enable-objc-gc --enable-long-long --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.5.0-gcj- --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-gtk-cairo --disable-libjava-multilib --enable-ssp --disable-libssp --disable-werror --with-ppl --with-cloog --with-python-dir=/lib/python2.6/site-packages
Thread model: posix
gcc version 4.4.1 (GCC) 

System: i686-pc-linux-gnu

Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /usr/local/gcc-4.6.1/configure --prefix=/usr --enable-languages=c,c++,fortran,lto,objc,ada
Thread model: posix
gcc version 4.6.1 (GCC) 

compiler/build messages:
libtool: compile:  /home/dilbert/bld463/./gcc/xgcc -shared-libgcc -B/home/dilbert/bld463/./gcc -nostdinc++ -L/home/dilbert/bld463/i686-pc-linux-gnu/libstdc++-v3/src -L/home/dilbert/bld463/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/usr/i686-pc-linux-gnu/bin/ -B/usr/i686-pc-linux-gnu/lib/ -isystem /usr/i686-pc-linux-gnu/include -isystem /usr/i686-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/usr/local/gcc-4.6.3/libjava -I./include -I./gcj -I/usr/local/gcc-4.6.3/libjava -Iinclude -I/usr/local/gcc-4.6.3/libjava/include -I/usr/local/gcc-4.6.3/libjava/classpath/include -Iclasspath/include -I/usr/local/gcc-4.6.3/libjava/classpath/native/fdlibm -I/usr/local/gcc-4.6.3/libjava/../boehm-gc/include -I../boehm-gc/include -I/usr/local/gcc-4.6.3/libjava/libltdl -I/usr/local/gcc-4.6.3/libjava/libltdl -I/usr/local/gcc-4.6.3/libjava/.././libjava/../gcc -I/usr/local/gcc-4.6.3/libjava/../zlib -I/usr/local/gcc-4.6.3/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSET_BITS=64 -ffloat-store -fomit-frame-pointer -Usun -Wextra -Wall -D_GNU_SOURCE -DPREFIX=\"/usr\" -DTOOLEXECLIBDIR=\"/usr/lib\" -DJAVA_HOME=\"/usr\" -DBOOT_CLASS_PATH=\"/usr/share/java/libgcj-4.6.3.jar\" -DJAVA_EXT_DIRS=\"/usr/share/java/ext\" -DGCJ_ENDORSED_DIRS=\"/usr/share/java/gcj-endorsed\" -DGCJ_VERSIONED_LIBDIR=\"/usr/lib/gcj-4.6.3-12\" -DPATH_SEPARATOR=\":\" -DECJ_JAR_FILE=\"\" -DLIBGCJ_DEFAULT_DATABASE=\"/usr/lib/gcj-4.6.3-12/classmap.db\" -DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.6.3-12/classmap.db\" -g -O2 -D_GNU_SOURCE -MT posix-threads.lo -MD -MP -MF .deps/posix-threads.Tpo -c /usr/local/gcc-4.6.3/libjava/ -o posix-threads.o >/dev/null 2>&1
here=`pwd`; cd /usr/local/gcc-4.6.3/libjava/classpath/lib; \
find gnu java javax org sun -name .svn -prune -o -name '*.class' -print | \
gjar -cfM@ $here/libgcj-4.6.3.jar
jar: internal error:
make[3]: *** [libgcj-4.6.3.jar] Error 1
make[3]: Leaving directory `/home/dilbert/bld463/i686-pc-linux-gnu/libjava'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/dilbert/bld463/i686-pc-linux-gnu/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/home/dilbert/bld463'
make: *** [all] Error 2

The above error message has been given for trying to build java 4.6.1, 4.6.3, and possibly 4.4.x.
Comment 1 Mark Wielaard 2012-05-19 13:47:00 UTC
This looks like bug #39177 which should have been fixed by:

2009-10-21  Richard Guenther  <>

        PR cp-tools/39177
        * tools/gnu/classpath/tools/jar/ (writeCommandLineEntries):
        Do not use uninitialized manifest.
Comment 2 Mark Wielaard 2012-05-19 13:50:25 UTC
It is indeed a duplicate, you need to update your host gjar install since that is what contains the bug.

*** This bug has been marked as a duplicate of bug 39177 ***
Comment 3 John T 2012-05-19 18:24:12 UTC
Updating it isn't possible as far as I know. If I removed java (and that may not be possible either due to dependencies) or at least gjar, would gcc-java build me a new one?
Comment 4 John T 2012-05-20 22:23:07 UTC
Yes. I removed gcc-java-4.4.1 and got rid of the offending gjar, then included java in a build of gcc-4.6.3. Built and installed as hoped with a new gjar.