Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#59096 closed defect (wontfix)

postgis2 fails to build with Xcode 11 on 10.14

Reported by: rstrauss-logyx (Randy Strauss) Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version: 2.6.0
Keywords: Cc:
Port: postgis2

Description (last modified by mf2k (Frank Schima))

MacPorts recommends I log a bug.

Note I'm on a Mac running Mojave, 10.14.6 I just installed the latest Xcode, 11, build version 11A420a, xcode-select version is 2354 Then I was following the instructions in: https://trac.macports.org/wiki/Migration executing the "restore" line: sudo ./restore_ports.tcl myports.txt

But it fails...

sudo port install postgis2
\\--->  Computing dependencies for postgis2
\\--->  Fetching archive for postgis2
\\--->  Attempting to fetch postgis2-2.5.3_0+postgresql10+raster+topology.darwin_18.x86_64.tbz2 from \\https://packages.macports.org/postgis2
\\--->  Attempting to fetch postgis2-2.5.3_0+postgresql10+raster+topology.darwin_18.x86_64.tbz2 from \\http://aus.us.packages.macports.org/macports/packages/postgis2
\\--->  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
\\--->  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.
\\**Error: Follow https://guide.macports.org/#project.tickets to report a bug.**
\\Error: Processing of port postgis2 failed**

I see a checkbox on this form with the label "I have files to attach to this ticket", but I see no say to attach files... I put the log into: http://randy.strausses.net/misc/macports-postgis2.log

This is debilitating...

Change History (11)

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

In the future, please use WikiFormatting and add the port maintainer(s) to Cc (port info --maintainers postgis2), if any.

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

Keywords: failed postgis2 report-a-bug removed
Owner: set to Veence
Status: newassigned

Under Attachments, click the "Add file" button and select the main.log. Without it, we cannot determine what the problem is.

Version 0, edited 5 years ago by mf2k (Frank Schima) (next)

comment:3 Changed 5 years ago by mf2k (Frank Schima)

Description: modified (diff)

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

Resolution: invalid
Status: assignedclosed

It’s more complex than that. I have the same error. This is caused by the new Xcode installation.

configure:17664: checking gdal.h usability
configure:17664: /usr/bin/clang -c -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -pipe -Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -arch x86_64 -I/opt/local/include conftest.c >&5
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]
conftest.c:73:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^~~~~~~~~
1 error generated.

There’s hardly anything I can do, and probably other ports will break also. You can check the thread on the discussion list for possible workarounds?

comment:5 Changed 5 years ago by jmroot (Joshua Root)

The build system is apparently ignoring the CFLAGS that MacPorts sets, which include the correct sysroot. But it's hard to be sure of what's going on without a log.

comment:6 Changed 5 years ago by jmroot (Joshua Root)

Resolution: invalid
Status: closedreopened
Summary: postgis2 fails to install, says to log a bugpostgis2 fails to build with Xcode 11 on 10.14

You can close as wontfix if you want, but this isn't invalid.

comment:7 Changed 5 years ago by Veence (Vincent)

Resolution: wontfix
Status: reopenedclosed

Well, it’s invalid because it’s not the port which is broken, but Xcode. But, I mean, okay, fair enough.

comment:8 Changed 5 years ago by jmroot (Joshua Root)

It is the port that is broken, because it's not using configure.sdkroot. Whether we like it or not, the new reality that Apple has made is that the SDK your build tool built against may not be the SDK you have to build with now.

comment:9 Changed 5 years ago by Veence (Vincent)

And how do you fix that Joshua?

comment:10 Changed 5 years ago by jmroot (Joshua Root)

I don't know for postgis2 specifically, but in general you use the CFLAGS that are set in the environment.

comment:11 Changed 5 years ago by Veence (Vincent)

Ok, I’ll look into that tonight. Thanks!

Note: See TracTickets for help on using tickets.