Opened 5 years ago
Closed 5 years ago
#4467 closed defect (fixed)
Error: undefined symbol: proj_get_type when installed from source
Reported by: | constant5 | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.0.0 |
Component: | build | Version: | master |
Keywords: | arm | Cc: |
Description
System Ubuntu 18.04 AArch64
This is a challenging install on an arm system.
Steps:
- built and installed proj-6.1.1 from source
- built and installed geos_3.7.2-1 from source
- built and installed gdal-3.0.1 from source
- built and installed postgis_3.0.0alpha_dev from source
executed :sudo ldconfig
Trying:
testdb=# CREATE EXTENSION postgis;
ERROR: could not load library "/usr/lib/postgresql/10/lib/postgis-3.so": /usr/lib/postgresql/10/lib/postgis-3.so: undefined symbol: proj_get_type
Change History (6)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
I must I have an older proj libary loaded beacuse i get:
libproj.so.12 => /usr/lib/aarch64-linux-gnu/libproj.so.12 (0x0000007fb7ba0000)
How do I change the library that is linked?
when I run proj in the bash terminal it says I have version 6.1 and when I configure the postgis build it says it finds proj 61?
comment:3 by , 5 years ago
OK. I uninstalled all proj related packages including some V4 ubuntu distributions that I must have forgotten to delete after unsuccessfully trying to install everything from apt.
I started over with the steps above.
- built and installed proj-6.1.1 from source
- built and installed geos_3.7.2-1 from source
- built and installed gdal-3.0.1 from source
- built and installed postgis_3.0.0alpha_dev from source
Now I get a new error:
testdb=# CREATE EXTENSION postgis;
ERROR: could not load library "/usr/lib/postgresql/10/lib/postgis-3.so": /usr/lib/postgresql/10/lib/postgis-3.so: undefined symbol: GEOSFrechetDistanceDensify
I am attaching the ldd output so you can see if postgis has the appropriate libraries.
ldd /usr/lib/postgresql/10/lib/postgis-3.so
linux-vdso.so.1 (0x0000007fb7c75000)
libgtk3-nocsd.so.0 => /usr/lib/aarch64-linux-gnu/libgtk3-nocsd.so.0 (0x0000007fb7b26000)
libgeos_c.so.1 => /usr/lib/aarch64-linux-gnu/libgeos_c.so.1 (0x0000007fb7ae4000)
libproj.so.15 => /usr/local/lib/libproj.so.15 (0x0000007fb7895000)
libjson-c.so.3 => /lib/aarch64-linux-gnu/libjson-c.so.3 (0x0000007fb787b000)
libxml2.so.2 => /usr/lib/aarch64-linux-gnu/libxml2.so.2 (0x0000007fb76dc000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000007fb7583000)
/lib/ld-linux-aarch64.so.1 (0x0000007fb7c4a000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000007fb756e000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000007fb7542000)
libgeos-3.6.2.so => /usr/lib/aarch64-linux-gnu/libgeos-3.6.2.so (0x0000007fb7397000)
libstdc++.so.6 => /usr/lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000007fb7204000)
libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000007fb71e0000)
libsqlite3.so.0 => /usr/lib/aarch64-linux-gnu/libsqlite3.so.0 (0x0000007fb70e5000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000007fb702b000)
libicuuc.so.60 => /usr/lib/aarch64-linux-gnu/libicuuc.so.60 (0x0000007fb6e56000)
libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000007fb6e29000)
liblzma.so.5 => /lib/aarch64-linux-gnu/liblzma.so.5 (0x0000007fb6df9000)
libicudata.so.60 => /usr/lib/aarch64-linux-gnu/libicudata.so.60 (0x0000007fb5440000)
comment:4 by , 5 years ago
Component: | postgis → build/upgrade/install |
---|---|
Owner: | changed from | to
You are building against geos 3.7.2, but it's loading geos 3.6.2:
libgeos-3.6.2.so => /usr/lib/aarch64-linux-gnu/libgeos-3.6.2.so (0x0000007fb7397000)
comment:5 by , 5 years ago
Component: | build/upgrade/install → postgis |
---|---|
Owner: | changed from | to
So I checked and like proj I still had some older geos packages installed. I removed them, recompiled, and everything works!
testdb=# CREATE EXTENSION postgis;
CREATE EXTENSION
Is there a way in future releases to prevent postgis from using legacy libraries?
comment:6 by , 5 years ago
Component: | postgis → build/upgrade/install |
---|---|
Owner: | changed from | to
Resolution: | → fixed |
Status: | new → closed |
Is there a way in future releases to prevent postgis from using legacy libraries?
We can't really do anything to "fix" your setup. I'd recommend not installing more than one version of a library unless you know how library dynamic loading works.
Please verify that you are linking and loading to the appropriate proj library. Do you have more than one installed in the system?
ldd /usr/lib/postgresql/10/lib/postgis-3.so
should tell you what library has been used to link; in my case /usr/lib/libproj.so.15, which corresponds to PROJ6.