Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 11-29-2005
rc_hz rc_hz is offline
Registered User
 
Name: Eric RC
Organization: www.genband.com
Project: No project yet
 
Join Date: Jul 2004
Location: Hangzhou, China
Posts: 189
Send a message via MSN to rc_hz
-->
Compile Ice3.0 error on Fedora 4

Code:
$uname -a
Linux fcore4 2.6.11-1.1369_FC4 #1 Thu Jun 2 22:55:56 EDT 2005 i686 i686 i386 GNU/Linux

$ g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0.1/configure --enable-languages=c,c++
Thread model: posix
gcc version 4.0.1

$make
......
OpenSSLPluginI.cpp: In constructor ‘IceSSL::OpenSSLPluginI::OpenSSLPluginI(const IceInternal::ProtocolPluginFacadePtr&)’:
OpenSSLPluginI.cpp:190: error: no matching function for call to ‘Ice::LocalObject::LocalObject(const void**)’
../../include/Ice/LocalObject.h:27: note: candidates are: Ice::LocalObject::LocalObject()
../../include/Ice/LocalObject.h:27: note:                 Ice::LocalObject::LocalObject(const Ice::LocalObject&)
OpenSSLPluginI.cpp:190: error: no matching function for call to ‘Ice::Plugin::Plugin(const void**)’
../../include/Ice/Plugin.h:84: note: candidates are: Ice::Plugin::Plugin()
../../include/Ice/Plugin.h:84: note:                 Ice::Plugin::Plugin(const Ice::Plugin&)
OpenSSLPluginI.cpp:190: error: no matching function for call to ‘IceSSL::Plugin::Plugin(const void**)’
../../include/IceSSL/Plugin.h:88: note: candidates are: IceSSL::Plugin::Plugin()
../../include/IceSSL/Plugin.h:88: note:                 IceSSL::Plugin::Plugin(const IceSSL::Plugin&)
make[2]: *** [OpenSSLPluginI.o] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1
__________________
Eric RC
www.genband.com (telecommunication)
I like ICE (Ice for C++/Java/Python)
Reply With Quote
  #2 (permalink)  
Old 11-29-2005
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,540
This error is the same error as the one you would get if you compile Ice with gcc 4.0.0. Are you sure that you're using GCC 4.0.1 to build Ice? Did you install GCC 4.0.1 from the FC4 update RPMs (available here or through Fedora Core YUM package management software) or did you build and install it yourself from the GCC source distribution?

From the output of gcc -v I suspect you built it yourself, if that's the case you should make sure to add the GCC bin directory to your PATH before to start the Ice build.

Benoit.
Reply With Quote
  #3 (permalink)  
Old 11-30-2005
rc_hz rc_hz is offline
Registered User
 
Name: Eric RC
Organization: www.genband.com
Project: No project yet
 
Join Date: Jul 2004
Location: Hangzhou, China
Posts: 189
Send a message via MSN to rc_hz
-->
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
__________________
Eric RC
www.genband.com (telecommunication)
I like ICE (Ice for C++/Java/Python)

Last edited by rc_hz : 11-30-2005 at 01:22 PM.
Reply With Quote
  #4 (permalink)  
Old 11-30-2005
benoit's Avatar
benoit benoit is offline
ZeroC Staff
 
Name: Benoit Foucher
Organization: ZeroC, Inc.
Project: Ice
 
Join Date: Feb 2003
Location: Rennes, France
Posts: 1,540
These errors sounds like a problem with your compiler installation. The compiler can't find the standard headers. I usually use the following commands to compile and install gcc:
Code:
  $ tar -zxvf gcc-4.0.1.tar.gz
  $ mkdir gcc-build
  $ cd gcc-build
  $ ../gcc-4.0.1/configure --prefix=/opt/gcc-4.0.1 --enable-shared --enable-threads --enable-languages=c,c++
  $ make bootstrap
  $ make install
This installs gcc in the /opt/gcc-4.0.1 directory. After that, you need to add /opt/gcc-4.0.1 to your PATH environment variable and /opt/gcc-4.0.1/lib to your LD_LIBRARY_PATH environment variable.

However, the easiest would be to just update your Fedora Core 4 distribution with the latest gcc 4.0.1 RPM packages available on the Fedora Core web site (see my first post for the URLs).

Hope this helps,

Benoit.
Reply With Quote
  #5 (permalink)  
Old 12-01-2005
rc_hz rc_hz is offline
Registered User
 
Name: Eric RC
Organization: www.genband.com
Project: No project yet
 
Join Date: Jul 2004
Location: Hangzhou, China
Posts: 189
Send a message via MSN to rc_hz
-->
Thanks. I have compiled successfully!
__________________
Eric RC
www.genband.com (telecommunication)
I like ICE (Ice for C++/Java/Python)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ice3 compiling error with gcc 4.1.0 umber Help Center 2 12-17-2005 11:42 PM
compile ice-3.0.0 error zhushisong Help Center 1 11-24-2005 05:38 AM
Compile Error on OS X 10.4.2 jbruni Help Center 4 09-22-2005 05:13 AM
Compile error frostzero Help Center 2 05-07-2004 05:09 PM
Compile Error threadsafe Help Center 4 07-24-2003 10:32 PM


All times are GMT -4. The time now is 11:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.