[postgis-users] Trouble compiling Postgis with Proj 8

Jorge Gustavo Rocha jgr at di.uminho.pt
Sat Jan 23 04:01:51 PST 2021


Hi devs,

pj_get_release isn't detected, but proj_create_from_wkt is. Changing
configure.ac solves the problem. I've chosen the same symbol used in
gdal autotools.

My current workaround is:
sed -i 's/pj_get_release/proj_create_from_wkt/' configure.ac

The difference between these symbols is:

$ nm --demangle -g /usr/local/lib/libproj.so.19.2.0 | grep
"proj_create_from_wkt"
0000000000200260 T proj_create_from_wkt

$ nm --demangle -g /usr/local/lib/libproj.so.19.2.0 | grep "pj_get_release"
0000000000268b60 T pj_get_release()

Is this a local issue with proj lib or something that we might have to
change in Postgis autotools? Anyway, I've created a ticket:
https://trac.osgeo.org/postgis/ticket/4833

Regards,

Jorge Gustavo

Às 01:26 de 23/01/21, Jorge Gustavo Rocha escreveu:
> Hi devs,
> 
> I've changed my Proj to ver. 8 (current master). Surprisingly, I'm not
> able to compile Postgis anymore. I'm doing something wrong, but I can't
> get it.
> 
> Compiling Proj:
> cd ~/dev/PROJ
> git pull
> ./autogen.sh
> ./configure
> make -j8
> sudo make install
> sudo ldconfig
> 
> Compiling Postgis:
> 
> cd ~/dev/cpp/postgis
> git pull upstream master
> ./autogen.sh
> ./configure --with-projdir=/usr/local
> 
> Output (related Proj entries):
> 
> Using user-specified proj directory: /usr/local
> checking proj_api.h usability... no
> checking proj_api.h presence... no
> checking for proj_api.h... no
> checking proj.h usability... yes
> checking proj.h presence... yes
> checking for proj.h... yes
> checking for proj.h... (cached) yes
> checking for pj_get_release in -lproj... no
> configure: error: could not find libproj - you may need to specify the
> directory of a PROJ installation using --with-projdir
> 
> The proj libs were created:
> 
> ls -l /usr/local/lib/libproj*
> -rw-r--r-- 1 root root 191752244 jan 23 01:00 /usr/local/lib/libproj.a
> -rwxr-xr-x 1 root root      1044 jan 23 01:00 /usr/local/lib/libproj.la
> lrwxrwxrwx 1 root root        17 jan 23 01:00 /usr/local/lib/libproj.so
> -> libproj.so.19.2.0
> lrwxrwxrwx 1 root root        17 jan 23 01:00
> /usr/local/lib/libproj.so.19 -> libproj.so.19.2.0
> -rwxr-xr-x 1 root root  72577536 jan 23 01:00
> /usr/local/lib/libproj.so.19.2.0
> 
> As far as I can see, the configure checks if pj_get_release is defined
> in libproj.
> 
> nm --demangle -g /usr/local/lib/libproj.so.19.2.0 | grep "pj_get_release"
> 0000000000268b60 T pj_get_release()
> 
> Looks perfect to me, but apparently configure is unable to see that
> pj_get_release is defined.
> 
> Feedback is welcome.
> 
> Jorge Gustavo
> 

J. Gustavo
-- 
Jorge Gustavo Rocha
Departamento de Informática
Universidade do Minho
4710-057 Braga
Gabinete 3.29 (Piso 3)
Tel: +351 253604480
Fax: +351 253604471
Móvel: +351 910333888
skype: nabocudnosor


More information about the postgis-users mailing list