win32 build system and VS .NET

php.internals

Daniel Convissor

22 years ago
Greetings: I obtained a copy of Visual Studio .NET and tried to build PHP 5 from the current source. Ran into some problems when it came to the configure.js step. Here are the steps I took... Start VS .NET command prompt mkdir php5 mkdir php5\win32 mkdir php5\win32\build [Obtain zip from http://www.php.net/extra/win32build.zip] unzip f:\php\win32build--2004.01.02.zip -d php5 cvs -d :pserver:cvsread@cvs.php.net:/repository co -d php5\bindlib_w32 bindlib_w32 cvs -d :pserver:cvsread@cvs.php.net:/repository co -d phpbuild php-src/win32/build xcopy phpbuild php5\win32\build cvs -d :pserver:cvsread@cvs.php.net:/repository co -d php5 php-src cd php5 buildconf.bat cscript /nologo configure.js --without-gd --without-libxml --disable-zlib --without-iconv Saving configure options to config.nice.bat Checking for cl.exe ... <in default path> Checking for link.exe ... <in default path> Checking for nmake.exe ... <in default path> Checking for lib.exe ... <in default path> Checking for bison.exe ... <not found> Checking for flex.exe ... <not found> Checking for re2c.exe ... <not found> Checking for zip.exe ... <in default path> Checking for lemon.exe ... <not found> Checking for arpa\nameser.h ... <not found> Checking for arpa\nameser.h ... <not found> ERROR: We really need that arpa\nameser.h file - it is part of the win32build package So, it looks like Visual Studio .NET isn't going to cut it, huh? Also, what's up with arpa\namser.h not being found? --Dan
-- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

Jon Parise

22 years ago
On Fri, Jan 02, 2004 at 11:23:47PM -0500, Daniel Convissor wrote:
> I obtained a copy of Visual Studio .NET and tried to build PHP 5 from the > current source. Ran into some problems when it came to the configure.js > step. Here are the steps I took...
[...]
> cvs -d :pserver:cvsread@cvs.php.net:/repository co -d php5\bindlib_w32 > bindlib_w32
cvs -d :pserver:cvsread@cvs.php.net:/repository co bindlib_w32 (e.g. parallel to the php5 directory)
> cvs -d :pserver:cvsread@cvs.php.net:/repository co -d php5 php-src
cvs -d :pserver:cvsread@cvs.php.net:/repository co php5 The 'php5' module alias will ensure that ZendEngine2 is checked out into the 'Zend' directory.
> So, it looks like Visual Studio .NET isn't going to cut it, huh?
It works fine for me. I've been using it all day (building on the command line and debugging in the IDE).
-- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

choinet

22 years ago
> It works fine for me. I've been using it all day > (building on the > command line and debugging in the IDE). > > -- > Jon Parise (jon@php.net) :: The PHP Project > (http://www.php.net/)
Looks like you need to get the resolv.lib replacement and win32 buildtools at http://www.php.net/manual/en/install.windows.php#install.windows.build. Also, if you're creating an Apache sapi dll, you should point Visual Studio to the /include and /lib directories in your Apache installation. __________________________________ Do you Yahoo!? Find out what made the Top Yahoo! Searches of 2003 http://search.yahoo.com/top2003

choinet

22 years ago
> Looks like you need to get the resolv.lib > replacement > and win32 buildtools at >http://www.php.net/manual/en/install.windows.php#install.windows.build. > Also, if you're creating an Apache sapi dll, you > should point Visual Studio to the /include and /lib > directories in your Apache installation.
Have you configured VC to look for the bin, lib, and include directories in the win32build folder? __________________________________ Do you Yahoo!? Find out what made the Top Yahoo! Searches of 2003 http://search.yahoo.com/top2003

Daniel Convissor

22 years ago
Hi Everyone: Thanks for the suggestions. I'm still not there. I tad more help will be appreciated, please. First I'll reply to your points then supply the latest list of commands I tried. On Fri, Jan 02, 2004 at 11:49:59PM -0500, Jon Parise wrote:
> On Fri, Jan 02, 2004 at 11:23:47PM -0500, Daniel Convissor wrote: > > > cvs -d :pserver:cvsread@cvs.php.net:/repository co -d php5\bindlib_w32 > > bindlib_w32 > > cvs -d :pserver:cvsread@cvs.php.net:/repository co bindlib_w32 > (e.g. parallel to the php5 directory)
Hmm... Then what's the purpose of the bindlib_w32 subdirectories in the php-src tree? Should be removed from CVS for clarity?
> > So, it looks like Visual Studio .NET isn't going to cut it, huh? > > It works fine for me. I've been using it all day (building on the > command line and debugging in the IDE).
Have you ever installed an earlier version of Visual Studio or header files from somewhere else too? Doing the "cscript /nologo configure.js..." step for me complains, in part, about mscoree.h being missing. On Fri, Jan 02, 2004 at 09:13:19PM -0800, choinet wrote:
> > Looks like you need to get the resolv.lib replacement > and win32 buildtools at > http://www.php.net/manual/en/install.windows.php#install.windows.build.
Isn't that what I did? On Fri, Jan 02, 2004 at 09:20:15PM -0800, choinet wrote:
> > Have you configured VC to look for the bin, lib, and > include directories in the win32build folder?
Nope. This looks like an important step that I'm missing. I trust I can append those to the appropriate environment variable using the command line. What's the environment variable in question, please? On Sat, Jan 03, 2004 at 11:36:25AM -0000, Steph wrote:
> As Jon suggested, taking bindlib_w32 from CVS rather than from the build zip > makes more sense. 1. the build zip isn't up to date unless someone fixed > this over the past week
I thought I did that. Okay, so here's my latest attempt: d: cd \ mkdir php5 mkdir php5\win32 mkdir php5\win32\build cvs -d :pserver:cvsread@cvs.php.net:/repository co -d phpbuild php-src/win32/build xcopy phpbuild php5\win32\build cvs -d :pserver:cvsread@cvs.php.net:/repository co bindlib_w32 cvs -d :pserver:cvsread@cvs.php.net:/repository co php5 cd php5 lynx -dump http://www.php.net/extra/win32build.zip > win32build.zip unzip win32build.zip buildconf.bat cscript /nologo configure.js --without-gd --without-libxml --disable-zlib --without-iconv Which outputs... Saving configure options to config.nice.bat Checking for cl.exe ... <in default path> Checking for link.exe ... <in default path> Checking for nmake.exe ... <in default path> Checking for lib.exe ... <in default path> Checking for bison.exe ... <not found> Checking for flex.exe ... <not found> Checking for re2c.exe ... <not found> Checking for zip.exe ... <in default path> Checking for lemon.exe ... <not found> Checking for arpa\nameser.h ... ..\bindlib_w32 Checking for resolv.lib ... <not found> Checking for Release\resolv.lib ... <not found> Checking for resolv.lib ... <not found> Build dir: Release_TS PHP Core: php5ts.dll and php5ts.lib Checking for wspiapi.h ... <in default path> Enabling IPv6 support Checking for NewAPIs.h ... <in default path> Enabling SAPI sapi\cgi Enabling SAPI sapi\cli Enabling extension ext\bcmath Enabling extension ext\calendar Checking for oleaut32.lib ... <in default path> Enabling extension ext\com_dotnet Checking for mscoree.h ... <not found> Checking for mscoree.h ... <not found> Enabling extension ext\ctype Enabling extension ext\ftp Enabling extension ext\odbc Enabling extension ext\pcre Enabling extension ext\session Enabling extension ext\sqlite Enabling extension ext\standard Enabling extension ext\tokenizer Creating build dirs... Generating files... Generating Makefile Generating main/internal_functions.c Generating main/config.w32.h Done. Type 'nmake' to build PHP Thanks again, --Dan
-- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

choinet

22 years ago
If you look at http://www.php.net/manual/en/install.windows.php#install.windows.build under Configuring MVC++, they tell you how to set the appropriate paths for the contents of win32build. This should take care of much of the not founds, if not all. Also, did you compile the appropriate resolv.lib file? --- Daniel Convissor <danielc@analysisandsolutions.com> wrote:
> Hi Everyone: > > Thanks for the suggestions. I'm still not there. I > tad more help will be > appreciated, please. First I'll reply to your > points then supply the > latest list of commands I tried. > > > On Fri, Jan 02, 2004 at 11:49:59PM -0500, Jon Parise > wrote: > > On Fri, Jan 02, 2004 at 11:23:47PM -0500, Daniel > Convissor wrote: > > > > > cvs -d :pserver:cvsread@cvs.php.net:/repository > co -d php5\bindlib_w32 > > > bindlib_w32 > > > > cvs -d :pserver:cvsread@cvs.php.net:/repository co > bindlib_w32 > > (e.g. parallel to the php5 directory) > > Hmm... Then what's the purpose of the bindlib_w32 > subdirectories in the > php-src tree? Should be removed from CVS for > clarity? > > > > > So, it looks like Visual Studio .NET isn't going > to cut it, huh? > > > > It works fine for me. I've been using it all day > (building on the > > command line and debugging in the IDE). > > Have you ever installed an earlier version of Visual > Studio or header > files from somewhere else too? Doing the > "cscript /nologo configure.js..." step for me > complains, in part, about > mscoree.h being missing. > > > On Fri, Jan 02, 2004 at 09:13:19PM -0800, choinet > wrote: > > > > Looks like you need to get the resolv.lib > replacement > > and win32 buildtools at > > >
http://www.php.net/manual/en/install.windows.php#install.windows.build.
> > Isn't that what I did? > > > On Fri, Jan 02, 2004 at 09:20:15PM -0800, choinet > wrote: > > > > Have you configured VC to look for the bin, lib, > and > > include directories in the win32build folder? > > Nope. This looks like an important step that I'm > missing. I trust I can > append those to the appropriate environment variable > using the command > line. What's the environment variable in question, > please? > > > On Sat, Jan 03, 2004 at 11:36:25AM -0000, Steph > wrote: > > As Jon suggested, taking bindlib_w32 from CVS > rather than from the build zip > > makes more sense. 1. the build zip isn't up to > date unless someone fixed > > this over the past week > > I thought I did that. Okay, so here's my latest > attempt: > > d: > cd \ > mkdir php5 > > mkdir php5\win32 > mkdir php5\win32\build > cvs -d :pserver:cvsread@cvs.php.net:/repository co > -d phpbuild > php-src/win32/build > xcopy phpbuild php5\win32\build > > cvs -d :pserver:cvsread@cvs.php.net:/repository co > bindlib_w32 > cvs -d :pserver:cvsread@cvs.php.net:/repository co > php5 > > cd php5 > > lynx -dump http://www.php.net/extra/win32build.zip > > win32build.zip > unzip win32build.zip > > buildconf.bat > cscript /nologo configure.js --without-gd > --without-libxml --disable-zlib > --without-iconv > > Which outputs... > > Saving configure options to config.nice.bat > Checking for cl.exe ... <in default path> > Checking for link.exe ... <in default path> > Checking for nmake.exe ... <in default path> > Checking for lib.exe ... <in default path> > Checking for bison.exe ... <not found> > Checking for flex.exe ... <not found> > Checking for re2c.exe ... <not found> > Checking for zip.exe ... <in default path> > Checking for lemon.exe ... <not found> > Checking for arpa\nameser.h ... ..\bindlib_w32 > Checking for resolv.lib ... <not found> > Checking for Release\resolv.lib ... <not found> > Checking for resolv.lib ... <not found> > > Build dir: Release_TS > PHP Core: php5ts.dll and php5ts.lib > > Checking for wspiapi.h ... <in default path> > Enabling IPv6 support > Checking for NewAPIs.h ... <in default path> > Enabling SAPI sapi\cgi > Enabling SAPI sapi\cli > Enabling extension ext\bcmath > Enabling extension ext\calendar > Checking for oleaut32.lib ... <in default path> > Enabling extension ext\com_dotnet > Checking for mscoree.h ... <not found> > Checking for mscoree.h ... <not found> > Enabling extension ext\ctype > Enabling extension ext\ftp > Enabling extension ext\odbc > Enabling extension ext\pcre > Enabling extension ext\session > Enabling extension ext\sqlite > Enabling extension ext\standard > Enabling extension ext\tokenizer > > Creating build dirs... > Generating files... > Generating Makefile > Generating main/internal_functions.c > Generating main/config.w32.h > Done. > > Type 'nmake' to build PHP > > > Thanks again, > > --Dan > > -- > T H E A N A L Y S I S A N D S O L U T I O N S > C O M P A N Y > data intensive web and database > programming > http://www.AnalysisAndSolutions.com/ > 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 > f: 718-854-0409 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >
__________________________________ Do you Yahoo!? Find out what made the Top Yahoo! Searches of 2003 http://search.yahoo.com/top2003

Daniel Convissor

22 years ago
Hi Everyone: On Sat, Jan 03, 2004 at 09:50:41AM -0800, choinet wrote:
> If you look at > http://www.php.net/manual/en/install.windows.php#install.windows.build > under Configuring MVC++, they tell you how to set the > appropriate paths for the contents of win32build.
OHHHH! I didn't realize most of the stuff on that page still appplies. The initial email announcing the new build system and the readme file in CVS gave me the mistaken impression that all of that was obsolete. FYI: To set the build environment variables from the VS .NET command prompt... set path=%path%;d:\work\win32build\bin set include=%include%;d:\work\win32build\include set lib=%lib%;d:\work\win32build\lib One small question before I get to the big ones: The instructions give the option to build bindlib from the command line: msdev bindlib.dsp /MAKE "bindlib - Win32 Debug" But that produces an error about msdev not existing. Guess it's not part of the VS .NET package. I worked around it for now using the GUI stuff. But is there some substitute command that can be used from the command line, please? Okay. But we're still not there. The nmake step complains about access being denied to Zend/zend_ini_parser.y, but I and everyone have full control over that file. Also, configure.js says re2c.exe and lemon.exe weren't found. It seems like those aren't real problems. Here's the output... cscript /nologo configure.js --without-gd --without-libxml --disable-zlib --without-iconv Saving configure options to config.nice.bat Checking for cl.exe ... <in default path> Checking for link.exe ... <in default path> Checking for nmake.exe ... <in default path> Checking for lib.exe ... <in default path> Checking for bison.exe ... <in default path> Checking for flex.exe ... <in default path> Checking for re2c.exe ... <not found> Checking for zip.exe ... <in default path> Checking for lemon.exe ... <not found> Checking for arpa\nameser.h ... ..\win32build\include Checking for resolv.lib ... ..\win32build\lib Build dir: Release_TS PHP Core: php5ts.dll and php5ts.lib Checking for wspiapi.h ... <in default path> Enabling IPv6 support Checking for NewAPIs.h ... <in default path> Enabling SAPI sapi\cgi Enabling SAPI sapi\cli Enabling extension ext\bcmath Enabling extension ext\calendar Checking for oleaut32.lib ... <in default path> Enabling extension ext\com_dotnet Checking for mscoree.h ... <not found> Checking for mscoree.h ... <not found> Enabling extension ext\ctype Enabling extension ext\ftp Enabling extension ext\odbc Enabling extension ext\pcre Enabling extension ext\session Enabling extension ext\sqlite Enabling extension ext\standard Enabling extension ext\tokenizer Creating build dirs... Generating files... Generating Makefile Generating main/internal_functions.c [content unchanged; skipping] Generating main/config.w32.h Done. Type 'nmake' to build PHP nmake bison.exe --output=Zend/zend_ini_parser.c -v -d -p ini_ Zend/zend_ini_parser.y Access is denied. NMAKE : fatal error U1077: 'bison.exe' : return code '0x1' Stop. Thanks for all your patience and help thus far, --Dan
-- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409

Steph

22 years ago
mmm, you need to build resolv.lib before you build php :) (i.e. you need to build the CVS version of bindlib_w32)

Jon Parise

22 years ago
On Sat, Jan 03, 2004 at 12:20:19PM -0500, Daniel Convissor wrote:
> > > cvs -d :pserver:cvsread@cvs.php.net:/repository co -d php5\bindlib_w32 > > > bindlib_w32 > > > > cvs -d :pserver:cvsread@cvs.php.net:/repository co bindlib_w32 > > (e.g. parallel to the php5 directory) > > Hmm... Then what's the purpose of the bindlib_w32 subdirectories in the > php-src tree? Should be removed from CVS for clarity?
They have been removed; those directories are empty. Running 'cvs update -P' will prune those empty directories from your local checkout.
> > > So, it looks like Visual Studio .NET isn't going to cut it, huh? > > > > It works fine for me. I've been using it all day (building on the > > command line and debugging in the IDE). > > Have you ever installed an earlier version of Visual Studio or header > files from somewhere else too? Doing the > "cscript /nologo configure.js..." step for me complains, in part, about > mscoree.h being missing.
I'm running this version of the compiler: Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.00.9466 for 80x86 I don't think I have any additional SDK's installed right now other than the Microsoft .NET Framework, but I could be mistaken. I've used this machine for a lot of Windows-based development in the past.
> Checking for arpa\nameser.h ... ..\bindlib_w32 > Checking for resolv.lib ... <not found> > Checking for Release\resolv.lib ... <not found> > Checking for resolv.lib ... <not found>
You need to build resolv.lib if you're going to check out the bindlib_w32 source directory. The compiled library is not stored in cvs.
-- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

Steph

22 years ago
As Jon suggested, taking bindlib_w32 from CVS rather than from the build zip makes more sense. 1. the build zip isn't up to date unless someone fixed this over the past week, 2. the bindlib_w32 dir should be at the top level.