Opened 5 years ago

Closed 2 years ago

#58592 closed defect (fixed)

go @1.12.5: Undefined symbols _fstatat64 _openat _unlinkat

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

Description

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 (11)

comment:1 Changed 5 years ago by ryandesign (Ryan Carsten 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
runtime.sigpanic()
	/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 5 years ago by ryandesign (Ryan Carsten Schmidt)

Does MacPorts legacy support provide these functions?

comment:3 Changed 5 years ago by kencu (Ken)

yes, all of them.

comment:4 Changed 5 years ago by ryandesign (Ryan Carsten 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 5 years 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 5 years 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 5 years 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.

<https://github.com/macports/macports-ports/commit/abe46d0764f08fdec9a4923880ce03edbc768a0d>

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 5 years ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added

comment:9 Changed 2 years ago by mascguy (Christopher Nielsen)

Given that go builds successfully for 10.7 and later, can this be closed?

comment:10 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: herbygillot added

Adding Herby

comment:11 in reply to:  9 Changed 2 years ago by mascguy (Christopher Nielsen)

Resolution: fixed
Status: assignedclosed

Replying to mascguy:

Given that go builds successfully for 10.7 and later, can this be closed?

No longer an issue, closing as fixed.

Note: See TracTickets for help on using tickets.