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

Another cpp compilation failure on OpenSuse 12.2

I am trying to compile Ice on OpenSuse 12.2, x86_64. I need both Ice and IceGrid. I followed the thread here

and applied the instructions: adding the #include <unistd.h> to FileUtil.cpp and FileTracker.cpp, and applying the patch from

But my compilation fails with the following error:

making all in unicode
make[3]: Entering directory `/group/project/onrbee/BEETLE-ROOT/BEETLE-SUPPORT-SW/ICE/Ice-3.4.2/cpp/test/IceUtil/unicode'
c++ -c -I. -I../../include -I../../../include -m64 -Wall -D_REENTRANT -fPIC -g Client.cpp
Client.cpp: In function ‘int main(int, char**)’:
Client.cpp:216:9: error: ‘close’ was not declared in this scope
Client.cpp:216:9: note: suggested alternative:
In file included from Client.cpp:11:0:
../../../include/IceUtil/FileUtil.h:76:18: note: ‘IceUtilInternal::close’
make[3]: *** [Client.o] Error 1

What can I do to fix this?

FWIW, I don't, strictly speaking, need to compile Ice from source. But I need to be able to compile c++ libraries that use ICE, and if I use SLES 11.0 rpms, the compilation fails with the same errors that people are getting in the "compile from source" situation. So I as far as I can see, I have no option other than getting the source distribution, applying the patch, and getting it to compile and install.




  • Oops, never mind, this was the same issue as with IceUtil
    - #include <unistd.h> is also needed in tests/IceUtil/unicode/client.cpp