[Mapserver-users] Compiling problems ms 4.2+PHP5

Merlos merlos at tsc.uvigo.es
Fri May 28 23:01:14 EDT 2004


Hello,

I'm trying to compile mapserver 4.2 and php5-RC2, has anybody succeed to 
compile it with php5 or do I have to use PHP 4.3.x? I am doing something 
wrong? Any advice?

This are my cofigure  options:
./configure --with-proj --with-ogr  --with-gdal --with-postgis  --with-wfs 
--with-wmsclient  --with-httpd=/usr/sbin/apache  
--with-php=/usr/local/include/php --with-tiff

and when I run make I got this message:

gcc -fPIC -O2  -Wall -DCOMPILE_DL=1 -DPHP4 -DUSE_WMS_LYR  -DUSE_WFS_SVR 
-DUSE_WMS_SVR    -DUSE_POSTGIS -DUSE_TIFF -DUSE_GDAL -DUSE_OGR    -DUSE_PROJ 
-DUSE_PROJ_API_H -DUSE_EPPL -DUSE_PDF  -DUSE_GD_PNG -DUSE_GD_JPEG 
-DUSE_GD_WBMP -DUSE_GD_FT  
-I/home/merlos/public_html/pub/geotools/mapserver/mapserver-4.2.0 
-I/usr/local/include    -I/usr/local/pgsql/include  -I/usr/local/include     
-I/usr/local/include  -I/usr/local/include/php -I/usr/local/include/php/dl 
-I/usr/local/include/php/main -I/usr/local/include/php/Zend 
-I/usr/local/include/php/include -I/usr/local/include/php/TSRM  -c -o 
php_mapscript_util.o php_mapscript_util.c
php_mapscript_util.c: In function `_phpms_fetch_handle2':
php_mapscript_util.c:148: error: structure has no member named `properties'
php_mapscript_util.c:150: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
php_mapscript_util.c: In function `_phpms_fetch_property_handle2':
php_mapscript_util.c:200: error: structure has no member named `properties'
php_mapscript_util.c:202: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
php_mapscript_util.c: In function `_phpms_fetch_property_string':
php_mapscript_util.c:247: error: structure has no member named `properties'
php_mapscript_util.c:249: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
php_mapscript_util.c: In function `_phpms_fetch_property_long':
php_mapscript_util.c:273: error: structure has no member named `properties'
php_mapscript_util.c:275: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
php_mapscript_util.c: In function `_phpms_fetch_property_double':
php_mapscript_util.c:306: error: structure has no member named `properties'
php_mapscript_util.c:308: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
php_mapscript_util.c: In function `_phpms_fetch_property_resource':
php_mapscript_util.c:332: error: structure has no member named `properties'
php_mapscript_util.c:334: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
php_mapscript_util.c: In function `_phpms_set_property_string':
php_mapscript_util.c:368: error: structure has no member named `properties'
php_mapscript_util.c:370: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
php_mapscript_util.c: In function `_phpms_set_property_null':
php_mapscript_util.c:396: error: structure has no member named `properties'
php_mapscript_util.c:398: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
php_mapscript_util.c: In function `_phpms_set_property_long':
php_mapscript_util.c:425: error: structure has no member named `properties'
php_mapscript_util.c:427: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
php_mapscript_util.c: In function `_phpms_set_property_double':
php_mapscript_util.c:454: error: structure has no member named `properties'
php_mapscript_util.c:456: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
php_mapscript_util.c: In function `_php_extract_associative_array':
php_mapscript_util.c:542: warning: dereferencing type-punned pointer will 
break strict-aliasing rules
make: *** [php_mapscript_util.o] Error 1







I found another problem. If I try to compile with --with-postgis and 
--with-mygis I got another error message. It seems that there are repeated 
functions, is it possible to compile allowing both data sources?

gcc -O2  -Wall -DIGNORE_MISSING_DATA  -DUSE_EPPL -DUSE_PROJ -DUSE_PROJ_API_H 
-DUSE_WMS_SVR -DUSE_WMS_LYR -DUSE_WFS_SVR    -DUSE_TIFF  -DUSE_GD_PNG 
-DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DUSE_PDF  -DUSE_OGR -DUSE_GDAL 
-DUSE_POSTGIS -DUSE_MYGIS   -I/usr/local/include         -I/usr/local/include 
-I/usr/local/pgsql/include -I/usr/include/mysql -I/usr/local/include   
shp2img.o  -L. -lmap -lgd -L/usr/local/lib -lgd -ljpeg -lfreetype -lpng -lz   
-lpdf -ltiff -ljpeg -lfreetype -lpng -lz   -lproj -ljpeg  -L/usr/local/lib 
-lgdal  -L/usr/local/pgsql/lib -lpq -L/usr/lib -lmysqlclient -lz -lcrypt 
-lnsl -lm -L/usr/lib -lssl -lcrypto -lmysqlclient -L/usr/local/lib -lcurl 
-lssl -lcrypto -ldl -lz    -lm -lstdc++  -o shp2img
./libmap.a(mapmygis.o)(.text+0x0): In function `DATAERRORMESSAGE':
: multiple definition of `DATAERRORMESSAGE'
./libmap.a(mappostgis.o)(.text+0x1c0): first defined here
/usr/bin/ld: Warning: size of symbol `DATAERRORMESSAGE' changed from 219 in 
./libmap.a(mappostgis.o) to 480 in ./libmap.a(mappostgis.o)
./libmap.a(mapmygis.o)(.text+0x9c0): In function `prep_DB':
: multiple definition of `prep_DB'
./libmap.a(mappostgis.o)(.text+0x510): first defined here
/usr/bin/ld: Warning: size of symbol `prep_DB' changed from 1623 in 
./libmap.a(mappostgis.o) to 1396 in ./libmap.a(mappostgis.o)
./libmap.a(mapmygis.o)(.text+0x1130): In function `force_to_points':
: multiple definition of `force_to_points'
./libmap.a(mappostgis.o)(.text+0xee0): first defined here
/usr/bin/ld: Warning: size of symbol `force_to_points' changed from 573 in 
./libmap.a(mappostgis.o) to 654 in ./libmap.a(mappostgis.o)
./libmap.a(mapmygis.o)(.text+0x13c0): In function `force_to_lines':
: multiple definition of `force_to_lines'
./libmap.a(mappostgis.o)(.text+0x1120): first defined here
/usr/bin/ld: Warning: size of symbol `force_to_lines' changed from 450 in 
./libmap.a(mappostgis.o) to 536 in ./libmap.a(mappostgis.o)
./libmap.a(mapmygis.o)(.text+0x15e0): In function `force_to_polygons':
: multiple definition of `force_to_polygons'
./libmap.a(mappostgis.o)(.text+0x12f0): first defined here
/usr/bin/ld: Warning: size of symbol `force_to_polygons' changed from 276 in 
./libmap.a(mappostgis.o) to 488 in ./libmap.a(mappostgis.o)
./libmap.a(mapmygis.o)(.text+0x17d0): In function `dont_force':
: multiple definition of `dont_force'
./libmap.a(mappostgis.o)(.text+0x1410): first defined here
/usr/bin/ld: Warning: size of symbol `dont_force' changed from 151 in 
./libmap.a(mappostgis.o) to 250 in ./libmap.a(mappostgis.o)
./libmap.a(mapmygis.o)(.text+0x2190): In function `find_bounds':
: multiple definition of `find_bounds'
./libmap.a(mappostgis.o)(.text+0x14b0): first defined here
collect2: ld returned 1 exit status
make: *** [shp2img] Error 1







Finally, When I try to compile with ming (I've installed latest release ming 
0.3beta1), when running configure I got this message:

checking if MING/Flash support requested... yes, user supplied MING directory
./configure: line 8175: -lming: command not found

And then when running make:

gcc -c -O2  -Wall -DIGNORE_MISSING_DATA  -DUSE_EPPL -DUSE_PROJ 
-DUSE_PROJ_API_H -DUSE_WMS_SVR -DUSE_WMS_LYR -DUSE_WFS_SVR  -DUSE_MING_FLASH  
-DUSE_TIFF  -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DUSE_PDF  
-DUSE_OGR -DUSE_GDAL -DUSE_POSTGIS -DUSE_MYGIS   -I/usr/local/include         
-I/usr/local/include -I/usr/local/pgsql/include -I/usr/include/mysql 
-I/usr/local/include -I/usr/local  mapswf.c -o mapswf.o
mapswf.c: In function `BuildButtonFromGD':
mapswf.c:444: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c: In function `BuildEllipseButton':
mapswf.c:529: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c:534: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c: In function `BuildButtonPolygon':
mapswf.c:720: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c:727: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c:731: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c: In function `BuildButtonLine':
mapswf.c:782: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c:788: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c: In function `msImageStartLayerSWF':
mapswf.c:976: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:980: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:986: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:991: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c: In function `msDrawStartShapeSWF':
mapswf.c:1062: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:1070: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c: In function `msDrawMarkerSymbolSWF':
mapswf.c:1274: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:1293: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:1320: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:1358: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:1372: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:1411: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:1434: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c: In function `DrawButtonFilledPolygon':
mapswf.c:1508: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c:1514: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c:1517: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c: In function `DrawButtonPolyline':
mapswf.c:1542: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c:1547: warning: passing arg 2 of `SWFButton_addShape' from 
incompatible pointer type
mapswf.c: In function `msDrawLineSymbolSWF':
mapswf.c:1690: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:1697: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c: In function `msDrawShadeSymbolSWF':
mapswf.c:1815: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:1822: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:1859: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:1866: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c: In function `draw_textSWF':
mapswf.c:1984: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c: In function `msDrawLabelCacheSWF':
mapswf.c:2141: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c: In function `msDrawWMSLayerSWF':
mapswf.c:2534: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c: In function `msDrawRasterLayerSWF':
mapswf.c:2588: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c: In function `msSaveImageSWF':
mapswf.c:2626: error: too few arguments to function `SWFMovie_save'
mapswf.c:2644: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:2648: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:2652: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:2657: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:2665: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:2670: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:2675: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:2682: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:2760: error: too few arguments to function `SWFMovie_save'
mapswf.c:2772: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
mapswf.c:2779: error: too few arguments to function `SWFMovie_save'
mapswf.c: In function `msDrawVectorLayerAsRasterSWF':
mapswf.c:2898: warning: passing arg 2 of `SWFMovie_add' from incompatible 
pointer type
make: *** [mapswf.o] Error 1


If anyone can help me...

Thank you in advance!


Regards. Juan.

--
http://www.merlos.biz



More information about the mapserver-users mailing list