[MacPorts] #59985: python37, python38: error: cannot run C compiled programs

MacPorts noreply at macports.org
Sat Jan 25 20:15:27 UTC 2020


#59985: python37, python38: error: cannot run C compiled programs
--------------------------+--------------------
  Reporter:  AgilentGCMS  |      Owner:  (none)
      Type:  defect       |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:
Resolution:               |   Keywords:
      Port:               |
--------------------------+--------------------

Comment (by kencu):

 gcc-9 has been fixed to work with the newer headers in Apple's latest SDK.

 You are using {{{configure.compiler=macports-gcc}}} which is not specific,
 and will call the gcc version that you have set up using {{{port select
 gcc}}}. In your case that is gcc8.

 So you will get past your header error by calling {{{configure.compler
 =macports-gcc-9}}} but there will likely be other problems found soon, as
 a lot of software just assumes now that Apple systems will be using
 {{{clang}}} and so forces compiler flags, standard libraries, and other
 assumptions without actually doing the proper thing and testing for them
 first.

 {{{gcc}}} can be made to support a lot of the current {{{clang}}}
 traditions, like multiple {{{arch}}} flags for cross-compiling, and
 setting a specific {{{stdlib}}} to link against {{{libc++}}} -- out on the
 web you will find such patches quite easily, and I may integrate these
 into MacPorts someday, if acceptable. The Darwin lead for {{{gcc}}}, Iain
 Sandoe, is a very very skilled compiler writer, and has most all of these
 things on his github forks.

 At present though, clang is much more capable than you think it is, and
 the open source versions all support LLVM since about five years ago now.
 The only thing of real interest that gcc has that clang does not have is
 fortran compiling capabiltiy, at present -- this is being worked on with a
 {{{flang}}} front end for {{{llvm}}}, and so one day that will be covered
 as well.

 You can beat your head against the wall trying to make all
 Darwin/Apple/MacPorts software build with gcc, and you might have some
 success -- but life is short, and you probably have better things to do
 with your time than figure out how to make that work....

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


More information about the macports-tickets mailing list