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

MacPorts noreply at macports.org
Fri Feb 9 01:15:26 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):

 This was very annoying, their build system is broken.

 1. To have build arch set correctly, `GOHOSTARCH=${GOARCH}` is needed.
 `GOARCH` is ignored.
 2. Trash unsupported `-no_pie` in `lib.go`.

 Then need to fix this:
 {{{
 run:
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/go/pkg/tool/darwin_386/link
 -extldflags=-Wl,-headerpad_max_install_names -L/opt/local/lib
 -lMacportsLegacySupport -extld=/usr/bin/gcc-4.2 -o
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/go/pkg/tool/darwin_386/go_bootstrap
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/.tmp
 /go-tool-dist-132141453/cmd/go/_go_.a
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/go/pkg/tool/darwin_386/link:
 running /usr/bin/gcc-4.2 failed: exit status 1
 ld warning: atom sorting error for _runtime.erodata and _runtime.etypes in
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/.tmp
 /go-link-377917722/go.o
 ld warning: atom sorting error for _runtime.etypes and _runtime.erodata in
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/.tmp
 /go-link-377917722/go.o
 ld warning: atom sorting error for _runtime.etypes and _runtime.erodata in
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/.tmp
 /go-link-377917722/go.o
 ld warning: atom sorting error for _runtime.etypes and _runtime.erodata in
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/.tmp
 /go-link-377917722/go.o
 ld warning: atom sorting error for _runtime.erodata and _runtime.etypes in
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/.tmp
 /go-link-377917722/go.o
 ld warning: atom sorting error for _runtime.erodata and _runtime.etypes in
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/.tmp
 /go-link-377917722/go.o
 ld warning: atom sorting error for _runtime.erodata and _runtime.etypes in
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/.tmp
 /go-link-377917722/go.o
 ld warning: can't parse dwarf compilation unit info in
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/.tmp
 /go-link-377917722/go.o
 ld warning: atom sorting error for _runtime.erodata and _runtime.etypes in
 /opt/local/var/macports/build/_opt_SnowLeopardPorts_lang_go/go/work/.tmp
 /go-link-377917722/go.o
 Undefined symbols:
   "_fdopendir$INODE64$UNIX2003", referenced from:
       _syscall.libc_fdopendir_trampoline in go.o
 ld: symbol(s) not found
 collect2: ld returned 1 exit status
 }}}

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


More information about the macports-tickets mailing list