<p>Please pardon my ignorance of all things windows but is the cpp not one of those universal components of the c programming environment?</p>
<p>(apologies in advance I know.this is not a postgis question)</p>
<div class="gmail_quote">On Sep 5, 2011 4:51 AM, "Mark Cave-Ayland" <<a href="mailto:mark.cave-ayland@siriusit.co.uk">mark.cave-ayland@siriusit.co.uk</a>> wrote:<br type="attribution">> On 02/09/11 18:02, Doug McComber wrote:<br>
> <br>>> I've got this in my profile:<br>>><br>>> # 64 bit compiling<br>>> CC="gcc"<br>>> CXX="g++"<br>>> CPP="gcc"<br>>> CFLAGS="-m64"<br>
>> CPPFLAGS="-m64"<br>>> CXXFLAGS="-m64"<br>>><br>>> # 3rd party libray<br>>> LDFLAGS="-L/usr/local/lib"<br>>><br>>> and ran source ~/.profile<br>>><br>
>> Despite that I found I had to add some of that to the configure command<br>>> (shouldn't have to log out after sourcing profile right?) like so:<br>>><br>>> ./configure CC=gcc CFLAGS=-m64 CPPFLAGS=-m64 CXXFLAGS=-m64<br>
>> LDFLAGS=-L/usr/local/lib --with-geosconfig=/usr/local/bin/geos-config<br>>><br>>> This completes without error. The only warnings I saw were about dblatex<br>>> and CUnit. The final output of configure being:<br>
>><br>>> PostGIS is now configured for sparc-sun-solaris2.11<br>>><br>>> -------------- Compiler Info -------------<br>>> C compiler: gcc -m64<br>>> C++ compiler: g++ -m64<br>>><br>
>> -------------- Dependencies --------------<br>>> GEOS config: /usr/local/bin/geos-config<br>>> GEOS version: 3.3.0<br>>> PostgreSQL config: /usr/postgres/9.0-pgdg/bin/64/pg_config<br>>> PostgreSQL version: PostgreSQL 9.0.4<br>
>> PROJ4 version: 47<br>>> Libxml2 config: /usr/bin/xml2-config<br>>> Libxml2 version: 2.7.6<br>>> PostGIS debug level: 0<br>>><br>>> -------- Documentation Generation --------<br>>> xsltproc: /usr/bin/xsltproc<br>
>> xsl style sheets:<br>>> dblatex:<br>>> convert: /usr/bin/convert<br>>><br>>> Make starts out well but dies with an error complaining about not<br>>> finding SunStudio!<br>>><br>
>> gcc -m64 -fPIC -DPIC -Wall -Wmissing-prototypes -c -o g_util.o g_util.c<br>>> gcc -m64 -fPIC -DPIC -Wall -Wmissing-prototypes -c -o lwgeodetic.o<br>>> lwgeodetic.c<br>>> gcc -m64 -fPIC -DPIC -Wall -Wmissing-prototypes -c -o lwtree.o lwtree.c<br>
>> gcc -m64 -fPIC -DPIC -Wall -Wmissing-prototypes -ffloat-store -c -o<br>>> lwspheroid.o lwspheroid.c<br>>> ar rs liblwgeom.a measures.o box2d.o ptarray.o lwgeom_api.o lwgeom.o<br>>> lwpoint.o lwline.o lwpoly.o lwmpoint.o lwmline.o lwmpoly.o<br>
>> lwcollection.o lwcircstring.o lwcompound.o lwcurvepoly.o lwmcurve.o<br>>> lwmsurface.o lwutil.o lwalgorithm.o lwgunparse.o lwgparse.o<br>>> lwsegmentize.o wktparse.tab.o lex.yy.o vsprintf.o g_box.o g_coord.o<br>
>> g_geometry.o g_ptarray.o g_serialized.o g_util.o lwgeodetic.o lwtree.o<br>>> lwspheroid.o<br>>> ar: creating liblwgeom.a<br>>> make[1]: Leaving directory `/home/doug/sources/postgis-1.5.3/liblwgeom'<br>
>> make -C postgis<br>>> make[1]: Entering directory `/home/doug/sources/postgis-1.5.3/postgis'<br>>> /opt/studio11/SUNWspro/bin/cc -Xa -E -traditional-cpp postgis.sql.in.c |<br>>> grep -v '^#' > <a href="http://postgis.sql.in">postgis.sql.in</a><br>
>> /bin/sh: line 1: /opt/studio11/SUNWspro/bin/cc: not found<br>>> make[1]: *** [<a href="http://postgis.sql.in">postgis.sql.in</a>] Error 1<br>>> make[1]: *** Deleting file `<a href="http://postgis.sql.in">postgis.sql.in</a>'<br>
>> make[1]: Leaving directory `/home/doug/sources/postgis-1.5.3/postgis'<br>>> make: *** [postgis] Error 2<br>>><br>>> This is a Solaris 11 box I should mention and gcc was installed from the<br>
>> Oracle Solaris 11 repository as opposed to a 3rd-party package or from<br>>> source. I don't have Sun Studio installed (never did) and other programs<br>>> compiled without problem (Proj 4 and GEOS). This error<br>
>> "/opt/studio11/SUNWspro/bin/cc: not found" appears to be PostGIS<br>>> specific (according to Google anyway). Suggestions?<br>> <br>> Right, so currently the .sql files are generated using the C <br>
> pre-processor and so uses the CPP variable in addition to the ones <br>> defined above. I'm not sure what the correct command line should be to <br>> invoke the pre-processor in Sun's compiler is though.<br>
> <br>> I think we need to start thinking about ripping the CPP code out and <br>> finding something more suitable instead, particularly when thinking <br>> about building other platforms such as Win32/64. I'm not exactly sure <br>
> what the replacement should be though :/<br>> <br>> <br>> ATB,<br>> <br>> Mark.<br>> <br>> -- <br>> Mark Cave-Ayland - Senior Technical Architect<br>> PostgreSQL - PostGIS<br>> Sirius Corporation plc - control through freedom<br>
> <a href="http://www.siriusit.co.uk">http://www.siriusit.co.uk</a><br>> t: +44 870 608 0063<br>> <br>> Sirius Labs: <a href="http://www.siriusit.co.uk/labs">http://www.siriusit.co.uk/labs</a><br>> _______________________________________________<br>
> postgis-users mailing list<br>> <a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br>> <a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div>