Bug 38685 - classmap.db is zero bytes long in 64 bit directory
Summary: classmap.db is zero bytes long in 64 bit directory
Status: RESOLVED DUPLICATE of bug 43445
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 4.2.3
: P3 major
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-01 02:11 UTC by Rob
Modified: 2010-04-28 20:27 UTC (History)
5 users (show)

See Also:
Host: i386-pc-solaris2.11
Target: i386-pc-solaris2.11
Build: i386-pc-solaris2.11
Known to work:
Known to fail: 4.2.2 4.2.3 4.4.0
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rob 2009-01-01 02:11:45 UTC
The classmap.db file is zero bytes long (in 64 bit directory) when
building with this ./configure script:

../gcc-4.2.3/configure --with-as=/usr/gnu/bin/as --with-gnu-as \
 --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-multilib \
 --enable-languages=ada,c,c++,fortran,java,objc,obj-c++



# ls -l /usr/gnu/lib/amd64/gcj-4.2.3 /usr/gnu/lib/gcj-4.2.3

/usr/gnu/lib/amd64/gcj-4.2.3:
total 37
-rw-r--r--   1 root     root           0 Dec 29 22:21 classmap.db
-rwxr-xr-x   1 root     root        1409 Dec 29 22:21 libjvm.la
-rwxr-xr-x   1 root     root       15536 Dec 29 22:21 libjvm.so

/usr/gnu/lib/gcj-4.2.3:
total 2851
-rw-r--r--   1 root     root     1441792 Dec 29 22:19 classmap.db
-rwxr-xr-x   1 root     root        1251 Dec 29 22:19 libjvm.la
-rwxr-xr-x   1 root     root       12348 Dec 29 22:19 libjvm.so


The same problem occurs with gcc 4.2.2 .

Rob
Comment 1 Andrew Pinski 2009-01-01 03:27:44 UTC
Can you try 4.3.2?
Comment 2 Andreas Schwab 2009-01-01 09:14:26 UTC
Probably fixed by <http://gcc.gnu.org/ml/gcc-patches/2008-12/msg01025.html>. See also <http://gcc.gnu.org/ml/gcc/2008-12/msg00205.html>.
Comment 3 Rob 2009-01-01 12:09:49 UTC
(In reply to comment #1)
> Can you try 4.3.2?

No, I don't have it, and next I was planning on build-testing the trunk.


The reason for reporting "so old a version" (_if_ that is the point you are
making "Can you try 4.3.2?") is that I am reporting what I am currently
compiling. 

I am compiling 4.2.x because it is the newest version of gcc that has the
fewest number of "make -i check" errors while still being able to compile
the majority of the (poorly written) type of c++ source code that is still
available on the Internet. 

It (gcc 4.2.2) is the 'proverbial 3.4.3' of the 4.x series. Newer (but not
newest) gcc versions (like 4.3) cost (me) too much compatibility with the
old-c++ source still commonly available without adding enough incentive
(features, speed, compatibility, fewer compiler bugs).

When I get a 4.x series compiler installed (instead of my Operating System's
default 3.4.3 (from 2005)) I am going to work on the trunk.


> Can you try 4.3.2?
If there is a particular reason that we need 4.3.2 to work on OpenSolaris
and that you would prefer me to run the testsuites on 4.3.2 instead of
the trunk please let me know and I can set aside time to download / build /
check / and report it.

Rob
Comment 4 Rob 2009-01-01 12:40:26 UTC
(In reply to comment #1)
> Can you try 4.3.2?

This person ( http://gcc.gnu.org/ml/gcc-testresults/2008-12/msg01766.html ) has
recently built 4.3.2 on my platform; you could ask them.
Comment 5 Rob 2009-01-06 03:39:28 UTC
(In reply to comment #1)
> Can you try 4.3.2?

Same in the trunk (4.4.0 20090104):

# ls -l /usr/local/lib/amd64/gcj-4.4.0-10/ /usr/local/lib/gcj-4.4.0-10/
/usr/local/lib/amd64/gcj-4.4.0-10/:
total 18
-rw-r--r-- 1 root root     0 Jan  5 04:59 classmap.db
-rwxr-xr-x 1 root root  1107 Jan  5 04:59 libjvm.la
-rwxr-xr-x 1 root root 15302 Jan  5 04:59 libjvm.so

/usr/local/lib/gcj-4.4.0-10/:
total 1499
-rw-r--r-- 1 root root 1441792 Jan  5 04:58 classmap.db
-rwxr-xr-x 1 root root     972 Jan  5 04:58 libjavamath.la
-rwxr-xr-x 1 root root   71990 Jan  5 04:58 libjavamath.so
-rwxr-xr-x 1 root root    1083 Jan  5 04:58 libjvm.la
-rwxr-xr-x 1 root root   13170 Jan  5 04:58 libjvm.so
Comment 6 Rob 2009-01-19 17:09:37 UTC
The Trunk (143454) is now:

# gcc/xgcc -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../gcc_trunk/configure --enable-languages=ada,c,c++,fortran,java,objc,obj-c++ --enable-shared --disable-static --enable-decimal-float --with-long-double-128 --enable-nls --with-included-gettext --enable-gather-detailed-mem-stats --with-stabs --enable-debug --enable-largefile --enable-symvers --without-system-zlib --enable-gtk-cairo --enable-gconf-peer --enable-xmlj --enable-gtk-peer --enable-qt-peer --enable-plugin --enable-tool-wrappers --enable-local-sockets --enable-gjdoc --enable-java-awt=gtk,xlib,qt,x --enable-gc-debug --enable-libgcj-debug --enable-objc-gc --enable-libstdcxx-debug --disable-stage1-checking --enable-checking=release --without-system-libunwind --with-gnu-as --with-as=/usr/local/bin/as --with-gnu-ld --with-ld=/usr/local/bin/ld
Thread model: posix
gcc version 4.4.0 20090117 (experimental) [trunk revision 143454] (GCC) 


# ls -l /usr/local/lib/amd64/gcj-4.4.0-10/ /usr/local/lib/gcj-4.4.0-10/
/usr/local/lib/amd64/gcj-4.4.0-10/:
total 2053
-rw-r--r-- 1 root root       0 Jan 11 18:03 classmap.db
-rwxr-xr-x 1 root root    1200 Jan 11 18:03 libgconfpeer.la
-rwxr-xr-x 1 root root   68014 Jan 11 18:03 libgconfpeer.so
-rwxr-xr-x 1 root root    1296 Jan 11 18:03 libgtkpeer.la
-rwxr-xr-x 1 root root 1325924 Jan 11 18:03 libgtkpeer.so
-rwxr-xr-x 1 root root    1326 Jan 11 18:03 libjawt.la
-rwxr-xr-x 1 root root   33054 Jan 11 18:03 libjawt.so
-rwxr-xr-x 1 root root    1107 Jan 11 18:03 libjvm.la
-rwxr-xr-x 1 root root   15398 Jan 11 18:03 libjvm.so
-rwxr-xr-x 1 root root     977 Jan 11 18:03 libxmlj.la
lrwxrwxrwx 1 root root      16 Jan 11 18:03 libxmlj.so -> libxmlj.so.0.0.0
lrwxrwxrwx 1 root root      16 Jan 11 18:03 libxmlj.so.0 -> libxmlj.so.0.0.0
-rwxr-xr-x 1 root root  429910 Jan 11 18:03 libxmlj.so.0.0.0

/usr/local/lib/gcj-4.4.0-10/:
total 3276
-rw-r--r-- 1 root root 1441792 Jan 11 18:02 classmap.db
-rwxr-xr-x 1 root root    1194 Jan 11 18:01 libgconfpeer.la
-rwxr-xr-x 1 root root   59934 Jan 11 18:01 libgconfpeer.so
-rwxr-xr-x 1 root root    1290 Jan 11 18:01 libgtkpeer.la
-rwxr-xr-x 1 root root 1208507 Jan 11 18:01 libgtkpeer.so
-rwxr-xr-x 1 root root     972 Jan 11 18:01 libjavamath.la
-rwxr-xr-x 1 root root   82307 Jan 11 18:01 libjavamath.so
-rwxr-xr-x 1 root root    1314 Jan 11 18:02 libjawt.la
-rwxr-xr-x 1 root root   29296 Jan 11 18:02 libjawt.so
-rwxr-xr-x 1 root root    1083 Jan 11 18:02 libjvm.la
-rwxr-xr-x 1 root root   13266 Jan 11 18:02 libjvm.so
-rwxr-xr-x 1 root root     971 Jan 11 18:01 libxmlj.la
lrwxrwxrwx 1 root root      16 Jan 11 18:01 libxmlj.so -> libxmlj.so.0.0.0
lrwxrwxrwx 1 root root      16 Jan 11 18:01 libxmlj.so.0 -> libxmlj.so.0.0.0
-rwxr-xr-x 1 root root  377422 Jan 11 18:01 libxmlj.so.0.0.0

Rob
Comment 7 Rob 2009-01-22 14:50:47 UTC
Self Confirmed. Attempting to execute 64 bit code when booted 32 bit:

# gmake
...
/bin/sh ./libtool --tag=GCJ --mode=link /usr/share/src/gcc_build/gcc/gcj -B/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava/ -B/usr/share/src/gcc_build/gcc/ -L/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava -ffloat-store -fomit-frame-pointer -Usun -g -O2  -m64 -m64 -o gjdoc --main=gnu.classpath.tools.gjdoc.Main -Djava.class.path= -rpath /usr/local/lib/gcc/i386-pc-solaris2.11/4.4.0/amd64 -shared-libgcc    -L/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava/.libs libgcj-tools.la 
libtool: link: /usr/share/src/gcc_build/gcc/gcj -B/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava/ -B/usr/share/src/gcc_build/gcc/ -ffloat-store -fomit-frame-pointer -Usun -g -O2 -m64 -m64 -o .libs/gjdoc --main=gnu.classpath.tools.gjdoc.Main -Djava.class.path= -shared-libgcc  -L/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava/.libs -L/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava ./.libs/libgcj-tools.so -Wl,-rpath -Wl,/usr/local/lib/gcc/i386-pc-solaris2.11/4.4.0/amd64
: gmake ; exec true "AR_FLAGS=cr" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2    -m64" "CXXFLAGS=-g -O2    -m64" "CPPFLAGS=" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/local/bin/install -c" "INSTALL_DATA=/usr/local/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/local/bin/install -c" "INSTALL_SCRIPT=/usr/local/bin/install -c" "GCJFLAGS=-g -O2  -m64" "LDFLAGS=-m64" "LIBCFLAGS=-g -O2    -m64" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=gmake" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000    " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "RUNTESTFLAGS=" "exec_prefix=/usr/local" "infodir=/usr/local/info" "libdir=/usr/local/lib" "mandir=/usr/local/man" "prefix=/usr/local" "gxx_include_dir=/usr/local/lib/gcc/i386-pc-solaris2.11/4.4.0/include/c++" "AR=/usr/local/i386-pc-solaris2.11/bin/ar" "AS=/usr/share/src/gcc_build/./gcc/as" "LD=/usr/share/src/gcc_build/./gcc/collect-ld" "LIBCFLAGS=-g -O2    -m64" "NM=/usr/share/src/gcc_build/./gcc/nm" "PICFLAG=" "RANLIB=/usr/local/i386-pc-solaris2.11/bin/ranlib" "DESTDIR=" "JAR=/usr/share/src/gcc_build/i386-pc-solaris2.11/libjava/scripts/jar" DO=all multi-do
./gcj-dbtool -n classmap.db || touch classmap.db
exec: /usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava/.libs/gcj-dbtool: cannot execute [Exec format error]
cp classpath/tools/tools.zip libgcj-tools-4.4.0.jar
gmake[5]: Leaving directory `/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava'
gmake[4]: Leaving directory `/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava'
gmake[3]: Leaving directory `/usr/share/src/gcc_build/i386-pc-solaris2.11/libjava'
Making all in libltdl
gmake[3]: Entering directory `/usr/share/src/gcc_build/i386-pc-solaris2.11/libjava/libltdl'
gmake  all-am
gmake[4]: Entering directory `/usr/share/src/gcc_build/i386-pc-solaris2.11/libjava/libltdl'
...


We need 'gcj-dbtool' to be compiled 32 bit when building the 64 bit library
and booted in 32 bit mode to avoid the "dbtool: cannot execute [Exec format error]".

Until we have OSes than will _only_ boot 64 bit and will not run 32 bit
code (in which case they would not build the other library and this Bug
ought not to reoccur) we can build the program 32 bit regardless of which
library or boot mode (32 or 64).

Rob
Comment 8 Rob 2009-02-13 15:55:03 UTC
In revision 144149 we have this:

# gcc/xgcc -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../gcc_trunk/configure --build=i386-pc-solaris2.11 --target=i386-pc-solaris2.11 --enable-languages=ada,c,c++,fortran,java,objc,obj-c++ --enable-shared --disable-static --enable-multilib --enable-decimal-float --with-long-double-128 --with-included-gettext --enable-stage1-checking --enable-checking=release --with-tune=k8 --with-cpu=k8 --with-arch=k8 --with-gnu-as --with-as=/usr/local/bin/as --with-gnu-ld --with-ld=/usr/local/bin/ld --with-gmp=/usr/local --with-mpfr=/usr/local --without-ppl
Thread model: posix
gcc version 4.4.0 20090213 (experimental) [trunk revision 144149] (GCC) 


# gmake
...
./gcj-dbtool -n classmap.db || touch classmap.db
/bin/sh: line 1: 20225: Memory fault(coredump)
cp classpath/tools/tools.zip libgcj-tools-4.4.0.jar
[CTRL-C]
#


My fix:

/usr/local/bin/gcj-dbtool -n classmap.db || touch classmap.db


Result:

# ls -lrtA /usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava | tail
-rwxr-xr-x   1 root     root        4223 Feb 13 07:15 gnative2ascii
-rwxr-xr-x   1 root     root        4191 Feb 13 07:15 gorbd
-rwxr-xr-x   1 root     root        4191 Feb 13 07:15 grmid
-rwxr-xr-x   1 root     root        4211 Feb 13 07:15 gserialver
-rwxr-xr-x   1 root     root        4211 Feb 13 07:15 gtnameserv
drwxr-xr-x   2 root     root          89 Feb 13 07:15 .libs
-rwxr-xr-x   1 root     root        4221 Feb 13 07:15 gc-analyze
-rw-r--r--   1 root     root     1166776 Feb 13 07:15 libgcj-tools-4.4.0.jar
-rw-------   1 root     root     74276701 Feb 13 07:19 core
-rw-r--r--   1 root     root     1441792 Feb 13 07:20 classmap.db


Rob
Comment 9 Rainer Orth 2010-04-28 20:27:27 UTC
Dup of PR other/43445.

*** This bug has been marked as a duplicate of 43445 ***