Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-02-2006
syseeker syseeker is offline
Registered User
 
 
Join Date: Jun 2006
Posts: 20
Send a message via Yahoo to syseeker
-->
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...
__________________
Hayashi
Panasonic Laboratory
ORB-based Middleware Platform Porting

Last edited by syseeker : 07-02-2006 at 08:18 AM.
Reply With Quote
  #2 (permalink)  
Old 07-02-2006
dwayne's Avatar
dwayne dwayne is online now
ZeroC Staff
 
Name: Dwayne Boone
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Jan 2005
Location: St. John's, Newfoundland
Posts: 207
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
Reply With Quote
  #3 (permalink)  
Old 07-02-2006
syseeker syseeker is offline
Registered User
 
 
Join Date: Jun 2006
Posts: 20
Send a message via Yahoo to syseeker
-->
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.
__________________
Hayashi
Panasonic Laboratory
ORB-based Middleware Platform Porting

Last edited by syseeker : 07-03-2006 at 02:46 AM.
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
IceE and AMI/AMD albertods Help Center 1 10-11-2006 03:34 PM
IceE and Blackberry mcrystal Help Center 2 05-25-2006 05:11 PM
IceStorm and IceE cesartovic Help Center 11 02-17-2006 06:26 AM
STL assertion failure make test fails sylvain Bug Reports 2 03-02-2003 08:24 AM
make test fails with Python 2.0 jmu Bug Reports 0 02-23-2003 03:25 PM


All times are GMT -4. The time now is 07:55 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.