Archived

This forum has been archived. Please start a new discussion on GitHub.

Compile Ice3.0 error on Fedora 4

$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

Comments

  • benoit
    benoit Rennes, France
    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.
  • 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:
    $ 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:
    #
    # 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:
    $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:
    #
    # 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:
    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 &#8216;;&#8217; before &#8216;<&#8217; token
    Base64.cpp:15: error: &#8216;string&#8217; does not name a type
    Base64.cpp:99: error: expected constructor, destructor, or type conversion before &#8216;<&#8217; token
    make[2]: *** [Base64.o] Error 1
    make[1]: *** [all] Error 1
    make: *** [all] Error 1
    
  • benoit
    benoit Rennes, France
    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:
      $ 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.
  • Thanks. I have compiled successfully!