-
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/cgo: go 1.9.4 cgo issue: invalid flag in #cgo LDFLAGS #23739
Comments
Is this a public repository? Can you give more details of the cgo usage? What does the cgo directive actually say? |
I have the same issue with Go 1.9.4 in my test |
@raydac andlabs/ui must be updated to cope with the new Go release. I've opened a bug (andlabs/ui#268). @susugagalala we need to see the |
same happened to me while trying to build miekg/pkcs11 It was working fine yesterday. Reverting to go 1.9.3 solved it |
workaround for |
I have the same issue with CFLAGS in Go version 1.9.4. It was working fine in version 1.9.3.
|
The problem has to do with this: #23672 |
Is allowing linking to files in Is the pkcs11 flag ( Honestly, I'd argue that packages that break with the security fix should first see if their flag can safely be whitelisted before taking action, because gcc and clang have so many disparate linker flags that package authors must assume that all of them affect compilation in a significant way. (This is a problem I have with many C build tools that try to hide those details from the programmer; I want to know exactly what my build is doing and what edge cases I would otherwise miss because of them.) |
@dgryski @rasky That was just an example. It's not an actual repository. I have too many cgo calls in my projects, all resulting in the same error messages, so I did not provide the actual code... just a sample example... |
Why is this issue closed? It's not solved. |
There is a patch for Go proposed - #23743 |
@susugagalala again, I suggest asking if the flags that caused your projects issues could be whitelisted. Can you tell us what they are? (I'm genuinely concerned that people are treating these breakages as issues with Go itself, or even with the packages themselves, rather than seeing the security issue that caused it. I'm even more concerned that the solution is to just discard compiler flags with reckless abandon; compiler flags are always there for a reason, and we should exhaust all avenues before making a change to them.) |
I've created an issue to collect all options that should be added to the whitelists: #23749. Please add comments there as needed; I believe that all the options mentioned in this issue are already there. |
same problem happened when I try to build go-sciter, it works fine on Go1.9.3. |
@stevenzack please go to #23749 to report that issue then; that's where all these are being collected. |
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
GB seems semi-abandoned, and currently doesn't cross compile with either go-1.9.4 or go-1.10 ([bug][1]). Possibly due to the new cgo flag whitelisting (see: [go issue: 23739][2])? Instead: * require devs to put into GOPATH, as this seems unfortunately to be the convention the go community arrived at :( * use dep for vendoring * use gox for easy cross compilation [1]: constabulary/gb#733 [2]: golang/go#23739
UI lib doesn't support golang >= 1.9.3 More info golang/go#23739
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go 1.9.4
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?macOS High Sierra 10.13.3 / amd64
What did you do?
go build programusingcgo.go
What did you expect to see?
successful building process (built fine with go 1.9.3 and earlier versions)
What did you see instead?
$go build programusingcgo.go
github.com/samplepkg: invalid flag in #cgo LDFLAGS: github.com/samplepkg/mylib_darwin_amd64.a
$
The text was updated successfully, but these errors were encountered: