Skip to content
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

go get error #63

Open
Charliego3 opened this issue Sep 14, 2018 · 6 comments
Open

go get error #63

Charliego3 opened this issue Sep 14, 2018 · 6 comments

Comments

@Charliego3
Copy link

Charliego3 commented Sep 14, 2018

Throws an exception when I execute go get github.com/alexflint/gallium

Go build github.com/alexflint/gallium: invalid flag in #cgo LDFLAGS: -Wl,-rpath,@executable_path/../Frameworks

I can't find the specific reason now, I don't know where to start.
go version: go version go1.10.3 darwin/amd64

@alexflint
Copy link
Owner

Did you install git-lfs before running go get?

@Charliego3
Copy link
Author

Charliego3 commented Sep 18, 2018 via email

@trietphm
Copy link

Same here

$ go version
go version go1.10 darwin/amd64
$ git lfs install
Git LFS initialized.
$ go get -v github.com/alexflint/gallium
github.com/alexflint/gallium
go build github.com/alexflint/gallium: invalid flag in #cgo LDFLAGS: -Wl,-rpath,@executable_path/../Frameworks

@trietphm
Copy link

Just revert back to go1.9 and go get works fine

@alexflint
Copy link
Owner

Seems like this is a result of a security-related patch in go 1.10 that whitelisted specific cgo comple/link flags: golang/go#23749

@ianlancetaylor
Copy link

That flag really is insecure. An attacker can manipulate the program if they can get it to run in an unexpected directory. It's the kind of thing the whitelist is meant to prevent. For more information see https://golang.org/wiki/InvalidFlag .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants