Opened 10 years ago

Last modified 4 years ago

#3148 new defect

Another GUC for PROJSO or can we just figure out the PROJSO?

Reported by: robe Owned by: dustymugs
Priority: medium Milestone: PostGIS Fund Me
Component: raster Version: master
Keywords: Cc:

Description

So I started winnie's path to using proj 4.9.1 in prep for Windows 2.2 release with proj 4.9.1 (to take advantage of new geography goodness), and raster broke.

passed
  Test: test_gdal_to_raster ...passed
  Test: test_gdal_warp ...ERROR 6: Unable to load PROJ.4 library (libproj-0.dll), creation of
OGRCoordinateTransformation failed.
Assertion failed!

proj 4.9.1 creates dll libproj-9.dll

while the 4.8.0 series has libproj-0.dll

I think before libproj-0.dll is the default unless I override it with something else.

But now of course that default don't work with my 4.9.1 library.

So

SET PROJSO=libproj-9.dll

fixes the issue, but given I've got to ship to windows users who have every GIS thing under the sun, plus god knows what other versions of PostgreSQL/PostGIS running, I'd rather not muck with their system environment settings if I don't have to.

It would be really nice if raster was smart enough to figure out which proj it was compiled with, but barring that, I guess I can maybe live with a GUC for PROJSO.

Change History (12)

comment:1 by dustymugs, 10 years ago

Given the error message and more specifically OGRCoordinateTransformation, I think there's some conflict between proj4 and gdal. What gdal are you using? And which proj was compiled into gdal?

comment:2 by robe, 10 years ago

Hmm I didn't realize gdal had a direct dependency on proj. I'm using GDAL 1.11.1

which is compiled with this script:

http://svn.osgeo.org/postgis/buildbots/windows/mingw64/scripts/build_gdal.sh

I don't see any reference to PROJ in it.

Last build log for GDAL 1.11.1

http://winnie.postgis.net:1500/view/GDAL/job/GDAL_release/31/consoleFull

Last edited 10 years ago by robe (previous) (diff)

comment:3 by dustymugs, 10 years ago

GDAL definitely has proj4…

https://trac.osgeo.org/gdal/wiki/ConfigOptions#PROJSO

Looking through my local gdal's config.log, I find entries like…

configure:28334: checking how to link PROJ.4 library
configure:28347: result: link dynamically.

comment:4 by robe, 10 years ago

So it's hard-code to search for libproj-0.dll if not passed in according to that link. I had the same issue before I upgrade to proj 4.8.0 when I was using an older 4.6.something that comes in as libproj.dll. We skirted the issue cause upgrading to 4.8.0 made it not a requirement for me to set that variable.

Last edited 10 years ago by robe (previous) (diff)

comment:5 by robe, 10 years ago

Well if this issue only affects me (ie a good chunk of windows users), I suppose I could just cheat and also distribute a copy of libproj-9.dll as libproj-0.dll. That isn't quite as annoying as having to deal with a GUC or environment variable.

though if it does affect others, we should consider doing it.

comment:6 by dustymugs, 10 years ago

Your compiled GDAL has been hard coded to search for libproj-0.dll as that was found at compilation time. Can you recompile your GDAL?

comment:7 by robe, 10 years ago

hmm hard to believe it found it at compilation since I don't think I had proj in my search path when I compiled. But I'll go head and recompile and see if it makes a difference.

comment:8 by robe, 10 years ago

for completeness IRC dialog from EvenR:

<EvenR> robe2: proj dll is loaded through LoadLibrary()
<robe2> EvenR: so doesn't matter about compile time right?
<robe2> so issue is i installed 4.9.1
<robe2> and if I build postgis against 4.9.1 it still looks for libproj-0.dll
<robe2> unless I set PROJSO to libproj-9.dll
<EvenR> The default build doesn't need the include files or .lib of proj. But the --with-static-proj configure flag can be used for traditionnal linking
<EvenR> ah yes, the .so number has changed. hum

So it does seem like most likedly I'm just getting the default hard-coded name in GDAL 1.11.1. PErhaps GDAL 2.0 will come out before PostGIS 2.2. and I can up to that and it will have proj 4.9.1 as default and this will be a non-issue again.

I really don't want to statically compile in proj into my GDAL since I ship with GAL whatever files (which could be different between versions)

comment:9 by robe, 10 years ago

Wait just a minute. Looks like EvenR tagged 2.0.0 today.

comment:10 by robe, 9 years ago

Milestone: PostGIS 2.2.0PostGIS Future

comment:11 by robe, 7 years ago

Milestone: PostGIS FuturePostGIS Fund Me

Milestone renamed

comment:12 by jratike80, 4 years ago

Is this ticket still relevant now when Proj has advanced to version 8?

Note: See TracTickets for help on using tickets.