Building Poco
Building Poco on OpenIndiana requires a few changes. These instructions apply for building 64 bit libraries from either 1.4.2 or 1.4.3 releases using GCC 4.6.2 (from opencsw or OpenIndiana sfe packages). Edit the following files from the source distribution:
- Foundation/include/Poco/NamedEvent_UNIX.h and Foundation/src/NamedEvent_UNIX.cpp - replace
#if defined(sun)with#if defined(__sun)throughout file. - Foundation/include/Poco/NamedMutex_UNIX.h Foundation/src/NamedMutex_UNIX.cpp - replace
#if defined(sun)with#if defined(__sun)throughout file. - Net/src/SocketImpl.cpp
- Error related to undefined FIONREAD
- Add #include <sys/filio.h>
- Net/src/NetworkInterface.cpp
- Errors related to undefined SIOCGIFNETMASK, SIOCGIFBRDADDR, SIOCGIFCONF
- Add #include <sys/sockio.h>
- build/config/SunOS-GCC
- Remove -D_X_OPEN_SOURCE=500 from SYSFLAGS
- Add -D_XPG6 to SYSFLAGS
- Add -lsocket to SYSLIBS
- Add -m64 and -std=c++0x to compiler and linker flag variables
- Download the modified SunOS-GCC file with all modifications.
The following script may be used to compile and install poco.
#!/bin/ksh
./configure --prefix=/usr/local/poco \
--config=SunOS-GCC \
--no-tests --no-samples \
--omit=Data
gmake -j8
pfexec gmake install
This will install poco into /usr/local/poco. If you use poco heavily, it may be worthwhile adding /usr/local/poco/lib to crle.
