[MacPorts] #69160: go @1.17.13: Bad CPU type in executable

MacPorts noreply at macports.org
Thu Feb 8 11:37:23 UTC 2024


#69160: go @1.17.13: Bad CPU type in executable
-------------------------+------------------------------
  Reporter:  leeeoooooo  |      Owner:  ci42
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.8.1
Resolution:              |   Keywords:  i386 snowleopard
      Port:  go          |
-------------------------+------------------------------

Comment (by barracuda156):

 Oh well, of course this cannot possibly work, it is broken by design now:

 https://github.com/macports/macports-
 ports/blob/74d67724f89b6214d3ec94b7863af23f613ee969/lang/go/Portfile#L29

 This is set to false, nothing down changes that, so instead of using
 Go-1.4 for bootstrap it tries to use a new prebuilt binary, but distfiles
 do not even contain a mention of 386 binary and the build is set to use
 x86_64.

 Unfortunately, just fixing this is not enough to fix the build, since even
 using Go-1.4, it still switches to building for x86_64, and also uses
 unsupported linker flags like `-no_pie`. So at the very minimum we need to
 a) fix choice of build type; b) patch out breaking ldflags and c) ensure
 correct arch is used across the build. Then maybe it will work.

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


More information about the macports-tickets mailing list