You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go build -ldflags="-extldflags=static" -tags="osusergo netgo" ./cmd/kvserver
What did you expect to see?
#github.com/shirou/gopsutil/disk
iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:132:1: note: 'IOMasterPort' has been explicitly marked deprecated here
What did you see instead?
github.com/shirou/gopsutil/disk
iostat_darwin.c:28:2: warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:132:1: note: 'IOMasterPort' has been explicitly marked deprecated here
# github.com/fetchrobotics/sage-kernel/cmd/kvserver
/Users/karlmutch/go/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
clang: error: no such file or directory: 'static'; did you mean '-static'?
The text was updated successfully, but these errors were encountered:
The value that you pass as an argument to -extldflags is passed directly to the external linker. You wrote -extldflags=static so the external linker is invoked with static. That doesn't work.
go build -ldflags="-extldflags=-static" -tags="osusergo netgo" ./cmd/kvserver
...
# github.com/fetchrobotics/sage-kernel/cmd/kvserver
/Users/karlmutch/go/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
That and on my Linux builds the - was not needed. However I could also be conflating the missing C runtime library. Not sure which issue to choose in this case.
Looks like I cannot reopen the ticket, will create a new one related to the missing library as the other alternative I could have chosen.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
N/A (1.18 Beta1)
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Perform a static build using the following
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: