Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#51314 closed defect (fixed)

gdal build fails when qhull port is active

Reported by: gnw3 Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: mndavidoff (Monte Davidoff)
Port: gdal

Description

On both El Capitan and Snow Leopard, "upgrade gdal" fails if the variants require a local build.

With an active qhull port, the build fails to find libqhull.h, although

$ port installed qhull
The following ports are currently installed:
qhull @2012.1_3 (active)

$ locate libqhull.h
/opt/local/include/libqhull/libqhull.h

From config.log:

configure:29172: checking libqhull/libqhull.h usability
configure:29172: /usr/bin/clang -c -pipe -DGDAL_COMPILATION -arch x86_64 -I/opt/local/include -I/opt/local/include conftest.c >&5
configure:29172: $? = 0
configure:29172: result: yes
configure:29172: checking libqhull/libqhull.h presence
configure:29172: /usr/bin/clang -E -I/opt/local/include -I/opt/local/include conftest.c
configure:29172: $? = 0
configure:29172: result: yes

and config.status has:

S["EXTRA_INCLUDES"]="-I/usr/local/include/qhull -I/usr/local/include/qhull -I/opt/local/include -I/opt/local -I/opt/local/include -I/opt/local -I/opt/local/include -I/op"\
"t/local/include -I/opt/local/include -I/opt/local -I/opt/local/include -I/opt/local -I/opt/local/include "

This matches what is installed

$ cd /opt/local/include
$ ls -ld qhull libqhull
drwxr-xr-x  25 root  admin  850 23 Mar 13:38 libqhull
lrwxr-xr-x   1 root  admin   27 30 Jan 00:18 qhull -> /opt/local/include/libqhull

Gdal provides libqhull:

$ cd $(port dir gdal)/work/gdal-2.1.0
$ find . -name libqhull.h
./alg/libqhull/libqhull.h

A workaround is to deactivate qhull port, build gdal, activate qhull, then upgrade outdated.

Change History (7)

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

Cc: vince@… removed
Keywords: gdal qhull libqhull removed
Owner: changed from macports-tickets@… to vince@…

comment:2 Changed 4 years ago by Veence (Vincent)

Thanks for reporting. I'm going to look into this.

comment:3 Changed 4 years ago by mndavidoff (Monte Davidoff)

Cc: md14-macports@… added

Cc Me!

comment:4 Changed 4 years ago by Veence (Vincent)

Should be fixed in r148372. In the first place, I updated qhull to 2015.2, the current version. Next, I altered gdal’s Portfile to make qhull a mandatory dependency. This way, all should work nicely. Please tell me.

comment:5 in reply to:  4 Changed 4 years ago by mndavidoff (Monte Davidoff)

Replying to vince@…:

Should be fixed in r148372. ... Please tell me.

sudo port -vs install gdal completed successfully for me. Thanks!

comment:6 Changed 4 years ago by Veence (Vincent)

Resolution: fixed
Status: newclosed

Fine! Thanks for giving it a stab.

comment:7 in reply to:  4 Changed 4 years ago by gnw3

Replying to vince@…:

Should be fixed in r148372. In the first place, I updated qhull to 2015.2, the current version. Next, I altered gdal’s Portfile to make qhull a mandatory dependency. This way, all should work nicely. Please tell me.

Thanks. With the changes, gdal builds for me on El Capitan and simple tests using gdal_grid (with options to trigger Delauney triangulation) work, but the new qhull fails to build on Snow Leopard with gcc-4.2. It does build using:

sudo port -s upgrade qhull configure.compiler=macports-clang-3.6

so you may want to blacklist older gcc-4.2 (the gcc5 Portfile can provide some examples)

Note: See TracTickets for help on using tickets.