Opened 23 months ago

Last modified 17 months ago

#58592 assigned defect

go @1.12.5: Undefined symbols _fstatat64 _openat _unlinkat

Reported by: ryandesign (Ryan Schmidt) Owned by: ci42
Priority: Normal Milestone:
Component: ports Version:
Keywords: mavericks Cc: cooljeanius (Eric Gallager)
Port: go


go @1.12.5 installs but does not work on 10.9:

/opt/local/lib/go/pkg/tool/darwin_amd64/link: running /usr/bin/clang failed: exit status 1
Undefined symbols for architecture x86_64:
  "_fstatat64", referenced from:
      syscall.libc_fstatat64_trampoline in go.o
  "_openat", referenced from:
      syscall.libc_openat_trampoline in go.o
  "_unlinkat", referenced from:
      syscall.libc_unlinkat_trampoline in go.o
ld: symbol(s) not found for architecture x86_64

Change History (8)

comment:1 Changed 23 months ago by ryandesign (Ryan Schmidt)

Doesn't work on 10.8 either, with a different error:

fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff8aa8b39f]

runtime stack:
runtime.throw(0x45f583f, 0x2a)
	/opt/local/lib/go/src/runtime/panic.go:617 +0x72
	/opt/local/lib/go/src/runtime/signal_unix.go:374 +0x4a9

The port has an error message that prints when installed on 10.6 which says it requires 10.7 or later. This appears to be outdated. It would be great if older systems could still use go. If the latest version can be fixed, great, otherwise maybe old systems can be pinned to old versions of go.

comment:2 Changed 20 months ago by ryandesign (Ryan Schmidt)

Does MacPorts legacy support provide these functions?

comment:3 Changed 20 months ago by kencu (Ken)

yes, all of them.

comment:4 Changed 20 months ago by ryandesign (Ryan Schmidt)

Huh. The go port already includes legacy support. The build failure on 10.9 was fixed via #58138. But that has only turned it into a runtime failure.

comment:5 Changed 20 months ago by kencu (Ken)

I don't know much about go's build system at all, but presumably we need to get the legacysupport lib onto whatever this link line looks like:

/opt/local/lib/go/pkg/tool/darwin_amd64/link: running /usr/bin/clang failed

or link it into some library go regularly links against, as a static lib, if any such library exists.

comment:6 Changed 20 months ago by kencu (Ken)

This go problem often shows up when building (some versions of) clang -- if go is installed, then the clang port tries to build go bindings, but that errors out when go is run in the process.

comment:7 Changed 20 months ago by kencu (Ken)

Ionic has outlined how to make go work at runtime on 10.9 and older in the notes for go that he added with the fix to 58138.


As he pointed out, it requires some manual intervention. He didn't see how to automate that, and right now, neither do I.

comment:8 Changed 17 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.