I am trying to compile geo objects in my limited (without root) environment, and I am having some difficulties ...
I did the 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
And I get the following errors
Making all in php make[2]: Entering directory `/home/myname/test/geos-3.4.2/php' Making all 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 to some github, this happens with MAMP
This is because GEOS requires PHP header files from the original PHP source, and MAMP does not include them.
EDIT 1:
I also added this to ~ / local / share / config.site
CPPFLAGS=-I./opt/alt/php53/usr/include/ LDFLAGS=-L$HOME/local/lib
php.h is 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: mine. / configure tells me this
checking for php-config... /usr/local/bin/php-config checking for php... /usr/local/bin/php
So my question, if Im on the right track to solve this, is how can I include my php header files while compiling geolocations in un root evnironment in centOs?
I'm completely lost to be honest!