gallium
gallium copied to clipboard
go get error
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
Did you install git-lfs
before running go get
?
Yes, these commands are executed successfully, no problem
Alex Flint [email protected] 于2018年9月16日周日 上午7:32写道:
Did you install git-lfs before running go get?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alexflint/gallium/issues/63#issuecomment-421653901, or mute the thread https://github.com/notifications/unsubscribe-auth/AZhZeMmR-9hzkfBdsXdaSjnZZL5zn_tYks5ubY4cgaJpZM4WoqSa .
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
Just revert back to go1.9 and go get
works fine
Seems like this is a result of a security-related patch in go 1.10 that whitelisted specific cgo comple/link flags: https://github.com/golang/go/issues/23749
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 .