Results 1 to 3 of 3

Thread: getifaddrs() does not supported by glibc, IceE fails to make app in /IceE/test

  1. #1
    syseeker is offline Registered User
    Join Date
    Jun 2006
    Posts
    20

    getifaddrs() does not supported by glibc, IceE fails to make app in /IceE/test

    Hi all,

    Due to some unknown reason, ifaddrs.h is not ported to the glibc package in my embedded system. Thus, getifaddrs() and freeifaddrs() required in Network.cpp vector<string>IceInternal::getLocalHosts() function causes error during compilation. As a trial and error, I have replaced ifaddrs.h got from the development host linux /usr/include, into /$(EMBEDDED_LINUX)/usr/include directory. The compilation then compiled network.cpp without any problem. However later on during compilation of application in /IceE/test, mn10300-linux-g++ returns undefined reference to
    `getifaddrs' and `freeifaddrs'.

    Does any alternative exists to cope with glibc package that do not support ifaddrs.h and getifaddrs(), freeifaddrs()?

    I searched through web and found that app like libpcap etc. does this kind of checking. Also, ACE has flag on ACE_HAS_GETIFADDRS to do sth, though I have not gone through this yet...
    Last edited by syseeker; 07-02-2006 at 07:18 AM.
    Hayashi
    Panasonic Laboratory
    ORB-based Middleware Platform Porting

  2. #2
    dwayne's Avatar
    dwayne is offline ZeroC Staff
    Name: Dwayne Boone
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Jan 2005
    Location
    St. John's, Newfoundland
    Posts
    397
    Hi,

    If your linux system does not include the ifaddrs method, there is an alternate implementation in place that uses ioctl calls instead. We do not currently have a configuration variable you can set to select this alternative implementation though. Instead you will have to manually edit src/IceE/Network.cpp. Assuming you are using Ice-E 1.1.0 you should just have to removed "defined(__linux)" from the ifdef's at lines 17 (header includes) and 1037 (getLocalHosts method).

    Regards,
    Dwayne

  3. #3
    syseeker is offline Registered User
    Join Date
    Jun 2006
    Posts
    20
    Hi Dwayne,

    Thank you! Now, in Network.cpp getLocalHost(), #else part --> SOCKET fd = createSocket(false); <-- createSocket() is defined to take no parameter in the code above, and this function call passes in 'false'. I have tried to remove 'false' away. Compilation success.
    Last edited by syseeker; 07-03-2006 at 01:46 AM.
    Hayashi
    Panasonic Laboratory
    ORB-based Middleware Platform Porting

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. c++ make test fails in IceGrid admin test on Ubuntu 10.04
    By bd_at_eclipse in forum Bug Reports
    Replies: 1
    Last Post: 01-26-2011, 03:02 PM
  2. porting an Ice App to IceE
    By Paul22 in forum Help Center
    Replies: 3
    Last Post: 01-04-2010, 11:54 AM
  3. Failed to make IceE.1.2.0 in redhat 9
    By qhbo in forum Help Center
    Replies: 2
    Last Post: 05-22-2007, 09:50 PM
  4. STL assertion failure make test fails
    By sylvain in forum Bug Reports
    Replies: 2
    Last Post: 03-02-2003, 07:24 AM
  5. make test fails with Python 2.0
    By jmu in forum Bug Reports
    Replies: 0
    Last Post: 02-23-2003, 02:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •