[MacPorts] #64270: lima: Build failure on old OS that uses legacysupport
MacPorts
noreply at macports.org
Wed Dec 22 12:18:25 UTC 2021
#64270: lima: Build failure on old OS that uses legacysupport
------------------------+--------------------
Reporter: ryandesign | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.7.1
Keywords: | Port: lima
------------------------+--------------------
lima fails to build on older OS versions that use legacy support, because
it is trying to link Linux executables with the macOS legacy support
library:
https://build.macports.org/builders/ports-10.10_x86_64-builder/builds/166362/steps
/install-port/logs/stdio
{{{
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w -X
github.com/lima-vm/lima/pkg/version.Version=" -o _output/share/lima/lima-
guestagent.Linux-x86_64 ./cmd/lima-guestagent
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="-s -w -X
github.com/lima-vm/lima/pkg/version.Version=" -o _output/share/lima/lima-
guestagent.Linux-aarch64 ./cmd/lima-guestagent
cp -a ./cmd/nerdctl.lima _output/bin/nerdctl.lima
cp -a ./cmd/lima _output/bin/lima
# calls the native resolver library and not the simplistic version in the
Go library.
CGO_ENABLED=1 go build -ldflags="-s -w -X github.com/lima-
vm/lima/pkg/version.Version=" -o _output/bin/limactl ./cmd/limactl
# github.com/lima-vm/lima/cmd/lima-guestagent
loadinternal: cannot find runtime/cgo
/opt/local/lib/go/pkg/tool/darwin_amd64/link: running
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_lima/lima/work/compwrap/cc/usr/bin/clang
failed: exit status 1
ld: warning: option -s is obsolete and being ignored
ld: warning: ignoring file
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_lima/lima/work/.tmp
/go-link-2121192670/go.o, file was built for unsupported file format (
0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 ) which is not the architecture being linked (x86_64):
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_lima/lima/work/.tmp
/go-link-2121192670/go.o
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
# github.com/lima-vm/lima/cmd/lima-guestagent
loadinternal: cannot find runtime/cgo
/opt/local/lib/go/pkg/tool/darwin_amd64/link: running
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_lima/lima/work/compwrap/cc/usr/bin/clang
failed: exit status 1
ld: warning: option -s is obsolete and being ignored
ld: warning: ignoring file
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_lima/lima/work/.tmp
/go-link-4108824845/go.o, file was built for unsupported file format (
0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 ) which is not the architecture being linked (x86_64):
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_sysutils_lima/lima/work/.tmp
/go-link-4108824845/go.o
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
}}}
See #64174 for inspiration on what to do about this. (For example: do you
really need to build the Linux executables?)
--
Ticket URL: <https://trac.macports.org/ticket/64270>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list