SMCompile Wt with cygwin (Error in WIOService)
Added by Simon M over 11 years ago
Hi,
I tried to build Wt with cygwin using the docs http://redmine.webtoolkit.eu/projects/wt/wiki/Installing_Wt_on_Cygwin_using_gcc
I use cygwin's:
- gcc 4.9.2
- Boost 1.55 (provided by cygwin)
- cmake 2.8.9
- make 4.0
However, it fails to compile WIOService (see attached log).
Any help is appreciated, thanks!
Replies (5)
SM RE: Compile Wt with cygwin (Error in WIOService) - Added by Simon M over 11 years ago
Well, here's the logfile
| cygwin_output.txt (30 KB) cygwin_output.txt |
SM RE: Compile Wt with cygwin (Error in WIOService) - Added by Simon M over 11 years ago
So I investigated a little more. Here are the issues I found, when compiling Wt 3.3.3 with Cygwin 1.7.33-2(0.280/5/3):
I used
cmake -DBOOST_PREFIX=/usr -DSSL_PREFIX=/usr/lib -DWT_CPP_11_MODE=-std=c++0x /cygdrive/c/projects/wt-3.3.3/
- WIOService cannot be compiled, because
fd_setis not defined. RemovingADD_DEFINITIONS(-D__USE_W32_SOCKETS)from CMakeLists.txt fixes this, but then I get the following error in wthttp, because it uses Windows sockets:
In file included from /usr/include/w32api/winsock2.h:56:0, from /cygdrive/cprojects/wt-3.3.3/src/http/Configuration.C:30: /usr/include/w32api/psdk_inc/_fd_types.h:100:2: Warnung: #warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Wcpp] #warning "fd_set and associated macros have been defined in sys/types. realpath() in WServer.C is not declared in this scopemkstemp()in FileUtils.C is not declared in this scope
SM RE: Compile Wt with cygwin (Error in WIOService) - Added by Simon M over 11 years ago
Some more:
strcasestrin Request.C is not declared in this scopesrand48in WServer.C is not declared in this scopesrand48in Server.C is not declared in this scopelrand48in Server.C is not declared in this scope
SM RE: Compile Wt with cygwin (Error in WIOService) - Added by Simon M over 11 years ago
Simon M wrote:
*
srand48in WServer.C is not declared in this scope
*srand48in Server.C is not declared in this scope
*lrand48in Server.C is not declared in this scope
*realpathin WServer.C is not declared in this scope
*mkstempin FileUtils.C is not declared in this scope
-DWT_CPP_11_MODE=-std=c++0x defines also __STRICT_ANSI__, so the above functions are not available in Cygwin.
Using cmake -DBOOST_PREFIX=/usr -DSSL_PREFIX=/usr/lib -DWT_CPP_11_MODE=-std=gnu++0x /cygdrive/c/projects/wt-3.3.3/ enables C++11 with GNU extensions and makes the above functions work
SM RE: Compile Wt with cygwin (Error in WIOService) - Added by Simon M over 11 years ago
* WIOService cannot be compiled, because
fd_setis not defined.
I removed ADD_DEFINITIONS(-D__USE_W32_SOCKETS) from CMakeLists.txt and replaced
#ifdef __CYGWIN__ #include <winsock2.h> // for gethostname() #endif
with
#ifdef __USE_W32_SOCKETS #include <winsock2.h> // for gethostname() #endif
in src/http/Configuration.C
* strcasestr in Request.C is not declared in this scope
I added
#undef HAVE_STRCASECMP #undef HAVE_STRCASESTR
in src/http/Request.C
So I am able to compile Wt with Cygwin, but I am not sure yet, if these changes are correct.
Any help is appreciated, thanks!