[FGS] Starting apache error: httpd cannot execute binary file

Hao Zhang hao at zhang.nu
Fri Nov 6 08:20:32 EST 2009


Hi Norm,

Sure. The error messages when building MapSever 5.4.2 looks like: (sorry, it
is quite a lot)

cd mapscript/php3; make; cd ../..
make[1]: Entering directory
`/home/FGS/fgs-dev/src/mapserver-5.4.2/mapscript/php3'
gcc -fPIC -O2 -fPIC -Wall    -DCOMPILE_DL=1 -DPHP4
-DNEED_NONBLOCKING_STDERR     -DUSE_WMS_LYR -DUSE_WFS_LYR  -DUSE_LIBXML2
-DUSE_CURL -DUSE_WCS_SVR -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MING_FLASH
-DUSE_POSTGIS  -DUSE_GDAL -DUSE_OGR -DUSE_GEOS   -DUSE_PROJ -DUSE_EPPL
-DUSE_RGBA_PNG -DUSE_AGG   -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 -DUSE_ICONV -DUSE_ZLIB
-I/home/FGS/fgs-dev/src/mapserver-5.4.2
-I/home/FGS/fgs-dev/built/libxml2/include/libxml2
-I/home/FGS/fgs-dev/built/libiconv/include
-I/home/FGS/fgs-dev/built/curl/include
-I/home/FGS/fgs-dev/built/ming/include
-I/home/FGS/fgs-dev/built/postgresql/include
-I/home/FGS/fgs-dev/built/gdal/include
-I/home/FGS/fgs-dev/built/geos/include
-I/home/FGS/fgs-dev/built/proj/include
-I/home/FGS/fgs-dev/built/libpng/include
-I/home/FGS/fgs-dev/built/agg/include
-I/home/FGS/fgs-dev/built/freetype/include/freetype2
-I/home/FGS/fgs-dev/built/freetype/include
-I/home/FGS/fgs-dev/built/gd//include
-I/home/FGS/fgs-dev/built/libiconv//include
-I/home/FGS/fgs-dev/built/zlib/include
-I/home/FGS/fgs-dev/built/php/include/php/
-I/home/FGS/fgs-dev/built/php/include/php//dl
-I/home/FGS/fgs-dev/built/php/include/php//main
-I/home/FGS/fgs-dev/built/php/include/php//Zend
-I/home/FGS/fgs-dev/built/php/include/php//include
-I/home/FGS/fgs-dev/built/php/include/php//TSRM  -I -c -o
php_mapscript_util.o php_mapscript_util.c
/usr/lib/gcc/sparc-linux-gnu/4.3.2/../../../../lib/crt1.o: In function
`_start':
(.text+0x10): undefined reference to `main'
/usr/lib/gcc/sparc-linux-gnu/4.3.2/../../../../lib/crt1.o: In function
`_start':
(.text+0x1c): undefined reference to `main'
/tmp/cc5eP7aS.o: In function `_php_extract_associative_array':
php_mapscript_util.c:(.text+0x20): undefined reference to
`zend_hash_internal_pointer_reset_ex'
php_mapscript_util.c:(.text+0x6c): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0xdc): undefined reference to
`zend_hash_get_current_key_ex'
php_mapscript_util.c:(.text+0x118): undefined reference to
`zend_hash_move_forward_ex'
php_mapscript_util.c:(.text+0x128): undefined reference to
`zend_hash_get_current_data_ex'
php_mapscript_util.c:(.text+0x168): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0x1e4): undefined reference to
`_convert_to_string'
php_mapscript_util.c:(.text+0x1f4): undefined reference to
`_zval_copy_ctor_func'
php_mapscript_util.c:(.text+0x214): undefined reference to
`_zval_copy_ctor_func'
/tmp/cc5eP7aS.o: In function `_phpms_object_init':
php_mapscript_util.c:(.text+0x248): undefined reference to `_object_init_ex'
php_mapscript_util.c:(.text+0x264): undefined reference to
`add_property_resource_ex'
/tmp/cc5eP7aS.o: In function `_phpms_add_property_object':
php_mapscript_util.c:(.text+0x298): undefined reference to
`add_property_zval_ex'
php_mapscript_util.c:(.text+0x2dc): undefined reference to `zend_error'
/tmp/cc5eP7aS.o: In function `_phpms_fetch_property_resource':
php_mapscript_util.c:(.text+0x318): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x350): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x3b0): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x3d0): undefined reference to `zend_error'
/tmp/cc5eP7aS.o: In function `_phpms_fetch_property_string':
php_mapscript_util.c:(.text+0x408): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x44c): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x480): undefined reference to
`_convert_to_string'
php_mapscript_util.c:(.text+0x4c8): undefined reference to `zend_error'
/tmp/cc5eP7aS.o: In function `_phpms_set_property_double':
php_mapscript_util.c:(.text+0x524): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x56c): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0x5f8): undefined reference to `_zval_dtor_func'
php_mapscript_util.c:(.text+0x608): undefined reference to
`_zval_copy_ctor_func'
php_mapscript_util.c:(.text+0x624): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x650): undefined reference to `zend_error'
/tmp/cc5eP7aS.o: In function `_phpms_set_property_long':
php_mapscript_util.c:(.text+0x6a8): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x6f0): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0x778): undefined reference to `_zval_dtor_func'
php_mapscript_util.c:(.text+0x788): undefined reference to
`_zval_copy_ctor_func'
php_mapscript_util.c:(.text+0x7a4): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x7d0): undefined reference to `zend_error'
/tmp/cc5eP7aS.o: In function `_phpms_set_property_null':
php_mapscript_util.c:(.text+0x828): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x870): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0x8ec): undefined reference to `_zval_dtor_func'
php_mapscript_util.c:(.text+0x8fc): undefined reference to
`_zval_copy_ctor_func'
php_mapscript_util.c:(.text+0x918): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x944): undefined reference to `zend_error'
/tmp/cc5eP7aS.o: In function `_phpms_set_property_string':
php_mapscript_util.c:(.text+0x99c): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x9e4): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0xa70): undefined reference to `_estrndup'
php_mapscript_util.c:(.text+0xab4): undefined reference to `_zval_dtor_func'
php_mapscript_util.c:(.text+0xac4): undefined reference to
`_zval_copy_ctor_func'
php_mapscript_util.c:(.text+0xae0): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xb0c): undefined reference to `zend_error'
/tmp/cc5eP7aS.o: In function `_phpms_fetch_property_double':
php_mapscript_util.c:(.text+0xb44): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xb8c): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0xbc4): undefined reference to
`convert_to_double'
php_mapscript_util.c:(.text+0xbec): undefined reference to `zend_error'
/tmp/cc5eP7aS.o: In function `_phpms_fetch_property_long':
php_mapscript_util.c:(.text+0xc28): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xc60): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0xc88): undefined reference to `convert_to_long'
php_mapscript_util.c:(.text+0xcb4): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xce0): undefined reference to `zend_error'
/tmp/cc5eP7aS.o: In function `_phpms_fetch_property_handle2':
php_mapscript_util.c:(.text+0xd38): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0xd7c): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xd8c): undefined reference to `_zend_list_find'
php_mapscript_util.c:(.text+0xdd0): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xdfc): undefined reference to `zend_error'
/tmp/cc5eP7aS.o: In function `_phpms_fetch_handle2':
php_mapscript_util.c:(.text+0xe68): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0xe84): undefined reference to `_zend_list_find'
php_mapscript_util.c:(.text+0xeb8): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xed4): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xef0): undefined reference to `zend_error'
/tmp/cc5eP7aS.o: In function `_phpms_report_mapserver_error':
php_mapscript_util.c:(.text+0xf28): undefined reference to `msGetErrorObj'
php_mapscript_util.c:(.text+0xf70): undefined reference to `zend_error'
collect2: ld returned 1 exit status
make[1]: *** [php_mapscript_util.o] Error 1
make[1]: Leaving directory
`/home/FGS/fgs-dev/src/mapserver-5.4.2/mapscript/php3'
cd mapscript/php3; make; cd ../..
make[1]: Entering directory
`/home/FGS/fgs-dev/src/mapserver-5.4.2/mapscript/php3'
gcc -fPIC -O2 -fPIC -Wall    -DCOMPILE_DL=1 -DPHP4
-DNEED_NONBLOCKING_STDERR     -DUSE_WMS_LYR -DUSE_WFS_LYR  -DUSE_LIBXML2
-DUSE_CURL -DUSE_WCS_SVR -DUSE_WFS_SVR -DUSE_WMS_SVR -DUSE_MING_FLASH
-DUSE_POSTGIS  -DUSE_GDAL -DUSE_OGR -DUSE_GEOS   -DUSE_PROJ -DUSE_EPPL
-DUSE_RGBA_PNG -DUSE_AGG   -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 -DUSE_ICONV -DUSE_ZLIB
-I/home/FGS/fgs-dev/src/mapserver-5.4.2
-I/home/FGS/fgs-dev/built/libxml2/include/libxml2
-I/home/FGS/fgs-dev/built/libiconv/include
-I/home/FGS/fgs-dev/built/curl/include
-I/home/FGS/fgs-dev/built/ming/include
-I/home/FGS/fgs-dev/built/postgresql/include
-I/home/FGS/fgs-dev/built/gdal/include
-I/home/FGS/fgs-dev/built/geos/include
-I/home/FGS/fgs-dev/built/proj/include
-I/home/FGS/fgs-dev/built/libpng/include
-I/home/FGS/fgs-dev/built/agg/include
-I/home/FGS/fgs-dev/built/freetype/include/freetype2
-I/home/FGS/fgs-dev/built/freetype/include
-I/home/FGS/fgs-dev/built/gd//include
-I/home/FGS/fgs-dev/built/libiconv//include
-I/home/FGS/fgs-dev/built/zlib/include
-I/home/FGS/fgs-dev/built/php/include/php/
-I/home/FGS/fgs-dev/built/php/include/php//dl
-I/home/FGS/fgs-dev/built/php/include/php//main
-I/home/FGS/fgs-dev/built/php/include/php//Zend
-I/home/FGS/fgs-dev/built/php/include/php//include
-I/home/FGS/fgs-dev/built/php/include/php//TSRM  -I -c -o
php_mapscript_util.o php_mapscript_util.c
/usr/lib/gcc/sparc-linux-gnu/4.3.2/../../../../lib/crt1.o: In function
`_start':
(.text+0x10): undefined reference to `main'
/usr/lib/gcc/sparc-linux-gnu/4.3.2/../../../../lib/crt1.o: In function
`_start':
(.text+0x1c): undefined reference to `main'
/tmp/ccfByHlx.o: In function `_php_extract_associative_array':
php_mapscript_util.c:(.text+0x20): undefined reference to
`zend_hash_internal_pointer_reset_ex'
php_mapscript_util.c:(.text+0x6c): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0xdc): undefined reference to
`zend_hash_get_current_key_ex'
php_mapscript_util.c:(.text+0x118): undefined reference to
`zend_hash_move_forward_ex'
php_mapscript_util.c:(.text+0x128): undefined reference to
`zend_hash_get_current_data_ex'
php_mapscript_util.c:(.text+0x168): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0x1e4): undefined reference to
`_convert_to_string'
php_mapscript_util.c:(.text+0x1f4): undefined reference to
`_zval_copy_ctor_func'
php_mapscript_util.c:(.text+0x214): undefined reference to
`_zval_copy_ctor_func'
/tmp/ccfByHlx.o: In function `_phpms_object_init':
php_mapscript_util.c:(.text+0x248): undefined reference to `_object_init_ex'
php_mapscript_util.c:(.text+0x264): undefined reference to
`add_property_resource_ex'
/tmp/ccfByHlx.o: In function `_phpms_add_property_object':
php_mapscript_util.c:(.text+0x298): undefined reference to
`add_property_zval_ex'
php_mapscript_util.c:(.text+0x2dc): undefined reference to `zend_error'
/tmp/ccfByHlx.o: In function `_phpms_fetch_property_resource':
php_mapscript_util.c:(.text+0x318): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x350): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x3b0): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x3d0): undefined reference to `zend_error'
/tmp/ccfByHlx.o: In function `_phpms_fetch_property_string':
php_mapscript_util.c:(.text+0x408): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x44c): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x480): undefined reference to
`_convert_to_string'
php_mapscript_util.c:(.text+0x4c8): undefined reference to `zend_error'
/tmp/ccfByHlx.o: In function `_phpms_set_property_double':
php_mapscript_util.c:(.text+0x524): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x56c): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0x5f8): undefined reference to `_zval_dtor_func'
php_mapscript_util.c:(.text+0x608): undefined reference to
`_zval_copy_ctor_func'
php_mapscript_util.c:(.text+0x624): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x650): undefined reference to `zend_error'
/tmp/ccfByHlx.o: In function `_phpms_set_property_long':
php_mapscript_util.c:(.text+0x6a8): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x6f0): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0x778): undefined reference to `_zval_dtor_func'
php_mapscript_util.c:(.text+0x788): undefined reference to
`_zval_copy_ctor_func'
php_mapscript_util.c:(.text+0x7a4): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x7d0): undefined reference to `zend_error'
/tmp/ccfByHlx.o: In function `_phpms_set_property_null':
php_mapscript_util.c:(.text+0x828): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x870): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0x8ec): undefined reference to `_zval_dtor_func'
php_mapscript_util.c:(.text+0x8fc): undefined reference to
`_zval_copy_ctor_func'
php_mapscript_util.c:(.text+0x918): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0x944): undefined reference to `zend_error'
/tmp/ccfByHlx.o: In function `_phpms_set_property_string':
php_mapscript_util.c:(.text+0x99c): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0x9e4): undefined reference to `_emalloc'
php_mapscript_util.c:(.text+0xa70): undefined reference to `_estrndup'
php_mapscript_util.c:(.text+0xab4): undefined reference to `_zval_dtor_func'
php_mapscript_util.c:(.text+0xac4): undefined reference to
`_zval_copy_ctor_func'
php_mapscript_util.c:(.text+0xae0): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xb0c): undefined reference to `zend_error'
/tmp/ccfByHlx.o: In function `_phpms_fetch_property_double':
php_mapscript_util.c:(.text+0xb44): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xb8c): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0xbc4): undefined reference to
`convert_to_double'
php_mapscript_util.c:(.text+0xbec): undefined reference to `zend_error'
/tmp/ccfByHlx.o: In function `_phpms_fetch_property_long':
php_mapscript_util.c:(.text+0xc28): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xc60): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0xc88): undefined reference to `convert_to_long'
php_mapscript_util.c:(.text+0xcb4): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xce0): undefined reference to `zend_error'
/tmp/ccfByHlx.o: In function `_phpms_fetch_property_handle2':
php_mapscript_util.c:(.text+0xd38): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0xd7c): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xd8c): undefined reference to `_zend_list_find'
php_mapscript_util.c:(.text+0xdd0): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xdfc): undefined reference to `zend_error'
/tmp/ccfByHlx.o: In function `_phpms_fetch_handle2':
php_mapscript_util.c:(.text+0xe68): undefined reference to `zend_hash_find'
php_mapscript_util.c:(.text+0xe84): undefined reference to `_zend_list_find'
php_mapscript_util.c:(.text+0xeb8): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xed4): undefined reference to `zend_error'
php_mapscript_util.c:(.text+0xef0): undefined reference to `zend_error'
/tmp/ccfByHlx.o: In function `_phpms_report_mapserver_error':
php_mapscript_util.c:(.text+0xf28): undefined reference to `msGetErrorObj'
php_mapscript_util.c:(.text+0xf70): undefined reference to `zend_error'
collect2: ld returned 1 exit status
make[1]: *** [php_mapscript_util.o] Error 1
make[1]: Leaving directory
`/home/FGS/fgs-dev/src/mapserver-5.4.2/mapscript/php3'
cp shp2img shp2pdf legend mapserv shptree shptreevis shptreetst scalebar
sortshp mapscriptvars tile4ms msencrypt mapserver-config
/home/FGS/fgs-dev/built/mapserver/bin
if test -x libmapserver.so ; then \
      cp libmapserver.5.4.2.so /home/FGS/fgs-dev/built/mapserver/lib ; \
      (cd /home/FGS/fgs-dev/built/mapserver/lib ; ln -f -s
libmapserver.5.4.2.so libmapserver.so ) ; \
    fi
+ Creating new package in /home/FGS/fgs-dev/modules/mapserver-base.
+ Copying skeleton from /home/FGS/fgs-dev/pkg_def/mapserver/base.skeleton to
/home/FGS/fgs-dev/modules/mapserver-base
+ Packaging mapserver-base to
/home/FGS/fgs-dev/modules/fgs-mapserver-base-5.4.2-linux-sparc64.tar.gz...ok
+ Creating new package in /home/FGS/fgs-dev/modules/mapserver-php.
+ Copying skeleton from /home/FGS/fgs-dev/pkg_def/mapserver/php.skeleton to
/home/FGS/fgs-dev/modules/mapserver-php
cp: cannot stat `mapscript/php3/php_mapscript.so': No such file or directory
! ./fgs_install: Fatal error returned, exiting...
! /home/FGS/fgs-dev/bin/fgs_build_pkg.sh: Fatal error returned, exiting...

Regarding Ming, I have successfully buit ming-0.4.2 on the target sparc64
machine without any error. But I failed to compile Ming (any version) on my
i686 32bit work machine, however, it does not matter, it is just for a test
try.

Regards,
Hao


On Wed, Nov 4, 2009 at 4:27 PM, Normand Savard <nsavard at mapgears.com> wrote:

> Hao Zhang wrote:
>
>> Then I started building mapserver 5.4.2, but when it came to compile in
>> the directory mapscript/php3, it encountered a lot of "undefined reference
>> to" errors and aborted. Then I tried to build mapserver 5.2.1 instead and
>> luckily it did not encounter any error and well built.
>>
>>  Hao,
>
> We're interested to know what are the error messages when you build
> MapServer 5.4.2.  Could you paste them here?
>
> By the way did you succeed to compile Ming?
>
> Norm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/foss-gis-suite/attachments/20091106/83b5945e/attachment-0001.htm 


More information about the Foss-gis-suite mailing list