[postgis-users] psql:lwpostgis.sql:48: ERROR: could not load library "/usr/local/pgsql/lib/liblwgeom.so.1.1": /usr/local/pgsql/lib/liblwgeom.so.1.1: undefined symbol: pj_transform

Stefan Hahmann s.hahmann at mapchart.com
Tue Apr 17 02:56:37 PDT 2007


hi mark

thank you for your efforts,

to me that seems strange as well. but i did install PROJ.4 before installing postgis. i am wondering as well why the liblwgeom.so.1.1 does not have a reference to libproj.so.0
in the makefile.config i have USE_PROJ=1 and PROJ_LIBDIR=/usr/lib where the libproj.so.0 is
	

install steps and outputs follow:


./configure --with-pgsql=/usr/local/pgsql/bin/pg_config

checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether ln -s works... yes
checking for iconv_open in -liconv... no
checking for libiconv_open in -liconv... no
checking for iconv_open in -lc... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking iconv.h usability... yes
checking iconv.h presence... yes
checking for iconv.h... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for geos-config... /usr/local/bin/geos-config
checking for proj... /usr/local/bin/proj
checking for flex... /usr/bin/flex
checking for dllwrap... no
checking for dlltool... no
checking for bison... bison -y
checking for perl... /usr/bin/perl
checking for xsltproc... no
checking for pdfxmltex... no
checking for db2pdf... no
checking for jw... no
checking which template to use... linux
configure: creating ./config.status
config.status: creating Makefile.config
config.status: WARNING:  Makefile.config.in seems to ignore the --datarootdir setting
config.status: creating config.h
config.status: config.h is unchanged

 SUMMARY
 -------------------------------------------------------

 HOST_OS: linux-gnu

   PGSQL: /usr/local/pgsql/bin/pg_config
    GEOS: /usr/local/bin/geos-config (with C-API)
          (ldflags: -L/usr/local/lib)
    PROJ: prefix=/usr/local libdir=/usr/local/lib
   ICONV: 1

 PORTNAME: linux
   PREFIX: /usr/local/pgsql
  EPREFIX: ${prefix}
      DOC: /usr/local/pgsql/doc/contrib
     DATA: ${datarootdir}
      MAN: ${datarootdir}/man
      BIN: /usr/local/pgsql/bin
      EXT: /usr/local/pgsql/lib (\$$libdir)
 -------------------------------------------------------



make

make -C lwgeom
make[1]: Entering directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/lwgeom'
make[1]: Für das Ziel »all« ist nichts zu tun.
make[1]: Leaving directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/lwgeom'
make -C loader
make[1]: Entering directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/loader'
make[1]: Für das Ziel »all« ist nichts zu tun.
make[1]: Leaving directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/loader'
make -C utils
make[1]: Entering directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/utils'
chmod +x postgis_restore.pl create_undef.pl postgis_proc_upgrade.pl profile_intersects.pl test_estimation.pl test_joinestimation.pl
make[1]: Leaving directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/utils'

then I made a change in the makefile.config:

set PROJ_LIBDIR from /usr/local/lib to /usr/lib as the libproj.so.0 is in /usr/lib


make install

make -C lwgeom
make[1]: Entering directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/lwgeom'
make[1]: Für das Ziel »all« ist nichts zu tun.
make[1]: Leaving directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/lwgeom'
make -C loader
make[1]: Entering directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/loader'
make[1]: Für das Ziel »all« ist nichts zu tun.
make[1]: Leaving directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/loader'
make -C utils
make[1]: Entering directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/utils'
chmod +x postgis_restore.pl create_undef.pl postgis_proc_upgrade.pl profile_intersects.pl test_estimation.pl test_joinestimation.pl
make[1]: Leaving directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/utils'
make -C lwgeom install
make[1]: Entering directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/lwgeom'
/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/install-sh -c -m 755 liblwgeom.so.1.1 /usr/local/pgsql/lib/liblwgeom.so.1.1
cd /usr/local/pgsql/lib && \
rm -f liblwgeom.so.1 && \
ln -s liblwgeom.so.1.1 liblwgeom.so.1
cd /usr/local/pgsql/lib && \
rm -f liblwgeom.so && \
ln -s liblwgeom.so.1.1 liblwgeom.so
/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/install-sh -c -m 644 ../lwpostgis.sql /usr/local/pgsql/share/lwpostgis.sql
/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/install-sh -c -m 644 ../lwpostgis_upgrade.sql /usr/local/pgsql/share/lwpostgis_upgrade.sql
/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/install-sh -c -m 644 ../spatial_ref_sys.sql /usr/local/pgsql/share/spatial_ref_sys.sql
make[1]: Leaving directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/lwgeom'
make -C loader install
make[1]: Entering directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/loader'
/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/install-sh -c -m 755 pgsql2shp /usr/local/pgsql/bin/pgsql2shp
/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/install-sh -c -m 755 shp2pgsql /usr/local/pgsql/bin/shp2pgsql
make[1]: Leaving directory `/usr/local/src/postgresql-8.1.8/contrib/postgis-1.1.7/loader'


by the way: installing proj.4 gave the following results:

./configure

checking for ranlib
checking for gcc
checking for strerror
checking for -lm
checking for hypot
creating config.status
creating install
creating src/Makefile
creating nad/install


sh install

ranlib libproj.a
gcc -o proj proj.o gen_cheb.o p_series.o emess.o libproj.a -lm
gcc -o geod geod.o geod_set.o geod_for.o geod_inv.o emess.o libproj.a -lm
gcc -o nad2nad nad2nad.o nad_cvt.o nad_init.o nad_intr.o emess.o libproj.a -lm
cp proj geod nad2nad /usr/local/bin
chmod 755 /usr/local/bin/proj /usr/local/bin/geod /usr/local/bin/nad2nad
cp projects.h /usr/local/include
chmod 644 /usr/local/include/projects.h
cp libproj.a /usr/local/lib
chmod 644 /usr/local/lib/libproj.a
ranlib /usr/local/lib/libproj.a
installing man.1 files
installing man.3 files
file proj_def.dat installed
file nad27 installed
file nad83 installed
file world installed
file GL27 installed
nad2nad NADCON files not present
normal completion


libproj.a goes to /usr/local/lib



-------------------------------------------------------------
STEFAN HAHMANN .:. Software Developer

Phone +49 (0) 3 51 / 4 75 52-30
email s.hahmann at mapchart.com
-------------------------------------------------------------
MAPCHART.COM .:. Business Mapping On Demand

MapChart GmbH
Werdauer Straße 1-3
01069 Dresden
Germany

Phone +49 (0) 1 80 / 5 00 95 50
Fax +49 (0) 1 80 / 5 00 96 60
Internet http://www.mapchart.com
e-mail info at mapchart.com

Geschäftsführer: Henrik Liebscher
HR 23703, Amtsgericht Dresden
Sitz der Gesellschaft ist Dresden
-------------------------------------------------------------
*** JETZT ONLINE: Marktdaten on Demand im MapChart Store ***
http://store.mapchart.com
-------------------------------------------------------------
*** Visit our MapChart Atlas! ***
http://atlas.mapchart.com
-------------------------------------------------------------




More information about the postgis-users mailing list