Home Help Center

Compile error on Icebox

amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
Hello.

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/libIce.so: 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

Alex

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    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.
  • amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
    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.

    Alex
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    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).
  • amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
    Hello Marc,

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

    Any other ideas?

    Alex

    P.S.
    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
    

    NOTE:
    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
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    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 [email protected] if you would like us to send you such a snapshot.

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

    extern int h_errno;

    with

    #include <netdb.h>
  • amrufonamrufon Member AlexOrganization: ISTProject: jDatabase ✭✭
    It works!

    @csapuntz:

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

    @marc:

    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

    Alex
Sign In or Register to comment.