Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19688 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 764 invoked by uid 1010); 22 Oct 2005 16:00:35 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 736 invoked from network); 22 Oct 2005 16:00:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2005 16:00:34 -0000 Received: from ([127.0.0.1:20485]) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with ECSTREAM id FB/B2-22302-2226A534 for ; Sat, 22 Oct 2005 12:00:34 -0400 X-Host-Fingerprint: 72.14.204.206 qproxy.gmail.com Linux 2.4/2.6 Received: from ([72.14.204.206:42326] helo=qproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id DE/62-22302-39E5A534 for ; Sat, 22 Oct 2005 11:45:23 -0400 Received: by qproxy.gmail.com with SMTP id p36so61143qba for ; Sat, 22 Oct 2005 08:45:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=AGJdytv46BnkJWVNQob91rI1HNzhpAjm+wWv0jqPW4gaPEyBl7Sq/EXrC4hlf4lWRX+ZneiwTZzoCO+5IORSo2XldA5JUkef+nhpRYfZAk6Hz6Gm5Kmpzbb/Qc4QVn1nAUIx1T5c04N0zxZ5h4QtvqOtXl8jpYNnat57h0zxiIU= Received: by 10.65.112.4 with SMTP id p4mr64548qbm; Sat, 22 Oct 2005 08:45:20 -0700 (PDT) Received: by 10.65.112.1 with HTTP; Sat, 22 Oct 2005 08:45:19 -0700 (PDT) Message-ID: Date: Sat, 22 Oct 2005 17:45:20 +0200 To: Wez Furlong Cc: internals@lists.php.net In-Reply-To: <4e89b4260510220804n11c60ef9mbb63fd533e7deebb@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3777_14054482.1129995920006" References: <1083412052.20051022123025@tut.by> <4e89b4260510220804n11c60ef9mbb63fd533e7deebb@mail.gmail.com> Subject: Re: PHP 4 win build system questions From: techtonik@gmail.com (techtonik) ------=_Part_3777_14054482.1129995920006 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > If you have cygwin flex and bison, you don't need to copy anything. And if I don't have any? Can it be made as simple as "unpack and compile"? If you'll read this page http://www.php.net/manual/en/install.windows.building.php you notice redundant instructions for copying files and setting up MSVC++. I've made a .bat file to automate the process and avoid making these repeated operations manually every time I need to compile PHP 4 for testing. I'm looking into get this process even more simple and without unnecessary garbage left on my c: drive. Files are attached. > You also don't *have* to recompile resolv.lib; just build a release > build and use that, even when you're building a debug version of PHP. Why do I need to build it at all if it is included in win32build.zip? Should I update installation instructions on http://www.php.net/manual/en/install.windows.building.php then? > > --Wez. > > On 10/22/05, techtonik wrote: > > ||*()*|| Greetings, phpinnards.. =3D) > > > > I tried to automate build system for PHP 4 a bit and after that > > can't get some stupid questions out of my head. Install instructions > > located as usual > http://www.php.net/manual/en/install.windows.building.php > > > > There are at least two inconveniences: > > 1. Need to copy bison.sample from win32build\bin to c:\usr\local\lib > > 2. Need to recompile resolv.lib every time target changes > > > > So the questions are the following > > 1.1 Why not to get rid of this bison.sample copy operation either by > > 1.1.1 upgrade bison.exe in win32build.zip from 1.27 to at > > least 1.34, which adds -S options to specify bison.sample > > explicitly and also includes some memory leak fixes > > > http://sourceforge.net/project/shownotes.php?release_id=3D274058 > > or > > 1.1.2 set up environment variable BISON_SIMPLE somewhere in > > build files/scripts? > > > > 2.1 Why resolv.lib needs to be recompiled every time when target > > changes from "debug" to "release" and vice versa > > 2.1.1 Why it is not possible to supply a separate resolv_debug.li= b > > and resolv_release.lib files in win32build.zip and rewrite > > dependencies for them in windows build files? > > > > Thanks. > > > > .techtonik > > -- > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > ------=_Part_3777_14054482.1129995920006 Content-Type: text/plain; name=bootstrap.bat.txt; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="bootstrap.bat.txt" @echo off echo. echo Instructions on compiling PHP under windows can be found at echo http://www.php.net/manual/en/install.windows.building.php if not exist "win32build" goto nowin32build if not exist "bindlib_w32" goto nobindlib_w32 if not exist "php-src" goto nophpsources if not exist "win32build\bin\bison.simple" goto nobison if exist "c:\usr\local\lib\bison.simple" goto bisonskip echo. echo Creating the directories c:\usr\local\lib if not exist "c:\usr" mkdir c:\usr if not exist "c:\usr\local" mkdir c:\usr\local if not exist "c:\usr\local\lib" mkdir c:\usr\local\lib echo Copying bison.simple from win32build\bin to c:\usr\local\lib copy "win32build\bin\bison.simple" "c:\usr\local\lib\bison.simple" :bisonskip echo. echo Reading configuration from config.bat if not exist "config.bat" goto noconfig call config.bat call %VCVARS% rem detect passed options - debug or normal - to know how to build resolv.lib if "%1"=="debug" ( echo Debug version of resolv.lib chosen - PHP must be built the same way msdev bindlib_w32\bindlib.dsp /MAKE "bindlib - Win32 Debug" echo Copying bindlib_w32\Debug\resolv.lib to win32build\lib copy bindlib_w32\Debug\resolv.lib win32build\lib\resolv.lib echo. echo Compiling PHP CGI Debug version msdev php-src\win32\php4ts.dsp /MAKE "php4ts - Win32 Debug_TS" echo Compiling PHP CLI Debug version msdev php-src\win32\php4ts.dsp /MAKE "php4ts_cli - Win32 Debug_TS" ) else ( if "%1"=="release" ( echo Release version of resolv.lib chosen - PHP must be built the same way msdev bindlib_w32\bindlib.dsp /MAKE "bindlib - Win32 Release" echo Copying bindlib_w32\Release\resolv.lib to win32build\lib copy bindlib_w32\Release\resolv.lib win32build\lib\resolv.lib echo. echo Compiling PHP CGI Release version msdev php-src\win32\php4ts.dsp /MAKE "php4ts - Win32 Release_TS" echo Compiling PHP CLI Release version msdev php-src\win32\php4ts.dsp /MAKE "php4ts_cli - Win32 Release_TS" ) else ( goto nocomptype ) ) echo. echo See http://www.php.net/manual/en/install.windows.building.php echo for further details. exit 0 :nowin32build echo. echo Error: "win32build" subdirectory doesn't exist - download and echo extract it from http://www.php.net/extra/win32build.zip exit 1 :nobison echo. echo Error: file "win32build\bin\bison.simple" doesn't exist exit 1 :nobindlib_w32 echo. echo Error: "bindlib_w32" subdirectory doesn't exist - create and extract echo files to it from http://www.php.net/extra/bindlib_w32.zip exit 1 :nophpsources echo. echo Error: "php-src" subdirectory doesn't exist - unpack php sources and echo rename "php-x.x.x" to "php-src" exit 1 :nocomptype echo. echo Error: supply either "debug" or "release" string as the first parameter echo to this .bat file goto usage :noconfig echo. echo Error: no configuration found - rename config.bat.samp to config.bat echo setup appropriate paths for your system exit 1 :usage echo. echo "Usage: bootstrap.bat [debug|release]" ------=_Part_3777_14054482.1129995920006 Content-Type: text/plain; name=config.bat.samp.txt; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="config.bat.samp.txt" @echo off rem set paths to your build environment here set BISON_SIMPLE=./win32build/bin/bison.simple set VCVARS=../../VC98/Bin/VCVARS32.BAT ------=_Part_3777_14054482.1129995920006 Content-Type: text/plain; name=php4dllts.dsp.patch.txt; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="php4dllts.dsp.patch.txt" --- php4dllts_old.dsp Wed Nov 17 02:10:26 2004 +++ php4dllts.dsp Sat Oct 22 18:41:44 2005 @@ -55,7 +55,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ZendTS.lib TSRM.lib resolv.lib libmysql.lib zlib.lib Urlmon.lib /nologo /version:4.0 /dll /debug /machine:I386 /nodefaultlib:"libcmt" /out:"..\Debug_TS\php4ts_debug.dll" /pdbtype:sept /libpath:"..\TSRM\Debug_TS" /libpath:"..\Zend\Debug_TS" /libpath:"..\..\bindlib_w32\Debug" /libpath:"..\ext\mysql\libmysql\Debug_TS" /libpath:"Debug_TS" /libpath:"..\..\zlib\Debug" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ZendTS.lib TSRM.lib resolv.lib libmysql.lib zlib.lib Urlmon.lib /nologo /version:4.0 /dll /debug /machine:I386 /nodefaultlib:"libcmt" /out:"..\Debug_TS\php4ts_debug.dll" /pdbtype:sept /libpath:"..\TSRM\Debug_TS" /libpath:"..\Zend\Debug_TS" /libpath:"..\..\bindlib_w32\Debug" /libpath:"..\ext\mysql\libmysql\Debug_TS" /libpath:"Debug_TS" /libpath:"..\..\zlib\Debug" /libpath:"..\..\win32build\lib" !ELSEIF "$(CFG)" == "php4dllts - Win32 Release_TS" @@ -81,7 +81,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ZendTS.lib TSRM.lib resolv.lib libmysql.lib zlib.lib Urlmon.lib /nologo /version:4.0 /dll /machine:I386 /nodefaultlib:"libcmt" /out:"..\Release_TS\php4ts.dll" /libpath:"..\TSRM\Release_TS" /libpath:"..\Zend\Release_TS" /libpath:"..\..\bindlib_w32\Release" /libpath:"..\ext\mysql\libmysql\Release_TS" /libpath:"Release_TS" /libpath:"..\..\zlib\Release" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib wsock32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ZendTS.lib TSRM.lib resolv.lib libmysql.lib zlib.lib Urlmon.lib /nologo /version:4.0 /dll /machine:I386 /nodefaultlib:"libcmt" /out:"..\Release_TS\php4ts.dll" /libpath:"..\TSRM\Release_TS" /libpath:"..\Zend\Release_TS" /libpath:"..\..\bindlib_w32\Release" /libpath:"..\ext\mysql\libmysql\Release_TS" /libpath:"Release_TS" /libpath:"..\..\zlib\Release" /libpath:"..\..\win32build\lib" !ELSEIF "$(CFG)" == "php4dllts - Win32 Release_TS_inline" ------=_Part_3777_14054482.1129995920006--