Opened 13 years ago

Closed 13 years ago

#3926 closed defect (fixed)

MapServer 6.0 with mapscript does not compile

Reported by: slemke Owned by: aboudreault
Priority: normal Milestone:
Component: MapScript-PHP Version: 6.0
Severity: blocker Keywords:
Cc:

Description

Hi !

System: CentOS 5.6
PHP 5.2 from testing repos, 5.3 also tested
MapServer 6.0, trunk and branch-6-0 also tested

cd mapscript/php; make; cd ../..
make[1]: Entering directory `/usr/src/mapserver-6.0.0/mapscript/php'
gcc -fPIC -O2 -fPIC -Wall  -DNDEBUG  -DUSE_PHP_REGEX -DCOMPILE_DL=1  -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE  -I/usr/src/mapserver-6.0.0              -Irenderers/agg/include   -I/usr/include   -I/usr/include/freetype2  -I/usr/include/php -I/usr/include/php/dl -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/include -I/usr/include/php/TSRM  -I/usr/include/php -c -o php_mapscript_util.o php_mapscript_util.c
php_mapscript_util.c: In function âmapscript_extract_associative_arrayâ:
php_mapscript_util.c:79: warning: dereferencing type-punned pointer will break strict-aliasing rules
php_mapscript_util.c: In function âmapscript_fetch_objectâ:
php_mapscript_util.c:159: warning: implicit declaration of function âzval_set_isref_pâ
gcc -fPIC -O2 -fPIC -Wall  -DNDEBUG  -DUSE_PHP_REGEX -DCOMPILE_DL=1  -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE  -I/usr/src/mapserver-6.0.0              -Irenderers/agg/include   -I/usr/include   -I/usr/include/freetype2  -I/usr/include/php -I/usr/include/php/dl -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/include -I/usr/include/php/TSRM  -I/usr/include/php -c -o mapscript_error.o mapscript_error.c
gcc -fPIC -O2 -fPIC -Wall  -DNDEBUG  -DUSE_PHP_REGEX -DCOMPILE_DL=1  -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE  -I/usr/src/mapserver-6.0.0              -Irenderers/agg/include   -I/usr/include   -I/usr/include/freetype2  -I/usr/include/php -I/usr/include/php/dl -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/include -I/usr/include/php/TSRM  -I/usr/include/php -c -o color.o color.c
color.c: In function âzim_colorObj___getâ:
color.c:66: error: âTRUEâ undeclared (first use in this function)
color.c:66: error: (Each undeclared identifier is reported only once
color.c:66: error: for each function it appears in.)
color.c: In function âzim_colorObj___setâ:
color.c:93: error: âTRUEâ undeclared (first use in this function)
color.c: In function âzim_colorObj_setRGBâ:
color.c:121: error: âTRUEâ undeclared (first use in this function)
make[1]: *** [color.o] Error 1
make[1]: Leaving directory `/usr/src/mapserver-6.0.0/mapscript/php'

Thanks, Sebastian

Change History (6)

comment:1 by soloincc, 13 years ago

Severity: normalblocker

Hi,

Problem still persists with MapServer 6.0.1, PHP 5.3.6, CentOS

make[1]: Entering directory `/home/ec2-user/src/mapserver-6.0.1/mapscript/php' gcc -fPIC -O2 -fPIC -Wall -DNDEBUG -DUSE_PHP_REGEX -DCOMPILE_DL=1 -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -I/home/ec2-user/src/mapserver-6.0.1 -Irenderers/agg/include -Irenderers/agg/include -I/usr/include -I/usr/include/freetype2 -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6 -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/dl -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/main -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/Zend -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/include -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/TSRM -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/ext/ereg/ -c -o php_mapscript_util.o php_mapscript_util.c gcc -fPIC -O2 -fPIC -Wall -DNDEBUG -DUSE_PHP_REGEX -DCOMPILE_DL=1 -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -I/home/ec2-user/src/mapserver-6.0.1 -Irenderers/agg/include -Irenderers/agg/include -I/usr/include -I/usr/include/freetype2 -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6 -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/dl -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/main -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/Zend -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/include -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/TSRM -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/ext/ereg/ -c -o mapscript_error.o mapscript_error.c gcc -fPIC -O2 -fPIC -Wall -DNDEBUG -DUSE_PHP_REGEX -DCOMPILE_DL=1 -DUSE_AGG_SVG_SYMBOLS -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE -I/home/ec2-user/src/mapserver-6.0.1 -Irenderers/agg/include -Irenderers/agg/include -I/usr/include -I/usr/include/freetype2 -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6 -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/dl -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/main -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/Zend -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/include -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/TSRM -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/ext/ereg/ -c -o color.o color.c color.c: In function ‘zim_colorObj_get’: color.c:66: error: ‘TRUE’ undeclared (first use in this function) color.c:66: error: (Each undeclared identifier is reported only once color.c:66: error: for each function it appears in.) color.c: In function ‘zim_colorObj_set’: color.c:93: error: ‘TRUE’ undeclared (first use in this function) color.c: In function ‘zim_colorObj_setRGB’: color.c:121: error: ‘TRUE’ undeclared (first use in this function) make[1]: * [color.o] Error 1 make[1]: Leaving directory `/home/ec2-user/src/mapserver-6.0.1/mapscript/php'

comment:2 by soloincc, 13 years ago

Sorry, forgot the correct formatting for the code block

cd mapscript/php; make; cd ../..
make[1]: Entering directory `/home/ec2-user/src/mapserver-6.0.1/mapscript/php'
gcc -fPIC -O2 -fPIC -Wall  -DNDEBUG  -DUSE_PHP_REGEX -DCOMPILE_DL=1  -DUSE_AGG_SVG_SYMBOLS    -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE  -I/home/ec2-user/src/mapserver-6.0.1              -Irenderers/agg/include  -Irenderers/agg/include   -I/usr/include   -I/usr/include/freetype2  -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6 -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/dl -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/main -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/Zend -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/include -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/TSRM  -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/ext/ereg/ -c -o php_mapscript_util.o php_mapscript_util.c
gcc -fPIC -O2 -fPIC -Wall  -DNDEBUG  -DUSE_PHP_REGEX -DCOMPILE_DL=1  -DUSE_AGG_SVG_SYMBOLS    -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE  -I/home/ec2-user/src/mapserver-6.0.1              -Irenderers/agg/include  -Irenderers/agg/include   -I/usr/include   -I/usr/include/freetype2  -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6 -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/dl -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/main -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/Zend -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/include -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/TSRM  -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/ext/ereg/ -c -o mapscript_error.o mapscript_error.c
gcc -fPIC -O2 -fPIC -Wall  -DNDEBUG  -DUSE_PHP_REGEX -DCOMPILE_DL=1  -DUSE_AGG_SVG_SYMBOLS    -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DGD_HAS_GET_TRUE_COLOR_PIXEL -DUSE_ICONV -DUSE_GIF -DUSE_PNG -DUSE_ZLIB -DUSE_FREETYPE  -I/home/ec2-user/src/mapserver-6.0.1              -Irenderers/agg/include  -Irenderers/agg/include   -I/usr/include   -I/usr/include/freetype2  -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6 -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/dl -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/main -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/Zend -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/include -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/TSRM  -I/home/ec2-user/src/mapserver-6.0.1/../php-5.3.6/ext/ereg/ -c -o color.o color.c
color.c: In function ‘zim_colorObj___get’:
color.c:66: error: ‘TRUE’ undeclared (first use in this function)
color.c:66: error: (Each undeclared identifier is reported only once
color.c:66: error: for each function it appears in.)
color.c: In function ‘zim_colorObj___set’:
color.c:93: error: ‘TRUE’ undeclared (first use in this function)
color.c: In function ‘zim_colorObj_setRGB’:
color.c:121: error: ‘TRUE’ undeclared (first use in this function)
make[1]: *** [color.o] Error 1
make[1]: Leaving directory `/home/ec2-user/src/mapserver-6.0.1/mapscript/php'

comment:3 by aboudreault, 13 years ago

soloincc, could you try a quick fix: replace the TRUE macro by MS_TRUE in color.c. If you confirm it fixes the issue, I going to commit and backport in 6.0 branch.

comment:4 by soloincc, 13 years ago

Resolution: fixed
Status: newclosed

ok, kind of fixed it. Add

#ifndef TRUE
#define TRUE 1
#endif

to mapscript/php/php_mapscript.h

comment:5 by aboudreault, 13 years ago

Resolution: fixed
Status: closedreopened

We will let the ticket open until I fix the issue in trunk.

comment:6 by aboudreault, 13 years ago

Resolution: fixed
Status: reopenedclosed

Fixed and committed in trunk (r12114) and backported in branch 6.0 (r12115).

Note: See TracTickets for help on using tickets.