New win32 build system

php.internals

Wez Furlong

22 years ago
I've committed the build infrastructure for the "real programmers don't need an IDE" build system for win32. Why? - It's frustrating to have to use VC6 to work on PHP if you have a newer version that has incompatible project files. - It's annoying to mess around with libxml2 stuff until it stabilizes :-) and a pain to have to remember to edit the config.w32.h header each time, and a pain to have to avoid accidentally committing those changes each time. - It's difficult to set up a fully working build environment for PHP without installing everything. - It's difficult for people without VC6 to create a win32 project file for their extensions. Requirements: You need windows script host (cscript.exe) and JScript installed. This should be a standard config on windows machines since win98 (perhaps optional under win98). You also need the Microsoft build tools (cl.exe, link.exe and nmake.exe). These are freely available as part of the Platform SDK, but also come with VC++/Visual Studio. Finally, you need the php_build dir that contains all the headers and libraries for the things that php is linked against; see [1] for details. Usage: Check out PHP 5 and run buildconf.bat from the root of the php source. This script is roughly equivalent to the unix buildconf in that it scans ext/* and sapi/* for config.w32 files describing optional build components and generates a configure script named configure.js Now run "cscript configure.js --help" to get a list of configure options; enable and disable stuff as appropriate. Then type nmake to build the things you configured. You will find the various .exe and .dll files in the build dir that configure selects for you based on debug and zts settings; it will be one of the usual Debug_TS, Release_TS, Debug or Release dirs found under the source root. You can also run the test suite by running "nmake test". [we have some issues under win32 with current CVS!] TODO: - Write config.w32 files for more extensions and sapis. They're quite easy (just a couple of javascript function calls) and can be put together almost without thinking by copying the guts of the config.m4 file from the same extension. - add those .rc files with version info the generated .dll's and .exe's - Test if it actually works under win98 (Steph?) There are only two places that I suspect might have difficulty under win98. [1] http://www.php.net/manual/en/install.windows.php#install.windows.build

Jon Parise

22 years ago
On Tue, Dec 02, 2003 at 11:40:18PM -0000, Wez Furlong wrote:
> I've committed the build infrastructure for the > "real programmers don't need an IDE" build system for win32.
Neat. Could you add a README.WIN32-BUILD-SYSTEM file that contains all of the information that you provided in this email?
-- Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)

Wez Furlong

22 years ago
Done.

Daniel Convissor

22 years ago
Wez: Your new compile routine -- which sounds nice, thanks -- seems to come just in time for me... On Tue, Dec 02, 2003 at 11:40:18PM -0000, Wez Furlong wrote:
> You also need the Microsoft build tools (cl.exe, link.exe and nmake.exe). > These are freely available as part of the Platform SDK, but also > come with VC++/Visual Studio.
Platform SDK??? Ah, Google to the rescue... http://www.google.com/search?q=+site:www.microsoft.com+platform+sdk Seems http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ is the main page for this product. Unfortunately, the website is by Microsoft. Going to that page using Mozilla with JavaScript turned off, produces a non-helpful page that just says what PSDK is, but no links to anything else. Turning JS on, then the page says "The Microsoft® Platform SDK site requires Microsoft Internet Explorer version 5.0 or later" and that Active X needs to be on. Damn, I hate this freakin company! I just want to download a file! One of the links from Google goes to http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm which looks pretty promising since it's titled "Full Download with Local Install." Alas, no links to actually get the file. By going to http://www.microsoft.com/downloads/search.aspx?displaylang=en and selecting "Platform SDK" from the option list produced over 400 hits and adding "2000," which is my platform, to the terms cut it down to 9, but none of the results look like what I need. Wez, can you pleaes help point me to the right place? Guess it'd be handy to have this explained in your readme file too.
> Check out PHP 5 and run buildconf.bat from the root of the php > source.
Looks like I'm going to need to build several versions of old php5 sources. Can I correctly assume that if I copy the new php-src/win32/build directory into the downloaded php-src/win32 directory, I'll be able to use it? Thanks, --Dan
-- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

Wez Furlong

22 years ago
> On Tue, Dec 02, 2003 at 11:40:18PM -0000, Wez Furlong wrote: > Platform SDK??? Ah, Google to the rescue... > http://www.google.com/search?q=+site:www.microsoft.com+platform+sdk
[snip rant about MS]
> Wez, can you pleaes help point me to the right place? Guess it'd be handy > to have this explained in your readme file too.
I'm afraid I don't have the time for that right now. The build system is still in its infancy and I haven't tried it on a machine that has only the platform SDK installed; I certainly can't support someone who has never heard of it before install it :-)
> Looks like I'm going to need to build several versions of old php5 > sources. Can I correctly assume that if I copy the new > php-src/win32/build directory into the downloaded php-src/win32 directory, > I'll be able to use it?
Maybe, but I don't have the time to help you there I'm afraid. --Wez.

Daniel Convissor

22 years ago
Hi Wez: On Wed, Dec 03, 2003 at 05:28:43PM -0000, Wez Furlong wrote:
> > I certainly > can't support someone who has never heard of it before install it :-)
I'm just asking where you downloaded it from, please. For example, did you use the aforementioned URI but with IE? Or do you have some other URI?
> Maybe, but I don't have the time to help you there I'm afraid.
No sweat. I'm not looking for help. Just wondering if you knew if it would work. So, the answer is "maybe." I'll try it out -- when I get the Platform SDK installed :) -- and let folks know what happens. Thanks, --Dan
-- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

Wez Furlong

22 years ago
> I'm just asking where you downloaded it from, please. For example, did > you use the aforementioned URI but with IE? Or do you have some other > URI?
I didn't download it; I have VC6 and VS.Net 2003. Olivier Hill posted a link to the correct page which is one of those you mentioned in your MS rant iirc. --Wez.

Olivier Hill

22 years ago
Wez Furlong wrote:
> Olivier Hill posted a link to the correct page which is one > of those you mentioned in your MS rant iirc.
And you need IE 5+ to access the page.. Since it's ActiveX powered with "Famous Microsoft Auto-Install via the web" crap. Browsing with Mozilla will only give you a warning. Oliver
-- GB/E/IT d+ s+:+ a-- C++$ UL++++$ P++++ L+++$ E- W++$ N- ?o ?K w--(---) !O M+$ V- PS+ PE- Y PGP t++ 5-- X+@ R- tv++ b++(+++) DI++++ D+ G++ e+>++ h(*) r y+(?)

Daniel Convissor

22 years ago
Hi Folks: FINALLY heard back from Microsoft... On Tue, Dec 02, 2003 at 08:19:56PM -0500, Daniel Convissor wrote:
> http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm > which looks pretty promising since it's titled "Full Download with Local > Install." Alas, no links to actually get the file.
Here are the links: http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.1.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.2.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.3.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.4.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.5.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.6.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.7.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.8.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.9.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.10.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.11.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.12.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.13.cab http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/PSDK-FULL.bat http://download.microsoft.com/download/platformsdk/sdk/update/win98mexp/en-us/3790.0/FULL/Extract.exe Download them all then run PSDK-FULL.bat <dir to extract files to> That will extract the files. Then you need to go to that dir and run setup.exe. Enjoy, --Dan
-- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

Jeremy S. Johnstone

22 years ago
FYI, if you put the word "premier" in front of the URL, you will get much faster download speeds. Anytime you see a URL with "download.microsoft.com" you can almost always change it to "premierdownload.microsoft.com" and get much faster speeds. -Jeremy On Tue, 2003-12-16 at 22:40, Daniel Convissor wrote:

Sebastian Bergmann

22 years ago
Wez Furlong wrote:
> Then type nmake to build the things you configured.
Current CVS breaks at this point for me: E:\home\php\php5>cscript /nologo configure.js --enable-debug --disable-apache 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 make.exe ... <in default path> Checking for arpa\nameser.h ... ..\bindlib_w32 Build dir: Debug_TS PHP Core: php5ts_debug.dll and php5ts_debug.lib Enabling sapi/cgi Enabling sapi/cli Enabling sapi/isapi Enabling ext/bcmath Enabling ext/calendar Enabling ext/com_dotnet Enabling ext/ctype Enabling ext/dom Enabling ext/ftp Enabling ext/libxml Checking for iconv.lib ... <not found> Checking for libxml2.lib ... <not found> Checking for libxml/parser.h ... <not found> Enabling ext/odbc Enabling ext/pcre Enabling ext/session Enabling ext/simplexml Enabling ext/sqlite Enabling ext/standard Enabling ext/tokenizer Enabling ext/wddx Enabling ext/xml Enabling ext/zlib Checking for zlib.lib ... <not found> Checking for zlib.h ... ..\zlib Creating build dirs... Generating files... Generating Makefile Generating main/internal_functions.c Generating main/config.w32.h Done. Type 'nmake' to build PHP E:\home\php\php5>nmake Microsoft (R) Program Maintenance-Dienstprogramm: Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. Alle Rechte vorbehalten. bison --output=Zend/zend_ini_parser.\ -v -d -p ini_ Zend/zend_ini_parser .y Zend/zend_ini_parser.y: conflicts: 4 shift/reduce Zend/zend_ini_parser.y: warning: conflicting outputs to file `Zend/zend_ini_pars er.\\' bison: cannot open file `Zend/zend_ini_parser.\': No such file or directory NMAKE : fatal error U1077: 'bison' : Rueckgabe-Code '0x1' Stop.
-- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/

Sebastian Bergmann

22 years ago
Wez Furlong wrote:
> Finally, you need the php_build dir that contains all the > headers and libraries for the things that php is linked > against; see [1] for details.
The current version of this archive does not contain libxml2/libxslt. It would be nice if these could be added and even nicer if the contents of this archive could be stored in CVS and have a cronjob automatically package the archive.
-- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/

Andi Gutmans

22 years ago
Hi Wez, I think this is an extremely cool effort (although I haven't played around with it quite yet). Is win32build.zip updated with all of the latest and greatest including libXML2? I really think we should have a big package with everything inside. It's usually a pain when I want to build certain additional extensions because lots of stuff isn't included right now. Andi At 11:40 PM 12/2/2003 +0000, Wez Furlong wrote:

Sebastian Bergmann

22 years ago
Andi Gutmans wrote:
> Is win32build.zip updated with all of the latest and greatest > including libXML2?
No, it isn't.
-- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/

Andi Gutmans

22 years ago
At 09:30 AM 12/3/2003 +0100, Sebastian Bergmann wrote:
>Andi Gutmans wrote: > > Is win32build.zip updated with all of the latest and greatest > > including libXML2? > > No, it isn't.
Any chance of updating it or making an additional package for ppl who have a DSL line :) Andi

Sebastian Bergmann

22 years ago
Andi Gutmans wrote:
> Any chance of updating it or making an additional package for ppl who > have a DSL line :)
I only have a "hacked" build of libxml2/libxslt here that someone from IRC (can't remember who) sent me a while ago. Anyhow, I think it would be best to maintain the Win32 build dependencies in a new CVS module allow for - Incremental updates - Automatically up2date-ness - A cronjob that creates the archive we now offer
-- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker.de/ Das Buch zu PHP 5: http://professionelle-softwareentwicklung-mit-php5.de/

Olivier Hill

22 years ago
Wez Furlong wrote:
> > You also need the Microsoft build tools (cl.exe, link.exe and nmake.exe). > These are freely available as part of the Platform SDK, but also > come with VC++/Visual Studio.
Just to be sure... I have VC6, so I don't need those, but are you talking about this SDK? http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ If this is the good link, should we put it in the "Building PHP with Windows" part of the manual? I can always add it (IIRC I have karma) if you don't have the time to. Oliver
-- GB/E/IT d+ s+:+ a-- C++$ UL++++$ P++++ L+++$ E- W++$ N- ?o ?K w--(---) !O M+$ V- PS+ PE- Y PGP t++ 5-- X+@ R- tv++ b++(+++) DI++++ D+ G++ e+>++ h(*) r y+(?)

Wez Furlong

22 years ago
Yes, thats the one, but please don't do that (yet!). I want to stabilize things a little before it goes "public"; I don't mind dealing with a handful of the core developers, but certainly can't handle people asking me how to install the SDK etc. etc. right now. --Wez.
> > You also need the Microsoft build tools (cl.exe, link.exe and
nmake.exe).

Olivier Hill

22 years ago
Wez Furlong wrote:
> Yes, thats the one, but please don't do that (yet!). > I want to stabilize things a little before it goes "public"; > I don't mind dealing with a handful of the core developers, > but certainly can't handle people asking me how to install > the SDK etc. etc. right now.
Ooops.. I do understand that ;) Well, let me know if I can help you when things get stabilized. In the meantime, do we still have to update a bunch of .dsp/.dsw to rename all php4* files to php5*? Or does this new configuration script take care of this? Edin was talking about this problem 2-3 weeks ago. Oliver
-- GB/E/IT d+ s+:+ a-- C++$ UL++++$ P++++ L+++$ E- W++$ N- ?o ?K w--(---) !O M+$ V- PS+ PE- Y PGP t++ 5-- X+@ R- tv++ b++(+++) DI++++ D+ G++ e+>++ h(*) r y+(?)

Wez Furlong

22 years ago
I'd like this system to replace the .dsp's ready for when PHP 5 goes gold; I'm not sure what the others think. However, I don't think we have time to get it working for beta 3, so someone still needs to edit all those .dsp files, and change php4 to php5 in main/config.w32.h for the install dir. --Wez.

Olivier Hill

22 years ago
Wez Furlong wrote:
> However, I don't think we have time to get it working for beta 3, > so someone still needs to edit all those .dsp files, and change > php4 to php5 in main/config.w32.h for the install dir.
Maybe we could commit this file for PHP5. As for the dsp/dsw, we have to include new file in CVS. Is someone able to rename all files on the server to php4*.dsp --> php5*.dsp? After this step, a simple find/replace should do the trick. Am I mistaken? Edin? Wez? Oliver
-- GB/E/IT d+ s+:+ a-- C++$ UL++++$ P++++ L+++$ E- W++$ N- ?o ?K w--(---) !O M+$ V- PS+ PE- Y PGP t++ 5-- X+@ R- tv++ b++(+++) DI++++ D+ G++ e+>++ h(*) r y+(?)

Daniel Convissor

22 years ago
On Tue, Dec 02, 2003 at 11:40:18PM -0000, Wez Furlong wrote:
> You also need the Microsoft build tools (cl.exe, link.exe and nmake.exe). > These are freely available as part of the Platform SDK, but also > come with VC++/Visual Studio.
Folks, don't waste your time downloading and installing the Platform SDK. The build tools aren't in there nor is the mscoree.h file. --Dan
-- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

Wez Furlong

22 years ago
If you paid attention to the list, and read the README, you would have discovered that I'd already stated this. Downloading the PSDK is useful if you only have VC6 and want an up-to-date build environment. mscoree.h is part of the .Net SDK. --Wez.
> > You also need the Microsoft build tools (cl.exe, link.exe and
nmake.exe).

Daniel Convissor

22 years ago
On Thu, Dec 18, 2003 at 04:38:28PM -0000, Wez Furlong wrote:
> If you paid attention to the list, and read the README, > you would have discovered that I'd already stated this.
It wasn't mentioned on the list. Yes, it's now in the readme file, but I was working on an old release that didn't have that file. --Dan
-- FREE scripts that make web and database programming easier http://www.analysisandsolutions.com/software/ 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 4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409