This is the mail archive of the java-prs@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libgcj/1572: make boot fails building libgcj due to missing include dir



>Number:         1572
>Category:       libgcj
>Synopsis:       make boot fails building libgcj due to missing include dir
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 05 19:26:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Per Bothner
>Release:        2.97 20001230 (experimental)
>Organization:
>Environment:
System: Linux kelso.bothner.com 2.4.0-test11 #1 Wed Nov 29 14:11:55 PST 2000 i686 unknown
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /home/bothner/GNU/egcs/configure --enable-threads=posix --prefix=/home/bothner/GNU/linux --enable-shared --enable-languages=c++,java --disable-new-gxx-abi
>Description:
When I do a 'make bootstrap", compilation of libgcj fails:

/home/bothner/GNU/linux-gcc/gcc/g++ -B/home/bothner/GNU/linux-gcc/gcc/ -nostdinc++ -L/home/bothner/GNU/linux-gcc/i686-pc-linux-gnu/libstdc++-v3/src -L/home/bothner/GNU/linux-gcc/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/home/bothner/GNU/linux/i686-pc-linux-gnu/bin/ -B/home/bothner/GNU/linux/i686-pc-linux-gnu/lib/ -isystem /home/bothner/GNU/linux/i686-pc-linux-gnu/include -DHAVE_CONFIG_H -I. -I/home/bothner/GNU/egcs/libjava -I./include -I/home/bothner/GNU/egcs/libjava -Iinclude -I/home/bothner/GNU/egcs/libjava/include -I/home/bothner/GNU/egcs/libjava/../boehm-gc -I./../boehm-gc -DLINUX_THREADS=1 -D_REENTRANT=1 -DSILENT=1 -DNO_SIGNALS=1 -DJAVA_FINALIZATION=1 -DGC_GCJ_SUPPORT=1 -I/home/bothner/GNU/egcs/libjava/libltdl -I/home/bothner/GNU/egcs/libjava/libltdl -I/home/bothner/GNU/egcs/libjava/../gcc -I/home/bothner/GNU/egcs/libjava/../include -I/home/bothner/GNU/egcs/libjava/../zlib -I/home/bothner/GNU/egcs/libjava/../libffi/include -I../libffi/include -fno-rtti -fvtable-thunks!
 -fasynchronous-exceptions -fdollars-in-identifiers -D__NO_MATH_INLINES -ffloat-store -W -Wall -D_GNU_SOURCE -g -O2 -fvtable-thunks -D_GNU_SOURCE -Wp,-MD,.deps/natClip.pp -c /home/bothner/GNU/egcs/libjava/gnu/gcj/xlib/natClip.cc  -fPIC -DPIC -o gnu/gcj/xlib/.libs/natClip.o
/home/bothner/GNU/egcs/libjava/gnu/gcj/xlib/natClip.cc:15:18: vector: No such file or directory
/home/bothner/GNU/egcs/libjava/gnu/gcj/xlib/natClip.cc:26: syntax error before 
   `;' token
/home/bothner/GNU/egcs/libjava/gnu/gcj/xlib/natClip.cc: In member function 
   `void gnu::gcj::xlib::Clip::init(JArray<java::awt::Rectangle*>*)':
/home/bothner/GNU/egcs/libjava/gnu/gcj/xlib/natClip.cc:33: `XRectVector' 
   undeclared (first use this function)
/home/bothner/GNU/egcs/libjava/gnu/gcj/xlib/natClip.cc:33: (Each undeclared 
   identifier is reported only once for each function it appears in.)
/home/bothner/GNU/egcs/libjava/gnu/gcj/xlib/natClip.cc:33: `xrectvector' 
   undeclared (first use this function)
/home/bothner/GNU/egcs/libjava/gnu/gcj/xlib/natClip.cc:33: parse error before `
   (' token
make[3]: *** [gnu/gcj/xlib/natClip.lo] Error 1
make[3]: Leaving directory `/home/bothner/GNU/linux-gcc/i686-pc-linux-gnu/libjava'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/bothner/GNU/linux-gcc/i686-pc-linux-gnu/libjava'
make[1]: *** [all-target-libjava] Error 2
make[1]: Leaving directory `/home/bothner/GNU/linux-gcc'
make: *** [bootstrap] Error 2

Note there is no -I line that names the directory containing <vector>,
which is libstdc++-v3/include/std.

The reason for this is that libstdc++ is configured, it sets CXX to a command
that does *not* include the directories in libstdc++-v3.  This value gets
written to i686-pc-linux-gnu/config.cache:

ac_cv_prog_CXX=${ac_cv_prog_CXX='/home/bothner/GNU/linux-gcc/gcc/g++ -B/home/bothner/GNU/linux-gcc/gcc/ -nostdinc++  -L/home/bothner/GNU/linux-gcc/i686-pc-linux-gnu/libstdc++-v3/src -L/home/bothner/GNU/linux-gcc/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/home/bothner/GNU/linux/i686-pc-linux-gnu/bin/ -B/home/bothner/GNU/linux/i686-pc-linux-gnu/lib/ -isystem /home/bothner/GNU/linux/i686-pc-linux-gnu/include'}

When libjava is configured it uses this as the value of CXX.

>How-To-Repeat:
Configure with java enable; run 'make bootstrap".

Note if I do plain "make", the prolem does not appear.
>Fix:
Bryce McKinlay says that ./i686-pc-linux-gnu/libstdc++-v3/src/libstdc++.INC
is supposed to be used for the definition CXX.  I don't know why this
works when done 'make" but not when doing "make boostrap".  In any case,
it seems fragile to have different values of CXX in different target
sub-directories, especially when they share a config.cache!

One might argue that this is a bug best fixed in libstdc++.
It compiles using $CXX without its own include files, and then a separate
$INCLUDES that names its own include files.  It might be "more considerate"
if libstdc++-v3 create a $CXX command that includes its own include files,
since any other target library written in C++ will need those as well.

>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]