Problems building PHP MapScript on WIN32

Bob Bruce covariance at SHAW.CA
Sat Jan 29 22:34:02 EST 2005


I am attempting to build MapScript and am getting some compilation errors
when the make is compiling php_mapscript.c. These are the errors that are
being displayed:

        cl /nologo /Zi /W3 /DEBUG /Fdphpms.pdb -DWIN32 -D_WIN32 /DZEND_WIN32
/DPHP_WIN32 /DPHP4 /DZT
S -IC:/Downloads/MapServer/gdwin32
-IC:\Downloads\MapServer\proj-4.4.8/src -Ic:\regex-0.12
        -DHAVE_STRING_H -DREGEX_MALLOC -DNEED_STRCASECMP -DNEED_STRNCASECMP
-DNEED_STRLCAT   -DWIN32
 -D_WIN32   -DUSE_PROJ -DUSE_PROJ_API_H   -DUSE_GD_PNG -DUSE_GD_JPEG
-DUSE_GD_WBMP -DUSE_GD_GIF -DGD
_HAS_GDIMAGEGIFPTR -DUSE_GD_FT -DGD_HAS_GETBITMAPFONT  -DUSE_WMS_SVR
-DIGNORE_MISSING_DATA  -DENA
BLE_STDERR_DEBUG           -DUSE_GD_ANTIALIAS     -I../..
-IC:\Downloads\PHP\php-4.3.7 -IC:\Download
s\PHP\php-4.3.7/main -IC:\Downloads\PHP\php-4.3.7/zend
-IC:\Downloads\PHP\php-4.3.7/include -IC:\Dow
nloads\PHP\php-4.3.7/tsrm /DCOMPILE_DL=1 /c php_mapscript.c /Fophp_mapscript.obj
php_mapscript.c
C:\Downloads\PHP\php-4.3.7\regex/regex.h(17) : warning C4142: benign
redefinition of type
C:\Downloads\PHP\php-4.3.7\regex/regex.h(23) : error C2371: 'regex_t' :
redefinition; different basi
c types
        c:\regex-0.12\regex.h(346) : see declaration of 'regex_t'
C:\Downloads\PHP\php-4.3.7\regex/regex.h(27) : error C2371: 'regmatch_t' :
redefinition; different b
asic types
        c:\regex-0.12\regex.h(382) : see declaration of 'regmatch_t'
C:\Downloads\PHP\php-4.3.7\regex/regex.h(31) : error C2373: 'regcomp' :
redefinition; different type
 modifiers
        c:\regex-0.12\regex.h(473) : see declaration of 'regcomp'
C:\Downloads\PHP\php-4.3.7\regex/regex.h(33) : warning C4005: 'REG_EXTENDED'
: macro redefinition
        c:\regex-0.12\regex.h(215) : see previous definition of 'REG_EXTENDED'
C:\Downloads\PHP\php-4.3.7\regex/regex.h(34) : warning C4005: 'REG_ICASE' :
macro redefinition
        c:\regex-0.12\regex.h(219) : see previous definition of 'REG_ICASE'
C:\Downloads\PHP\php-4.3.7\regex/regex.h(35) : warning C4005: 'REG_NOSUB' :
macro redefinition
        c:\regex-0.12\regex.h(228) : see previous definition of 'REG_NOSUB'
C:\Downloads\PHP\php-4.3.7\regex/regex.h(36) : warning C4005: 'REG_NEWLINE'
: macro redefinition
        c:\regex-0.12\regex.h(224) : see previous definition of 'REG_NEWLINE'
C:\Downloads\PHP\php-4.3.7\regex/regex.h(62) : error C2373: 'regerror' :
redefinition; different typ
e modifiers
        c:\regex-0.12\regex.h(477) : see declaration of 'regerror'
C:\Downloads\PHP\php-4.3.7\regex/regex.h(66) : error C2373: 'regexec' :
redefinition; different type
 modifiers
        c:\regex-0.12\regex.h(474) : see declaration of 'regexec'
C:\Downloads\PHP\php-4.3.7\regex/regex.h(67) : warning C4005: 'REG_NOTBOL' :
macro redefinition
        c:\regex-0.12\regex.h(238) : see previous definition of 'REG_NOTBOL'
C:\Downloads\PHP\php-4.3.7\regex/regex.h(68) : warning C4005: 'REG_NOTEOL' :
macro redefinition
        c:\regex-0.12\regex.h(241) : see previous definition of 'REG_NOTEOL'
C:\Downloads\PHP\php-4.3.7\regex/regex.h(76) : error C2373: 'regfree' :
redefinition; different type
 modifiers
        c:\regex-0.12\regex.h(480) : see declaration of 'regfree'
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.

It appears that there is a confict with the regex stuff in the PHP source
folder and the regex folder at the root of c:.
I have regex set up in the c:\regex-0.12 folder because I was also building
mapserv.exe .  The only place that I pointed to this folder is pointed to is
in the nmake.opt file in the main mapserver source folder.

Can someone tell me what I need to do to make this build work?

thanks,
        Bob Bruce



More information about the mapserver-users mailing list