php - Compiling geos without root CentOS -
i have been trying compile geos on restrcited(no root) environment , having difficulties...
i did following
wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2 tar jxf geos-3.4.2.tar.bz2 cd geos-3.4.2 nano ~/.bash_profile # added path=$path:$home/local/bin export path ./configure --enable-php --prefix=$home/local/ && make clean && make
and im getting following errors
making in php make[2]: entering directory `/home/myname/test/geos-3.4.2/php' making in . make[3]: entering directory `/home/myname/test/geos-3.4.2/php' /bin/sh ../libtool --tag=cc --mode=compile gcc -dhave_config_h -i. -i../include -i../include/geos `/usr/local/bin/php-config --includes` -dcompile_dl_geos -i../capi -i../include -i./opt/alt/php53/usr/include/ -pedantic -wall -ansi -wno-long-long -ffloat-store -std=gnu99 -g -o2 -mt geos_la-geos.lo -md -mp -mf .deps/geos_la-geos.tpo -c -o geos_la-geos.lo `test -f 'geos.c' || echo './'`geos.c libtool: compile: gcc -dhave_config_h -i. -i../include -i../include/geos -i/usr/local/include/php -i/usr/local/include/php/main -i/usr/local/include/php/tsrm -i/usr/local/include/php/zend -i/usr/local/include/php/ext -i/usr/local/include/php/ext/date/lib -dcompile_dl_geos -i../capi -i../include -i./opt/alt/php53/usr/include/ -pedantic -wall -ansi -wno-long-long -ffloat-store -std=gnu99 -g -o2 -mt geos_la-geos.lo -md -mp -mf .deps/geos_la-geos.tpo -c geos.c -fpic -dpic -o .libs/geos_la-geos.o geos.c:26:17: error: php.h: no such file or directory geos.c:27:54: error: ext/standard/info.h: no such file or directory geos.c:28:72: error: zend/zend_exceptions.h: no such file or directory
according github, happens mamp
this happens because geos requires php header files original php source, , mamp not include those.
edit 1:
i have added in ~/local/share/config.site
cppflags=-i./opt/alt/php53/usr/include/ ldflags=-l$home/local/lib
php.h located here: ./opt/alt/php53/usr/include/php/main/php.h
info.h: ./opt/alt/php53/usr/include/php/ext/standard/info.h
zend_exceptions.h: ./opt/alt/php53/usr/include/php/zend/zend_exceptions.h
edit 2:
last thing: ./configure tells me this
checking php-config... /usr/local/bin/php-config checking php... /usr/local/bin/php
so question, if im on right track solving this, how include php header files while compiling geos in non root evnironment in centos ?
im quite lost honest !
i'm path php installation not start .
- not inside geos-3.4.2
folder anyway, , not inside arbitrary source folder.
should make path absolute.
i'm assuming clarification, full path should opt
folder in user folder, full path $home/opt/alt/php53/usr/
./opt/alt/php53/usr/
.
need add bin
folder path
variable, include
folder cppflags
, lib
folder ldflags
.
$home/local/
not necessary, since prefix
, , added automatically.
note when adding stuff path
variable, should add beginning instead of end, take precedence on system binaries.
i suggest undo changes made ~/local/share/config.site
(or remove file, if didn't exist), options there affect all automake-based projects.
should rather pass cppflags
, ldflags
arguments configure
.
after that, command block should like:
wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2 tar jxf geos-3.4.2.tar.bz2 cd geos-3.4.2 export path="/opt/alt/php53/usr/bin:$path" ./configure --enable-php --prefix="$home/local" cppflags="-i/opt/alt/php53/usr/include" ldflags="/opt/alt/php53/usr/lib" && make clean && make
Comments
Post a Comment