Archived

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
http://www.zeroc.com/forums/bug-reports/5846-compilation-cpp-fails-opensuse-12-2-gcc-4-7-1-a.html

and applied the instructions: adding the #include <unistd.h> to FileUtil.cpp and FileTracker.cpp, and applying the patch from http://www.zeroc.com/forums/patches/5647-patch-compiling-ice-clang-gcc4-7-a.html

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.

Thanks,

Myrosia

Comments

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