[Mapserver-dev] Testing thread-safety

Jean-Francois.Doyon at CCRS.NRCan.gc.ca Jean-Francois.Doyon at CCRS.NRCan.gc.ca
Tue Dec 16 15:16:23 EST 2003


G'Day,

Daniel mentionned to me that thread safty should be fairly complete, though
untested, in CVS.

So, I'm trying to compile MapServer CVS with PHP 4.3.3, with all of them as
modules.

Not having much luck though!

First MapServer seems to mis-detect the regex setting on my PHP, even though
it's compiled with --with-regex=system, I get ugly errors (See at the end of
this message).  Apparently "configure" tests for the existence of "define
REGEX 1" ... The funny thing is that this is true whether I compile PHP with
"system" or "php" regex's !! The only way for this NOT to be true so far is
to use the "apache" regex setting ... Which I didn't do.

For now I've hacked the configure script to pretend like the test works,
even when it doesn't :)

Any ideas on what's going on here ? Is the PHP regex implementation
sensitive to whether it's a module or not maybe ? Could I use "apache" for
now, if only just for testing ?

I haven't gotten there yet, but I've also obviously hacked the test for apxs
to by-pass that.  I've built mapserver with --with-threads also.  Will this
be enough ?

Any insight would be much appreciated :)

Here's the regex related error when using --with-regex=system and bypassing
the test in configure:

...
gcc -fPIC -O2  -Wall -DCOMPILE_DL=1 -DPHP4 -DUSE_WMS_LYR   -DUSE_WMS_SVR
-DUSE_GDAL -DUSE_OGR   -DUSE_THREAD -DUSE_PROJ -DUSE_PROJ_API_H -DUSE_EPPL
-DUSE_TIFF   -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP
-DUSE_GD_FT -DGD_HAS_GDIMAGEGIFPTR -DUSE_JPEG  -I/usr/src/mapserver
-I/usr/local/include     -I/usr/local/include -I/usr/local/include
-I/usr/local/include   -I/usr/src/mapserver/../php-4.3.3/
-I/usr/src/mapserver/../php-4.3.3//dl
-I/usr/src/mapserver/../php-4.3.3//main
-I/usr/src/mapserver/../php-4.3.3//Zend
-I/usr/src/mapserver/../php-4.3.3//include
-I/usr/src/mapserver/../php-4.3.3//TSRM  -c -o php_mapscript.o
php_mapscript.c
In file included from /usr/src/mapserver/../php-4.3.3/main/php_regex.h:13,
                 from /usr/src/mapserver/../php-4.3.3/main/php.h:74,
                 from php_mapscript_util.h:58,
                 from php_mapscript.c:218:
/usr/src/mapserver/../php-4.3.3/regex/regex.h:33: warning: `REG_EXTENDED'
redefined
/usr/include/regex.h:257: warning: this is the location of the previous
definition
/usr/src/mapserver/../php-4.3.3/regex/regex.h:34: warning: `REG_ICASE'
redefined
/usr/include/regex.h:261: warning: this is the location of the previous
definition
/usr/src/mapserver/../php-4.3.3/regex/regex.h:35: warning: `REG_NOSUB'
redefined
/usr/include/regex.h:270: warning: this is the location of the previous
definition
/usr/src/mapserver/../php-4.3.3/regex/regex.h:36: warning: `REG_NEWLINE'
redefined
/usr/include/regex.h:266: warning: this is the location of the previous
definition
/usr/src/mapserver/../php-4.3.3/regex/regex.h:67: warning: `REG_NOTBOL'
redefined
/usr/include/regex.h:280: warning: this is the location of the previous
definition
/usr/src/mapserver/../php-4.3.3/regex/regex.h:68: warning: `REG_NOTEOL'
redefined
/usr/include/regex.h:283: warning: this is the location of the previous
definition
In file included from /usr/src/mapserver/../php-4.3.3/main/php_regex.h:13,
                 from /usr/src/mapserver/../php-4.3.3/main/php.h:74,
                 from php_mapscript_util.h:58,
                 from php_mapscript.c:218:
/usr/src/mapserver/../php-4.3.3/regex/regex.h:17: conflicting types for
`regoff_t'
/usr/include/regex.h:399: previous declaration of `regoff_t'
/usr/src/mapserver/../php-4.3.3/regex/regex.h:23: conflicting types for
`regex_t'
/usr/include/regex.h:396: previous declaration of `regex_t'
/usr/src/mapserver/../php-4.3.3/regex/regex.h:27: conflicting types for
`regmatch_t'
/usr/include/regex.h:427: previous declaration of `regmatch_t'
make[1]: *** [php_mapscript.o] Error 1
make[1]: Leaving directory `/usr/src/mapserver/mapscript/php3'

Thanks,

Jean-François Doyon
Internet Service Development and Systems Support / Développement des
services et soutien de systèmes Internet
GeoAccess Division / Division GéoAccès
Canada Center for Remote Sensing / Centre canadien de télédétection
Natural Resources Canada / Ressources naturelles Canada
http://atlas.gc.ca
Phone: (613) 992-4902
Fax: (613) 947-2410




More information about the mapserver-dev mailing list