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
I'm trying to cross-compile from linux with OSX as target but I get the following error
building for OS darwin ARCH amd64
# github.com/keybase/go-keychain
../../../go/pkg/mod/github.com/keybase/[email protected]/corefoundation_1.10.go:9:10: fatal error: 'CoreFoundation/CoreFoundation.h' file not found
#include <CoreFoundation/CoreFoundation.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
# net
/usr/local/go/src/net/cgo_bsd.go:15:72: could not determine kind of name for C.AI_MASK
# os/user
/usr/local/go/src/os/user/getgrouplist_darwin.go:16:11: warning: implicit declaration of function'getgrouplist' is invalid in C99 [-Wimplicit-function-declaration]
I saw the issue #23 but I don't understand how the PR #20 could fix this issue, that PR "just" add cgo build tag
What I have tried
I've tried the following build commands:
GOOS=darwin GOARCH=amd64 go build works without building keychain
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build doesn't work, fail withe the above error
CC=clang-11 GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build doesn't work, fails with the above error
CC=clang-11 CXX=clang++-11 GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build doesn't work, faisl with the above error
I have part of this solved for you, but I'm here in the issues section to comment on a compile error which could be related to my environment setup. None the less this will get you further along. That error is because golang cannot find the xcode libraries with swift. So you need to install swift then tell go where the libraries and header files are.
I was using ubuntu 20.04, but you should be able to switch out the swift library for 18.04.
Hi there,
I'm trying to cross-compile from linux with OSX as target but I get the following error
I saw the issue #23 but I don't understand how the PR #20 could fix this issue, that PR "just" add
cgo
build tagWhat I have tried
I've tried the following build commands:
GOOS=darwin GOARCH=amd64 go build
works without building keychainGOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build
doesn't work, fail withe the above errorCC=clang-11 GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build
doesn't work, fails with the above errorCC=clang-11 CXX=clang++-11 GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build
doesn't work, faisl with the above errorBuild environment
go version:
keyring module version
clang-11 --version:
clang++-11 --version:
OS version (lsb_release -a):
The text was updated successfully, but these errors were encountered: