loadinternal: cannot find runtime/cgo

120 views
Skip to first unread message

Paolo Losi

unread,
Feb 8, 2023, 2:50:59 PM2/8/23
to golang-nuts
I am using the following command to build command to build statically linked executables

go install -tags netgo,osusergo -v -ldflags="-extldflags '-static' -linkmode 'external'" ./...

Everything works fine (binaries are build and work correctly)  but I get this warning:

loadinternal: cannot find runtime/cgo

Is that harmless?

Paolo

Ian Lance Taylor

unread,
Feb 8, 2023, 3:24:31 PM2/8/23
to Paolo Losi, golang-nuts
Sounds like https://go.dev/issue/31544.

Ian
Reply all
Reply to author
Forward
0 new messages