MapServer / MapServer

Source code of the MapServer project. Please submit pull requests to the 'main' branch.
https://mapserver.org
Other
1.02k stars 371 forks source link

MapServer 6.0 with mapscript does not compile #3926

Closed mapserver-bot closed 12 years ago

mapserver-bot commented 12 years ago

Reporter: slemke Date: 2011/06/21 - 20:22 Trac URL: http://trac.osgeo.org/mapserver/ticket/3926 Hi !

System: CentOS 5.6[[BR]] PHP 5.2 from testing repos, 5.3 also tested[[BR]] 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

mapserver-bot commented 12 years ago

Author: soloincc Date: 2011/08/25 - 02:36 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'

mapserver-bot commented 12 years ago

Author: soloincc Date: 2011/08/25 - 02:39 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'
mapserver-bot commented 12 years ago

Author: aboudreault Date: 2011/08/25 - 03:38 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.

mapserver-bot commented 12 years ago

Author: soloincc Date: 2011/08/25 - 04:12 ok, kind of fixed it. Add

#ifndef TRUE
#define TRUE 1
#endif

to mapscript/php/php_mapscript.h

mapserver-bot commented 12 years ago

Author: aboudreault Date: 2011/08/25 - 13:46 We will let the ticket open until I fix the issue in trunk.

mapserver-bot commented 12 years ago

Author: aboudreault Date: 2011/08/25 - 16:37 Fixed and committed in trunk (436d6a0500bc6bde3f26f32849689bd7b69a7069 (r12114)) and backported in branch 6.0 (5960eb14f7eeb3e193dd2368f44087a1f08a820f (r12115)).