Opened 5 years ago
Last modified 3 years ago
#59233 assigned defect
postgis2 fails to compile on Mojave with Xcode 11.1
Reported by: | EJFielding (Eric Fielding) | Owned by: | Veence (Vincent) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.1 |
Keywords: | Cc: | gabiruh (Gabriel Andrade) | |
Port: | postgis2 |
Description
I ran a port selfupdate and port upgrade outdated today, and the postgis2 2.5.3 version failed in the configure step.
---> Attempting to fetch postgis2-2.5.3_0+postgresql10+raster+topology.darwin_18.x86_64.tbz2 from http://ywg.ca.packages.macports.org/mirror/macports/packages/postgis2 ---> Fetching distfiles for postgis2 ---> Verifying checksums for postgis2 ---> Extracting postgis2 ---> Configuring postgis2 Error: Failed to configure postgis2, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_postgis2/postgis2/work/postgis-2.5.3/config.log Error: Failed to configure postgis2: configure failure: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_postgis2/postgis2/main.log for details.
The config.log file is long, so I will attach it.
Attachments (2)
Change History (12)
Changed 5 years ago by EJFielding (Eric Fielding)
Attachment: | config.log added |
---|
comment:1 Changed 5 years ago by EJFielding (Eric Fielding)
It seems that it can't find usable GDAL headers. From the main.log:
:info:configure checking for gdal-config... /opt/local/bin/gdal-config :info:configure checking GDAL version... 3.0.1 :info:configure checking for OGR enabled... yes :info:configure checking gdal.h usability... no :info:configure checking gdal.h presence... yes :info:configure configure: WARNING: gdal.h: present but cannot be compiled :info:configure configure: WARNING: gdal.h: check for missing prerequisite headers? :info:configure configure: WARNING: gdal.h: see the Autoconf documentation :info:configure configure: WARNING: gdal.h: section "Present But Cannot Be Compiled" :info:configure configure: WARNING: gdal.h: proceeding with the compiler's result :info:configure checking for gdal.h... no :info:configure configure: error: could not find GDAL headers
comment:2 Changed 5 years ago by jmroot (Joshua Root)
Cc: | Veence removed |
---|---|
Owner: | set to Veence |
Status: | new → assigned |
comment:3 Changed 5 years ago by gabiruh (Gabriel Andrade)
Cc: | gabiruh added |
---|
comment:4 Changed 5 years ago by wyllys66 (Wyllys Ingersoll)
XCode 11.1 only includes the MacOSX10.15.sdk, but port still wants to use 10.14. I worked around this by making a soft link so that configure scripts would work correctly. The other option is to revert to XCode 10.
$ cd /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs $ sudo ln -s MacOSX.sdk MacOSX10.14.sdk
comment:5 Changed 4 years ago by cbrown06 (Christopher Brown)
On a clean install of MacPorts-2.6.4_1-11-BigSur on macOS Big Sur 11.2.3, trying to install "postgis2" fails. XCode version is 12.4.
The "softlink" workaround suggested above by Wyllys Ingersoll doesn't work for me. Seeing exactly the same error as indicated by Eric Fielding.
:info:configure checking GDAL version... 3.2.2 :info:configure checking for OGR enabled... yes :info:configure checking gdal.h usability... no :info:configure checking gdal.h presence... yes :info:configure configure: WARNING: gdal.h: present but cannot be compiled :info:configure configure: WARNING: gdal.h: check for missing prerequisite headers? :info:configure configure: WARNING: gdal.h: see the Autoconf documentation :info:configure configure: WARNING: gdal.h: section "Present But Cannot Be Compiled" :info:configure configure: WARNING: gdal.h: proceeding with the compiler's result :info:configure checking for gdal.h... no :info:configure configure: error: could not find GDAL headers :info:configure Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_postgis2/postgis2/work/postgis-2.5.5" && ./configure --prefix=/opt/local --with-projdir=/opt/local/lib/proj6 --libdir=/opt/local/lib/postgresql12 --with-pgconfig=/opt/local/lib/postgresql12/bin/pg_config --with-raster --with-topology :info:configure Exit code: 1 :error:configure Failed to configure postgis2, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_postgis2/postgis2/work/postgis-2.5.5/config.log :error:configure Failed to configure postgis2: configure failure: command execution failed
comment:6 Changed 4 years ago by Veence (Vincent)
Is there any reason why you'd prefer postgis2 to postgis3?
comment:7 Changed 4 years ago by EJFielding (Eric Fielding)
I forget now why I had postgis2
installed more than a year ago when I reported it, but I uninstalled it and did not need it again.
comment:8 Changed 4 years ago by Veence (Vincent)
I think the best way to address this ticket is by having postgis2 removed. Anyone would object to this?
comment:9 Changed 4 years ago by cbrown06 (Christopher Brown)
@Veence - to answer your question, yes there is a reason, it's to align my development environment on macOS with the target Ubuntu 18.04 LTS server configuration, which (according to my sysadmin, who prefers to avoid installing external APT repositories), "postgis2" is available but not "postgis3".
Even if that would be ideal, I'm open-minded and have considered "postgis3"... except that failed for me in the same way: https://trac.macports.org/ticket/62114#comment:4
Seems like the "postgis3" port has exactly the same problem (I tried and can confirm this). I suppose that a fix for "postgis3" would be back-portable to "postgis2", but that's just a guess on my part. Even if the issue is resolved only for the "postgis3" port, that's OK for me (and thanks in advance, it's much appreciated if it can be done).
comment:10 Changed 3 years ago by martoche (Martin Ottenwaelter)
See my comment on the postgis3 issue: https://trac.macports.org/ticket/62114#comment:5
config log