[MacPorts] #68700: go @1.17.13_0 - Legacy Go Compiler Completely Broken on Lion and Mtn Lion
MacPorts
noreply at macports.org
Fri Jun 7 01:21:22 UTC 2024
#68700: go @1.17.13_0 - Legacy Go Compiler Completely Broken on Lion and Mtn Lion
---------------------+------------------------------
Reporter: RobK88 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.8.1
Resolution: | Keywords: lion moutainlion
Port: go |
---------------------+------------------------------
Comment (by ar-an-ribe):
Replying to [comment:18 RobK88]:
> In the meantime, if anyone has any ideas, please let me know!
I think that MacPorts ticket #69466 could be relevant for the solution
here. In [https://github.com/golang/go/issues/23122 GitHub golang ticket
#23122], it was noted that support for OS X 10.8 (Mountain Lion) and 10.9
(Mavericks) was removed from Go 1.11. [I don’t know when support for Mac
OS X 10.7 (Lion) was removed.] When I tried to build Go 1.20.14 from
source in Mavericks using MacPorts `go @1.17.13_0`, the following errors
were reported:
{{{
Building Go cmd/dist using /opt/local/lib/go. (go1.17.13 darwin/amd64)
# _/Users/ar-an-ribe/source/go-1.20.14/src/cmd/dist
/opt/local/lib/go/pkg/tool/darwin_amd64/link: running /usr/bin/clang
failed: exit status 1
Undefined symbols for architecture x86_64:
"_clock_gettime", referenced from:
_runtime.walltime_trampoline.abi0 in go.o
"_fdopendir$INODE64", referenced from:
_syscall.libc_fdopendir_trampoline.abi0 in go.o
"_fstatat64", referenced from:
_syscall.libc_fstatat64_trampoline.abi0 in go.o
"_openat", referenced from:
_syscall.libc_openat_trampoline.abi0 in go.o
"_unlinkat", referenced from:
_syscall.libc_unlinkat_trampoline.abi0 in go.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
}}}
These five library functions, which are not part of Mavericks (and
presumably also not part of earlier versions of macOS), prevent MacPorts
`go @1.17.13_0` from being usable in Mavericks (as well as earlier
versions of macOS), even though the port was successfully built in
Mavericks.
The approach that was noted in MacPorts ticket #69466, to translate parts
of the MacPorts `legacy-support` port into Go to add missing functionality
in macOS 10.12 (Sierra) to allow compilation of Go 1.22.0 [which seems to
require macOS 10.13 (High Sierra)], seems to me to represent an analogous
solution to allow MacPorts `go @1.17.13_0` to be usable on earlier
versions of macOS. In the case of Mavericks, the five missing undefined
symbols in Mavericks listed above would need to be translated from the
MacPorts `legacy-support` port into Go to allow MacPorts `go @1.17.13_0`
to be usable in Mavericks to compile newer versions of Go; earlier
versions of macOS could require the porting of additional missing
undefined symbols, to allow MacPorts `go @1.17.13_0` to be similarly
usable on those versions of macOS.
Once `go @1.17.13_0` is usable on a particular version of macOS, an
analogous port of additional symbols from `legacy-support` could be needed
to allow `go @1.20.14` to be usable on that version of macOS; and once `go
@1.20.14` is usable, one more round of symbol porting could be needed to
bring the current version of Go [`go @1.22.4` at this writing, which by
default requires macOS 10.15 (Catalina)] to usability on that version of
macOS. Since the number of missing symbols can vary by the version of
macOS, different versions of macOS could require different sets of symbols
to be ported from `legacy-support` into Go.
--
Ticket URL: <https://trac.macports.org/ticket/68700#comment:20>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list