Opened 4 years ago

Closed 3 years ago

#62114 closed defect (wontfix)

postgis3 @3.0.3: configure failure: could not find GDAL headers

Reported by: conradwt (Conrad Taylor) Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: bigsur Cc:
Port: postgis3

Description

When executing,

sudo port install postgis3

I'm getting the following error:

Failed to configure postgis3: configure failure: command execution failed

Also, I'm attaching the complete file for reference.

Attachments (3)

main.log (468.1 KB) - added by conradwt (Conrad Taylor) 4 years ago.
main.log
config.log (198.3 KB) - added by erikdendekker (Erik den Dekker) 4 years ago.
main.2.log (405.2 KB) - added by erikdendekker (Erik den Dekker) 4 years ago.

Download all attachments as: .zip

Change History (9)

Changed 4 years ago by conradwt (Conrad Taylor)

Attachment: main.log added

main.log

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Cc: Veence removed
Owner: set to Veence
Status: newassigned
Summary: Failed to configure postgis3: configure failure: command execution failedpostgis3 @3.0.3: configure failure: could not find GDAL headers

Please also attach the config.log.

Changed 4 years ago by erikdendekker (Erik den Dekker)

Attachment: config.log added

Changed 4 years ago by erikdendekker (Erik den Dekker)

Attachment: main.2.log added

comment:2 Changed 4 years ago by erikdendekker (Erik den Dekker)

I have the same problem, so I also uploaded my main.log and confirmation.log. Updated yesterday to Mac OS Big Sur v11.2.2 and tried to reinstall all my ports.

Possibly related may be a configuration issue that I am having, MacPorts warns that Mac OS 11.2 SDK is not installed:

    Warning: The macOS 11.2 SDK does not appear to be installed. Ports may not build correctly.
    Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.

However version 11.2 of the MacOS SDK does not exist (or is never released); Xcode 12.4 Command Line Tools installs Mac OS 11.1, and Xcode 12.5 Beta 3 (Latest) installs Mac OS SDK 11.3

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

Did you solve that or is it still an issue?

comment:4 Changed 4 years ago by cbrown06 (Christopher Brown)

Looks like it's still an issue, see also: https://trac.macports.org/ticket/59233 ("postgis2").

Same error for "postgis2" AND "postgis3".

On a clean install of MacPorts-2.6.4_1-11-BigSur on macOS Big Sur 11.2.3, trying to install "postgis3" fails. XCode version is 12.4. I'm also getting the (incorrect) message:

Warning: The macOS 11.2 SDK does not appear to be installed. Ports may not build correctly.
Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'.

Looks like a problem with "GDAL" according to: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_postgis3/postgis3/main.log

:info:configure checking for gdal-config... /opt/local/bin/gdal-config
: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_postgis3/postgis3/work/postgis-3.0.3" && ./configure --prefix=/opt/local --libdir=/opt/local/lib/postgresql13 --with-pgconfig=/opt/local/lib/postgresql13/bin/pg_config --with-raster --with-topology --with-projdir=/opt/local/lib/proj7 
:info:configure Exit code: 1
:error:configure Failed to configure postgis3, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_postgis3/postgis3/work/postgis-3.0.3/config.log
:error:configure Failed to configure postgis3: configure failure: command execution failed
:debug:configure Error code: NONE
:debug:configure Backtrace: configure failure: command execution failed
:debug:configure     while executing
:debug:configure "$procedure $targetname"
:error:configure See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_databases_postgis3/postgis3/main.log for details.

comment:5 Changed 3 years ago by martoche (Martin Ottenwaelter)

Same problem here.

In config.log, I found the following error:

clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk' [-Wmissing-sysroot]
ld: library not found for -lSystem
clang: error: linker command failed with exit code 1 (use -v to see invocation)

So I ran the following commands:

cd /Library/Developer/CommandLineTools/SDKs
sudo ln -s MacOSX11.3.sdk MacOSX11.0.sdk

And the build succeeded.

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

Resolution: wontfix
Status: assignedclosed

Outdated tickets.

Note: See TracTickets for help on using tickets.