-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: error when enable cgo and static link with build flag '-mod=vendor' #27667
Comments
no body take a look at this issue? |
You're saying that What happens if you take out all the other flags, and run As is, it's hard to tell if the issue is within Go, or if there's a problem with the If you're unsure how to do that, I'd suggest first reporting this issue in the go-ethereum project's issue tracker. If they can confirm it's not an issue in that codebase, we can investigate further. /cc @bcmills |
@dmitshur
But your suggestion is good, it may be the go-ethereum's problem. |
Sounds good. Feel free to link it to this issue so we can keep track of progress. Also, did you see this question:
|
@dmitshur There is no difference with |
This is almost certainly a dup of #26366. The thread gives some good background on what's happening here, especially #26366 (comment). If you want to "vendor" the entire module then #26366 (comment) gives links to how to do that. |
@myitcv Thank you very much, it works to me. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.11 linux/amd64.
Does this issue reproduce with the latest release?
of course it is.
What operating system and processor architecture are you using (
go env
)?NAME="Ubuntu"
VERSION="16.04.3 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.3 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
What did you do?
this is my simple test code
then I ran the command
go build --ldflags "-linkmode external -extldflags -static" -a -o main -v -mod=vendor secp256k1.test.go
What did you expect to see?
well, not error and output with the executable file
main
What did you see instead?
error and it still go on but with no
main
file output at the end.by the way, if I do not add the flag
-mod=vendor
, it seems ok.The text was updated successfully, but these errors were encountered: