Opened 2 years ago

Closed 2 years ago

#56175 closed defect (fixed)

py27-spatialite does not build and install

Reported by: danrabin Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: Cc: mankoff (Ken Mankoff), basmac
Port: py-spatialite

Description (last modified by mf2k (Frank Schima))

On a clean, freshly installed Macports, sudo port install py27-spatialite fails with

:info:build __main__.HeaderNotFoundException: cannot find proj_api.h, bailing out

Dependency is on proj4, which doesn't seem to install the file in question, but not clear whether proj4 or py27-spatialite is at fault.

Attachments (1)

main.log (41.0 KB) - added by danrabin 2 years ago.
main.log from py27-spatialite build

Download all attachments as: .zip

Change History (13)

Changed 2 years ago by danrabin

Attachment: main.log added

main.log from py27-spatialite build

comment:1 Changed 2 years ago by mf2k (Frank Schima)

Port: py-spatialite added; py27-spatialite removed

In the future, please use WikiFormatting.

comment:2 Changed 2 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:3 Changed 2 years ago by mankoff (Ken Mankoff)

I've run into this bug too (and now QGIS has stopped working!)

The comment

Dependency is on proj4, which doesn't seem to install the file in question, but not clear whether proj4 or py27-spatialite is at fault

may be incorrect. At least on my system, proj4 does install /opt/local//lib/proj49/include/proj_api.h. From this I think the fault is not proj4 but in py27-spatialite.

Last edited 2 years ago by mankoff (Ken Mankoff) (previous) (diff)

comment:4 Changed 2 years ago by mankoff (Ken Mankoff)

Cc: mankoff added

comment:5 Changed 2 years ago by news24lor

Hi I've checked. py27-spatialite does not see the new "proj49" (proj 4.9.3) or "proj5" (proj 5.0.0) folder inside /opt/local/lib/ and it does not see all bin and lib inside. It's important to remember that proj 5.0.0 has bug and now it's better the 4.9.3 version. The error is inside py27-spatialite.

py27-spatialite error is important because it stop QGIS and QGIS3

comment:6 Changed 2 years ago by news24lor

I've created some symbolic links inside /opt/local/bin and lib folder: py-spatialite see these binaries and it is built without errors.

This is not the best solution but it works:

$ sudo ln -s /opt/local/lib/proj49/bin/geod /opt/local/bin/
$ sudo ln -s /opt/local/lib/proj49/bin/nad2bin /opt/local/bin/
$ sudo ln -s /opt/local/lib/proj49/bin/proj /opt/local/bin/
$ sudo ln -s /opt/local/lib/proj49/lib/libproj.dylib /opt/local/lib/
$ sudo ln -s /opt/local/lib/proj49/lib/libproj.a /opt/local/lib/
$ 
$ sudo port upgrade py-spatialite

comment:7 Changed 2 years ago by mankoff (Ken Mankoff)

Unfortunately this hack does not work for me.

comment:8 Changed 2 years ago by news24lor

Missing one row...

...
sudo ln -s /opt/local/lib/proj49/include/proj_api.h /opt/local/include

sudo port upgrade py-spatialite

Try

comment:9 Changed 2 years ago by basmac

Above links worked for me ;-)

comment:10 Changed 2 years ago by basmac

Cc: basmac added

comment:11 Changed 2 years ago by dbevans (David B. Evans)

The install paths for proj (version 5) and proj4 have been modified to allow for parallel installation without conflict. Using symbolic links as described here subverts the intent of these modifications and should be removed once a better fix is committed.

The correct fix is to patch setup.py to use the new install paths. See #56150 for a more detailed discussion of the issue.

comment:12 Changed 2 years ago by dbevans (David B. Evans)

Owner: set to dbevans
Resolution: fixed
Status: newclosed

In 7bd182906a0fdcff28a5a53b1a2791059886b399/macports-ports:

py-spatialite: build fix for relocated proj4

Add proj4 include and lib paths to setup.py.

See #56150
Closes #56175

Note: See TracTickets for help on using tickets.