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

Compile error on Icebox


I get the following compile errors. Unfortunately, Im primarily a VB programmer (my C++ hull is covered with barnacles) so I think Im way over my head. :P
making all in IceBox
make[2]: Entering directory `/home/amrufon/projects/Ice-1.0.1/src/IceBox'
rm -f ../../bin/icebox
c++ -L../../lib -o ../../bin/icebox ServiceManagerI.o Server.o -lIceBox -lFreeze -lIceXML -lIce -ldl -lbz2 -lIceUtil -lpthread -luuid  -ldb\
../../lib/ undefined reference to `h_errno'
collect2: ld returned 1 exit status
make[2]: *** [../../bin/icebox] Error 1
make[2]: Leaving directory `/home/amrufon/projects/Ice-1.0.1/src/IceBox'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/amrufon/projects/Ice-1.0.1/src'
make: *** [all] Error 1

Im using a Mandrake 9.1 Download Edition with GCC 3.2.2. I was able to compile and install the all the listed dependencies for Linux.

Thanks for the help in advance. :D



  • marc
    marc Florida
    I had the same problem with Redhat 9. To fix this, please remove the following code from include/Ice/Config.h:
    extern int h_errno;

    Apparently with the new NPTL (New Posix Thread Library), this is now a macro.

    Note that in order to run Ice apps, you must also use:
    export LD_ASSUME_KERNEL=2.4.1

    This ensures that the NPTL is not used, but the old threads instead. We checked our code over and over again, and we are very certain that there is no problem with how we use posix threads (it also runs on Sun w/ native posix threads). However, the problem is very hard to isloate, therefore we couldn't submit a bug report to the NPTL developers. But we keep digging.
  • Hello Marc,

    Thanks for the help. :D

    I'm currently at work, which, unfortunately does not have any Linux boxes, so I'll try this as soon as I get home. I'm technically doing this on my own time/resource :rolleyes: and then hit upper management with it when I got a running prototype integrated with our application. :cool:

    So, would you recommend downgrading my linux box to an earlier version of Mandrake (maybe around 8.1 or 9)? Or just stick with what I currentlly have?

    Thanks again.

  • marc
    marc Florida
    No, there should be no need to downgrade. We will release a new Ice version shortly that has fixes for Redhat 9 (which will also make it work under the latest Mandrake).
  • Hello Marc,

    It didn't work. Removing the declaration to "h_errno" would just throw an "undeclared identifier" error when compiling. :(

    Any other ideas?


    Heres the error message when I commented it out.
    making all in Ice
    make[2]: Entering directory `/home/amrufon/projects/Ice-1.0.1/src/Ice'
    c++ -c -I.. -I../../include  -g -ftemplate-depth-128 -fPIC -Wall Initialize.cpp
    In file included from ../../include/Ice/Handle.h:19,
                     from ../Ice/ThreadPoolF.h:18,
                     from ../Ice/CommunicatorI.h:20,
                     from Initialize.cpp:15:
    ../../include/Ice/Config.h: In function `int getDNSErrno()':
    ../../include/Ice/Config.h:104: `h_errno' undeclared (first use this function)
    ../../include/Ice/Config.h:104: (Each undeclared identifier is reported only once for each function it appears in.)
    make[2]: *** [Initialize.o] Error 1
    make[2]: Leaving directory `/home/amrufon/projects/Ice-1.0.1/src/Ice'
    make[1]: *** [all] Error 1
    make[1]: Leaving directory `/home/amrufon/projects/Ice-1.0.1/src'
    make: *** [all] Error 1

    I've already tried the following things:
    1. Just removed the "extern" keywords on the "h_errorno" declaration.
    2. Leave the thing in but made sure that I have exported the LD_ASSUME_KERNEL.

    Thanks for the help. :D
  • marc
    marc Florida
    I think it's best if we simply send you a snapshot release, which works with Redhat 9 and the latest Mandrake. Please email us at if you would like us to send you such a snapshot.

    We really must release a new Ice version with these fixes soon....
  • In the meanwhile, you can replace

    extern int h_errno;


    #include <netdb.h>
  • It works!


    Thanks! This made my system compile cleanly and I was able to run the test scripts without any errors.


    I got the source file you emailed ... but I didn't open/apply it anymore since the current stable version is now working. Thanks for the help. Great support ... better than what I can say for some products that I use. :D

    Im going to start spending time learning it. Wish me luck. :D