[MacPorts] #55831: postgis2 fails to compile on Snow Leopard

MacPorts noreply at macports.org
Fri Feb 16 17:24:33 UTC 2018

#55831: postgis2 fails to compile on Snow Leopard
  Reporter:  fvaccari  |      Owner:  Veence
      Type:  defect    |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  ports     |    Version:  2.4.2
Resolution:            |   Keywords:  snowleopard
      Port:  postgis2  |
Changes (by ryandesign):

 * keywords:  postgis2 SnowLeopard => snowleopard
 * status:  new => assigned
 * owner:   => Veence
 * cc: vince@… (removed)


 I see the port has selected llvm-gcc-4.2:


 It uses this compiler for a lot of the build, but then tries to use
 gcc-4.2 when building the postgis directory:

 :info:build ---- Making all in postgis
 :info:build make[1]: Entering directory
 :info:build /usr/bin/gcc-4.2 -I../liblwgeom -pipe -Os -Diconv=libiconv
 -Diconv_open=libiconv_open -Diconv_close=libiconv_close -arch x86_64
 -I../libpgcommon  -I/opt/local/include   -I/opt/local/include/libxml2
 -I/opt/local/include -fPIC -I. -I./
 -I/opt/local/include/postgresql10/internal  -I/opt/local/include
 -I/opt/local/include/libxml2  -I/opt/local/include  -c -o postgis_module.o
 :info:build make[1]: /usr/bin/gcc-4.2: No such file or directory

 It is wrong for the build system to be disobeying MacPorts' directives
 about which compiler to use. If your proposed change works, that's great,
 and we could use that, but we might also want to dissect the build a bit
 to see why it is doing this wrong thing in the first place. It may be
 inheriting the compiler value from one of its dependencies for which you
 received a binary from our build server. /usr/bin/gcc-4.2 is the compiler
 used on our Snow Leopard build server because that is the default compiler
 with Xcode 3.2.6 and that is the latest free version of Xcode for Snow
 Leopard. I assume that compiler does not exist on your system because you
 are or were a paid Apple developer and therefore have access to and have
 installed Xcode 4.2 for Snow Leopard which does not contain that compiler

 The problem is not Snow Leopard-specific per se, but Snow Leopard is the
 only system on which you're likely to see the problem because Snow Leopard
 is the only macOS version on which you get a different default compiler
 depending on which Xcode version you install.

Ticket URL: <https://trac.macports.org/ticket/55831#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS

More information about the macports-tickets mailing list