5.2.8 Build problem - php_cli.c compile fails
| From: | David M. Patterson | Date: | Wed, 04 Feb 2009 00:16:23 +0000 |
| Subject: | 5.2.8 Build problem - php_cli.c compile fails | ||
| Groups: | php.internals.win | ||
| Request: | Send a blank email to internals-win+get-400@lists.php.net to get a copy of this message | ||
I have been unable to build PHP 5.2.8 (release or snapshot from this
afternoon).
My guess is that I haven't set up my build environment correctly since the
binary Windows snaps seem to building OK.
I'm using Visual Studio V6 and Microsoft Windows Server 2003 SDK.
I have a directory C:\PhpDev.
Within C:\PhpDev are the php-5.2.8 source tree and the php_build tree from
http://pecl2.php.net/downloads/php-windows-builds/php-libs/binary-tools.zip.
I perform the following steps:
- Change to C:\Php_dev\php-5.2.8.
- "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT"
- buildconf.bat
- cscript /nologo configure.js --disable-all --enable-cli
--enable-object-out-dir=.
- nmake
Execution of configure.js resulted in no warnings or errors.
When nmake attempts to compile php_cli.c it reports:
error C2027: use of undefined type 'addrinfo' in
C:\Program Files\Microsoft SDK\Include\.\wspiapi.h(168)
A couple of dozen additional errors are reported, all related to the missing
addrinfo structure definition.
William Rowe responded to my original post with:
"The fix is trivial, I'll have something shortly, sorry I've been swamped
since I put together these fixes.
Essentially we simply need to ensure that _WINSOCK_H_ is defined to prevent
the SDK from including winsock.h, and then ensure that winsock2 is included
consistently. winsock.h is long, long dead."
I have been trying to implement this advice but no joy so far.
I have successfully defined _WINSOCK_H_ and have changed the only instance
that I could find of #include winsock.h to #include winsock2.h, but still
get the same error.
I really need to get a build environment in place for PHP5 so that I can
migrate a large project with a bunch of W32-specific stuff in it (including
some custom extensions) to from PHP4 to PHP5.
Assistance with getting a Windows PHP5 build environment correctly
configured would be most appreciated.
Thanks in advance,
Dave