Archived
This forum has been archived. Please start a new discussion on GitHub.
IceE on Blackfin: DNSException in Ice::initialize
I am trying to deploy an IceE application on a Blackfin, a DSP/microcontroller made by Analog Devices. I have had little trouble building IceE and building my application for the target platform, but when I run the application on the target platform I get the following error message when I call Ice::initialize:
Any ideas?
Network.cpp:770: Ice::DNSException: DNS error: Servname not supported for ai_socktype
Any ideas?
0
Comments
-
Hi,
It looks like your platform has limited support for the getaddrinfo system call (see also comment #14 on this thread).
Can you try replacing line 748 in cppe/src/IceE/Network.cpp:rs = getaddrinfo(0, "1", &hints, &info); // Get the address of the loopback interface
with:rs = getaddrinfo(0, 0, &hints, &info); // Get the address of the loopback interface
Then, re-compile Ice-E and try again to see if the problem is fixed.
Cheers,
Benoit.0 -
Hi,
Can you try replacing line 748 in cppe/src/IceE/Network.cpp:rs = getaddrinfo(0, "1", &hints, &info); // Get the address of the loopback interface
with:rs = getaddrinfo(0, 0, &hints, &info); // Get the address of the loopback interface
With the suggested change, I am now getting the following error message:Network.cpp:770: Ice::DNSException: DNS error: Name or service not known
0 -
Ok, could you try the following options then?
rs = getaddrinfo(0, "", &hints, &info); // Get the address of the loopback interface
Orrs = getaddrinfo(0, "tcpmux", &hints, &info); // Get the address of the loopback interface
Let me know which one works or not.
Cheers,
Benoit.0 -
I have not yet tried those two suggestions, but I tried something else that seems to work. In Network.cpp, on line 702, there is a snippet of code that looks like this:
#ifdef GUMSTIX // // Gumstix does not support calling getaddrinfo with empty host. // if(host.empty()) { addr.sin_family = AF_INET; addr.sin_port = htons(port); if(server) { addr.sin_addr.s_addr = htonl(INADDR_ANY); } else { addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); } result.push_back(addr); return result; } #endif
I removed the #ifdef and #endif to turn on compilation of this code, and now IceE seems to be working. I am about to test your suggestion.0 -
Ok, thanks. We'll look into fixing this for the next release!
Cheers,
Benoit.0