Postgis 64bit kompilieren

–with-geosconfig=FILE

GEOS, a required geometry library, provides a utility called geos-config to enable software installations to locate the GEOS installation directory. Use this parameter (–with-geosconfig=/path/to/geos-config) to manually specify a particular GEOS installation that PostGIS will build against.

kennst du das schon:

Chapter*2.*Installation

geos meldet beim installieren:
Libraries have been installed in:
/usr/local/lib

wenn ich dieses aber als --with-geosconfig eintrage, meldet er
configure: error: the user-specified geos-config file /usr/local/lib does not exist

das Problem scheint laut config.log wohl beim initGEOS zu liegen:

configure:17120: checking for initGEOS in -lgeos_c
configure:17155: /opt/SUNWspro/bin/cc -xtarget=native64 -m64 -L/opt/sfw/lib/x64 -L/usr/local/lib -L/usr/sfw/lib/amd64 -o conftest -m64 -xtarget=native64 -R/
usr/local/lib -L/usr/local/lib -L/usr/local/include -R/usr/local/include conftest.c -lgeos_c -L/usr/local/lib >&5
“conftest.c”, line 41: warning: statement not reached
Undefined first referenced
symbol in file
cos /usr/local/lib/libgeos-3.1.1.so
log /usr/local/lib/libgeos-3.1.1.so
sin /usr/local/lib/libgeos-3.1.1.so
ceil /usr/local/lib/libgeos-3.1.1.so
sqrt /usr/local/lib/libgeos-3.1.1.so
_ZNSsC1ERKSs /usr/local/lib/libgeos_c.so
_ZNSsaSERKSs /usr/local/lib/libgeos_c.so
_Znwm /usr/local/lib/libgeos_c.so
atan2 /usr/local/lib/libgeos-3.1.1.so
floor /usr/local/lib/libgeos-3.1.1.so
_ZNKSsixEm /usr/local/lib/libgeos_c.so
_ZNSo5writeEPKcl /usr/local/lib/libgeos-3.1.1.so
_ZNKSs3endEv /usr/local/lib/libgeos-3.1.1.so
_ZNSolsEPFRSoS_E /usr/local/lib/libgeos_c.so
_ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEEC1ESt13_Ios_Openmode /usr/local/lib/libgeos_c.so
_ZNSt19basic_istringstreamIcSt11char_traitsIcESaIcEEC1ESt13_Ios_Openmode /usr/local/lib/libgeos_c.so
_ZNKSs7compareERKSs /usr/local/lib/libgeos-3.1.1.so
_ZNKSs17find_first_not_ofEPKcm /usr/local/lib/libgeos-3.1.1.so
_ZNKSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE3strEv /usr/local/lib/libgeos_c.so
_ZNSsC1EmcRKSaIcE /usr/local/lib/libgeos-3.1.1.so
_ZNSs6appendEPKc /usr/local/lib/libgeos_c.so
_ZNSs6appendEPKcm /usr/local/lib/libgeos-3.1.1.so
_ZNSs6appendERKSs /usr/local/lib/libgeos_c.so
__cxa_allocate_exception /usr/local/lib/libgeos_c.so
_ZTVSt9exception /usr/local/lib/libgeos_c.so
_ZTVN10__cxxabiv120__si_class_type_infoE /usr/local/lib/libgeos_c.so
_ZNSspLERKSs /usr/local/lib/libgeos-3.1.1.so
_ZSt20__throw_length_errorPKc /usr/local/lib/libgeos-3.1.1.so
_ZNSolsEd /usr/local/lib/libgeos-3.1.1.so
_ZNSolsEe /usr/local/lib/libgeos-3.1.1.so
_ZNSolsEi /usr/local/lib/libgeos-3.1.1.so
_ZNSolsEj /usr/local/lib/libgeos-3.1.1.so
_ZNSolsEm /usr/local/lib/libgeos-3.1.1.so
_ZNSsC1Ev /usr/local/lib/libgeos-3.1.1.so
_ZNSsD1Ev /usr/local/lib/libgeos_c.so
_ZNSspLEc /usr/local/lib/libgeos-3.1.1.so
_ZNSsixEm /usr/local/lib/libgeos-3.1.1.so
_ZNKSs4findEPKcm /usr/local/lib/libgeos-3.1.1.so
_ZNSi4readEPcl /usr/local/lib/libgeos-3.1.1.so
_ZNKSt9basic_iosIcSt11char_traitsIcEE3eofEv /usr/local/lib/libgeos-3.1.1.so
__cxa_end_catch /usr/local/lib/libgeos_c.so
_ZStrsISt11char_traitsIcEERSt13basic_istreamIcT_ES5_Rh /usr/local/lib/libgeos-3.1.1.so
__cxa_free_exception /usr/local/lib/libgeos-3.1.1.so
ZNSs7replaceEN9__gnu_cxx17__normal_iteratorIPcSsEES2_NS0_IPKcSsEES5 /usr/local/lib/libgeos-3.1.1.so
_ZNKSs7_M_iendEv /usr/local/lib/libgeos-3.1.1.so
__cxa_begin_catch /usr/local/lib/libgeos_c.so
__cxa_call_unexpected /usr/local/lib/libgeos_c.so
_ZNKSs5emptyEv /usr/local/lib/libgeos-3.1.1.so
_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base /usr/local/lib/libgeos-3.1.1.so
_ZTIPv /usr/local/lib/libgeos-3.1.1.so
_ZdlPv /usr/local/lib/libgeos_c.so
_ZNSolsEPKv /usr/local/lib/libgeos-3.1.1.so
__cxa_throw /usr/local/lib/libgeos_c.so
_ZNSsC1EPKcRKSaIcE /usr/local/lib/libgeos_c.so
_ZNSt18basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKSsSt13_Ios_Openmode /usr/local/lib/libgeos-3.1.1.so
_ZTISt9exception /usr/local/lib/libgeos_c.so
ZNSt15_List_node_base4hookEPS /usr/local/lib/libgeos-3.1.1.so
_ZNSt18basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev /usr/local/lib/libgeos-3.1.1.so
_ZNKSs5beginEv /usr/local/lib/libgeos-3.1.1.so
_ZNKSt9basic_iosIcSt11char_traitsIcEEcvPvEv /usr/local/lib/libgeos-3.1.1.so
_ZNSt15_List_node_base6unhookEv /usr/local/lib/libgeos-3.1.1.so
_ZNKSs9_M_ibeginEv /usr/local/lib/libgeos-3.1.1.so
_ZNKSs7compareEPKc /usr/local/lib/libgeos-3.1.1.so
_ZNKSt18basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv /usr/local/lib/libgeos-3.1.1.so
_ZNSsC1EPKcmRKSaIcE /usr/local/lib/libgeos_c.so
_ZNSt9exceptionD2Ev /usr/local/lib/libgeos_c.so
_ZNKSs5c_strEv /usr/local/lib/libgeos_c.so
_ZNSi5seekgElSt12_Ios_Seekdir /usr/local/lib/libgeos_c.so
__cxa_bad_typeid /usr/local/lib/libgeos-3.1.1.so
_ZNSsaSEPKc /usr/local/lib/libgeos-3.1.1.so
_ZNKSs6substrEmm /usr/local/lib/libgeos-3.1.1.so
_ZNSaIcED1Ev /usr/local/lib/libgeos_c.so
_ZNSaIcEC1Ev /usr/local/lib/libgeos_c.so
_ZNKSs6lengthEv /usr/local/lib/libgeos_c.so
_ZNKSs13find_first_ofEPKcm /usr/local/lib/libgeos-3.1.1.so
_ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base /usr/local/lib/libgeos-3.1.1.so
_ZSt18_Rb_tree_decrementPKSt18_Rb_tree_node_base /usr/local/lib/libgeos-3.1.1.so
_ZNKSs13find_first_ofERKSsm /usr/local/lib/libgeos-3.1.1.so
_ZNSspLEPKc /usr/local/lib/libgeos-3.1.1.so
_ZTVN10__cxxabiv121__vmi_class_type_infoE /usr/local/lib/libgeos-3.1.1.so
_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c /usr/local/lib/libgeos-3.1.1.so
_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_h /usr/local/lib/libgeos-3.1.1.so
__dynamic_cast /usr/local/lib/libgeos_c.so
_ZNSs7reserveEm /usr/local/lib/libgeos-3.1.1.so
_ZSt4cerr /usr/local/lib/libgeos_c.so
_ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev /usr/local/lib/libgeos_c.so
_ZNSt18basic_stringstreamIcSt11char_traitsIcESaIcEEC1ESt13_Ios_Openmode /usr/local/lib/libgeos-3.1.1.so
_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate /usr/local/lib/libgeos-3.1.1.so
_ZTVN10__cxxabiv117__class_type_infoE /usr/local/lib/libgeos_c.so
ZSt28_Rb_tree_rebalance_for_erasePSt18_Rb_tree_node_baseRS /usr/local/lib/libgeos-3.1.1.so
_ZNSt8ios_base4InitD1Ev /usr/local/lib/libgeos_c.so
_ZNSt8ios_base4InitC1Ev /usr/local/lib/libgeos_c.so
__gxx_personality_v0 /usr/local/lib/libgeos_c.so
ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS /usr/local/lib/libgeos-3.1.1.so
_ZNSt19basic_istringstreamIcSt11char_traitsIcESaIcEE3strERKSs /usr/local/lib/libgeos_c.so
_ZNSt19basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev /usr/local/lib/libgeos_c.so
_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc /usr/local/lib/libgeos_c.so
__cxa_pure_virtual /usr/local/lib/libgeos-3.1.1.so
__cxa_rethrow /usr/local/lib/libgeos-3.1.1.so
_ZTVN10__cxxabiv119__pointer_type_infoE /usr/local/lib/libgeos-3.1.1.so
_ZNSi5tellgEv /usr/local/lib/libgeos-3.1.1.so
_ZNKSs17find_first_not_ofERKSsm /usr/local/lib/libgeos-3.1.1.so
_ZNSi5seekgESt4fposI11__mbstate_tE /usr/local/lib/libgeos-3.1.1.so
_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base /usr/local/lib/libgeos-3.1.1.so
_ZNKSs4sizeEv /usr/local/lib/libgeos_c.so
ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6 /usr/local/lib/libgeos_c.so
_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E /usr/local/lib/libgeos_c.so
ld: fatal: Symbol referencing errors. No output written to conftest
c

langsam muss ich passen …

und wenn du diese option einfach weglaesst? die ist ja optional

hast du dashier beachtet?

There are several things to check when your installation or upgrade doesn’t go as you expected.

Check that you you have installed PostgreSQL 8.1 or newer, and that you are compiling against the same version of the PostgreSQL source as the version of PostgreSQL that is running. Mix-ups can occur when your (Linux) distribution has already installed PostgreSQL, or you have otherwise installed PostgreSQL before and forgotten about it. PostGIS will only work with PostgreSQL 8.1 or newer, and strange, unexpected error messages will result if you use an older version. To check the version of PostgreSQL which is running, connect to the database using psql and run this query:
SELECT version();

If you are running an RPM based distribution, you can check for the existence of pre-installed packages using the rpm command as follows: rpm -qa | grep postgresql

sowie

Also check that configure has correctly detected the location and version of PostgreSQL, the Proj4 library and the GEOS library.

The output from configure is used to generate the postgis_config.h file. Check that the POSTGIS_PGSQL_VERSION, POSTGIS_PROJ_VERSION and POSTGIS_GEOS_VERSION variables have been set correctly.

Ich verwende Postgres 8.4.1. Die Postgisvariablen werden doch erst beim Kompilieren von Postgres gesetzt, und soweit kommt er erst gar nicht. Im config.log steht unter Output variables:

PICFLAGS=’ -KPIC -DPIC’
PKG_CONFIG=’’
POSTGIS_BUILD_DATE=’’
POSTGIS_GEOS_VERSION=‘31’
POSTGIS_LIB_VERSION=’’
POSTGIS_MAJOR_VERSION=‘1’
POSTGIS_MICRO_VERSION=‘0’
POSTGIS_MINOR_VERSION=‘4’
POSTGIS_PGSQL_VERSION=‘84’
POSTGIS_PROJ_VERSION=’’
POSTGIS_SCRIPTS_VERSION=’’
POSTGIS_VERSION=’’

laut anleitung unter
Chapter*2.*Installation
sind folgende schritte durchzufuehren (die version koennte im beispiel net stimmen):

tar xvfz postgis-1.4.0.tar.gz
cd postgis-1.4.0
[color="Red"]./configure[/color]
make
make install
createdb yourdatabase
createlang plpgsql yourdatabase
psql -d yourdatabase -f lwpostgis.sql
psql -d yourdatabase -f spatial_ref_sys.sql

hast du den 3. schritt durchgefuehrt?
(Nachtrag) … ich sehe - um diesen geht es gerade … in der doku oben solltest du nochmal pruefen was die optionen bedeuten … und ob du sie richtig einsetzt

Weiterhin - siehe Requirements:

Required >

PostgreSQL 8.1 or higher. A complete installation of PostgreSQL (including server headers) is required. PostgreSQL is available from > http://www.postgresql.org > .

GNU C compiler (gcc). Some other ANSI C compilers can be used to compile PostGIS, but we find far fewer problems when compiling with gcc.

GNU Make (gmake or make). For many systems, GNU make is the default version of make. Check the version by invoking make -v. Other versions of make may not process the PostGIS Makefile properly.

Proj4 reprojection library, version 4.5.0 or greater. The Proj4 library is used to provide coordinate reprojection support within PostGIS. Proj4 is available for download from > PROJ — PROJ 9.3.1 documentation > .

GEOS geometry library, version 3.0.0 or greater. The GEOS library is used to provide geometry tests (ST_Touches(), ST_Contains(), ST_Intersects()) and operations (ST_Buffer(), ST_Union(), ST_Difference()) within PostGIS. GEOS is available for download from > GEOS > .

Eventuell ein Sym-Link?

ln -s libgcc_s.so libgcc_s.so.1

Gruß Uwe

EDIT: Fehler koorigiert…

danke gisman, aber das Problem mit der libgcc hatte ich bereits durch die Erweiterung -L/usr/sfw/lib/amd64 beim CC behoben.

Trotzdem ist er mit dem geos_config nicht einverstanden, wie oben beschrieben