Page 1 of 2

[56K]anyone compile PHP 5.1.4 on windows xp?

Posted: Fri Oct 20, 2006 12:51 pm
by MrPotatoes
let me preface this by saying i'm not sure where this would belong so i'll just put it here

not the 64 bit.

i've gotten everything ready and i can't seem to compile the actual PHP now. i'm having some problems and this is really annoying. i just want tostart diving into the code and not the configurations.

the last thing i'm on is building PHP5. in the PHP src directory there is a folder called win32 with a bunch of .dsw files. i double click the php5.dsw and it get errors abound. i double click the php5ts.dsw (thread safe) and i don't get any errors but as far as i can tell it doesn't build squat and when i do try to build it goes for ever not doing anything. my big projects never took this long to compile. but maybe i should wait

either way i want to compile this and start messing with it. have any of you people done this so you can help me out some?

i'm on windows XP home
MS Visual C++ express
MS Platform SDK
i have most enviroment variables setup. i might be missing some but i wouldn't know which :(

i wanted to compile this so later i can do this on Code::Blocks

thank you if you know anything about this

Posted: Fri Oct 20, 2006 12:55 pm
by feyd
i wanted to compile this so later i can do this on Code::Blocks
Do what, namespaces?

Posted: Fri Oct 20, 2006 12:57 pm
by MrPotatoes
add/delete/recode stuff in PHP for personal use.

i initially wanted to rewrite some of PHP for fun. see what i can make it do or not do. mostly to see if i can change it so that i can make PHP load extensions where i want.

it's not going to go well if i can't get this badboy to compile tho :(

Posted: Fri Oct 20, 2006 1:05 pm
by feyd
You could always go through the command line compiler(s) that are available (and come with Visual Studio.)

Posted: Fri Oct 20, 2006 1:09 pm
by MrPotatoes
i did/have but i can't get things to work efficently. i'm windows pampered and "know" cmd line but varing. if it's not spelled out for me (for that) then i'm gonna be screwed. and that sucks

i've done the cmd nmake but then i don't get any further than that *hmph*

if there was just a better more indepth tutorial i'd be someone's friend forever. or at least a week

Posted: Fri Oct 20, 2006 1:27 pm
by alex.barylski
Well...for starters it would really help if you listed some of the errors you are getting...

Secondly, Visual Studio express does actually have some missing libraries...which I found out the hardway while trying to build Apache...I can't remember exactly what *lib files were missing but they were critical.

timvw compiled it fine (I believe it was him) using Visual Studio, but I was using Express and did some research and discovered the missing libraries (despite what Microsoft tells you).

So, what errors are you getting?

Posted: Fri Oct 20, 2006 1:39 pm
by timvw
Compiling with VC6 is easy ;) (If your read the howto and get the appropriate libraries).
Compiling with later editions was a serious pita last time i tried (i gave up :p)

(what i did get to compile with vs2005 was apache: http://www.timvw.be/building-apache-win ... udio-2005/)

Posted: Fri Oct 20, 2006 1:41 pm
by MrPotatoes
gimmie a sec. i will edit this post and put up pictures of what i get.

i'll be really detailed and i might try this at home where i have a full version of VS.NET (2003) if i'm not mistaken. otherwise, phewy

Posted: Fri Oct 20, 2006 1:43 pm
by alex.barylski
Try it with a full version, following the instructions exactly...as I am sure Express would be a serious PITA...

Posted: Fri Oct 20, 2006 1:46 pm
by MrPotatoes
yea, the problem is that i don't know if i have it or not still. i had it for an older job that i was doing under the table and now i think i might have lost it. which is super sucky because that is a sweet ass program and it's an expensive ass program.

*edit*

also, do i need to compile apache to compile PHP and or use it? can i just use my current instalation of Apache? i'd rather do that honestly

Posted: Fri Oct 20, 2006 2:13 pm
by MrPotatoes
i've done everything here
http://www.php.net/manual/en/install.wi ... ilding.php

up until
Building PHP using the new build system [PHP >=5 only]
now. i've built everything and i've gotten alot of it to work. and it's sexy. i've built that damned resolv.lib that took me a day to figure out lol. i've installed the Product SDK from microsoft and that thing is 1GB in size. that got quite a few errors out of the way in order to make that stupid lib.

my folder looks exactly like this on my C: Drive in XP:Home:

Code: Select all

+--C:\work
	+--bindlib_w32
	+--php-5.x.x
	|  +--win32
	+--win32build
so i go into php-5.x.x -> and open up php5.dsw. or rather i double click on it. it asks me to convert TSRM.dsp file. it's a project file of some sort i think. TSRM is where that MACRO is that defines your PHP Functions (PHP_FUNCION(args)). same for zend.dsp and php5.dsp and php5dll.dsp

then i get the TSRM error
Image

and then i get a corrupt project file error (TSRM i assume)
Image

it asks me if i want to remove projects from file and i say no just so you can see what i have next:
Image


alright. that is where i get stuck with VSC++

i also don't know the command line for this either. in the link i gave above i can build from cmd line but i have no idea how to do that or where to start. so i opted to try visual studio c++. *arg* i'm tearing my hair out :(
now, this is trying to get teh php5.dsw to load and work. the php5_ts.dws loads but takes F-O-R-E-V-E-R to compile. longer than it ever should IMO

------------------
ok, i'm compiling one thing at a time instead of all
remember, these are all for php5ts.dsw. i want to use php5 but i don't understand why i can't. ANYWAYS, onto the errors

[error] fatal error C1083: Cannot open include file: 'httpd.h': No such file or directory c:\work\php-5.1.6\sapi\apache\php_apache_http.h
[error] error BK1506 : cannot open file '.\debug_ts\php_apache.sbr': No such file or directory BSCMAKE
[error] fatal error C1083: Cannot open include file: 'apr_strings.h': No such file or directory c:\work\php-5.1.6\sapi\apache2handler\php_functions.c
[error] fatal error C1083: Cannot open include file: 'timelib_config.h': No such file or directory c:\work\php-5.1.6\ext\date\lib\timelib_structs.h
[error] fatal error C1083: Cannot open include file: 'libxml/parser.h': No such file or directory c:\work\php-5.1.6\ext\dom\php_dom.h 33
[error] fatal error C1083: Cannot open include file: 'PiAPI.h': No such file or directory c:\work\php-5.1.6\sapi\pi3web\pi3web_sapi.c 39
[error] BK1506 : cannot open file '.\debug_ts\pi3web_sapi.sbr': No such file or directory BSCMAKE

cannot allocate an aray of constant size. *arg* why me?

Posted: Fri Oct 20, 2006 2:35 pm
by volka
Take a look at README.WIN32-BUILD-SYSTEM in the source archive. It explains the new build system that is (more or less) similar to the unix versions.

Posted: Fri Oct 20, 2006 2:44 pm
by MrPotatoes
NMAKE: fatal error (some #): MAKEFILE not found and not target specified
stop.

that's what i get. personally, i'd rather do this with an IDE because that's how i plan to actually recode some of this stuff

Posted: Fri Oct 20, 2006 4:09 pm
by volka
MrPotatoes wrote:NMAKE: fatal error (some #): MAKEFILE not found and not target specified
stop.

that's what i get.
When you did what?

Posted: Fri Oct 20, 2006 4:16 pm
by MrPotatoes
when i type in nmake i get that right after