Quote:
|
you should make sure to add the GCC bin directory to your PATH before to start the Ice build.
|
Yes, I have compiled the gcc myself and included it in my PATH:
Code:
$ echo $HOME
/home/zhang
$
$ which g++
~/gcc_objdir/gcc/g++
$
$ echo $PATH
/home/zhang/gcc_objdir/gcc:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/zhang/bin
$
And I have noticed that it used "c++" compiler instead of g++ in $ICE_HOME/config/Make.rules.Linux:
Code:
#
# Default compiler is c++ (aka g++).
#
ifeq ($(CXX),)
CXX = c++
endif
ifeq ($(CXX),g++)
CXX = c++
endif
ifeq ($(CXX),c++)
......
This is the output on my machine:
Code:
$which c++
/usr/bin/c++
$
$ c++ -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,java,f95,ada --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --host=i386-redhat-linux
Thread model: posix
gcc version 4.0.0 20050519 (Red Hat 4.0.0-8)
So I changed $ICE_HOME/config/Make.rules.Linux a little as follows:
Code:
#
# Default compiler is c++ (aka g++).
#
ifeq ($(CXX),)
CXX = g++
endif
ifeq ($(CXX),c++)
CXX = g++
endif
ifeq ($(CXX),g++)
But it still compiled failed:
Code:
In file included from ../../include/IceUtil/Base64.h:13,
from Base64.cpp:10:
../../include/IceUtil/Config.h:136:19: error: cassert: No such file or directory
../../include/IceUtil/Config.h:137:20: error: iostream: No such file or directory
../../include/IceUtil/Config.h:138:19: error: sstream: No such file or directory
In file included from /usr/include/sched.h:26,
from /usr/include/pthread.h:23,
from ../../include/IceUtil/Config.h:141,
from ../../include/IceUtil/Base64.h:13,
from Base64.cpp:10:
/usr/include/bits/types.h:31:20: error: stddef.h: No such file or directory
In file included from Base64.cpp:10:
../../include/IceUtil/Base64.h:14:18: error: string: No such file or directory
../../include/IceUtil/Base64.h:15:18: error: vector: No such file or directory
/usr/include/sched.h:76: error: ‘size_t’ has not been declared
/usr/include/sched.h:80: error: ‘size_t’ has not been declared
/usr/include/time.h:197: error: ‘size_t’ does not name a type
/usr/include/time.h:215: error: ‘size_t’ does not name a type
/usr/include/pthread.h:259: error: ‘size_t’ has not been declared
/usr/include/pthread.h:263: error: ‘size_t’ has not been declared
/usr/include/pthread.h:319: error: ‘size_t’ has not been declared
/usr/include/pthread.h:326: error: ‘size_t’ has not been declared
/usr/include/pthread.h:332: error: ‘size_t’ has not been declared
/usr/include/pthread.h:338: error: ‘size_t’ has not been declared
/usr/include/pthread.h:345: error: ‘size_t’ has not been declared
/usr/include/pthread.h:351: error: ‘size_t’ has not been declared
/usr/include/pthread.h:399: error: ‘size_t’ has not been declared
/usr/include/pthread.h:403: error: ‘size_t’ has not been declared
../../include/IceUtil/Base64.h:24: error: ‘string’ in namespace ‘std’ does not name a type
../../include/IceUtil/Base64.h:25: error: ISO C++ forbids declaration of ‘vector’ with no type
../../include/IceUtil/Base64.h:25: error: invalid use of ‘::’
../../include/IceUtil/Base64.h:25: error: expected ‘;’ before ‘<’ token
Base64.cpp:15: error: ‘string’ does not name a type
Base64.cpp:99: error: expected constructor, destructor, or type conversion before ‘<’ token
make[2]: *** [Base64.o] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1