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

c compiling failes with invalid flag in #cgo CPPFLAGS: -w #54

Closed
hashworks opened this issue Feb 10, 2018 · 4 comments
Closed

c compiling failes with invalid flag in #cgo CPPFLAGS: -w #54

hashworks opened this issue Feb 10, 2018 · 4 comments

Comments

@hashworks
Copy link

I get this with Go v1.9.4 and gcc v7.3.0.

Happens on go install github.com/wellington/go-libsass and on compilation when used in my project: go build github.com/wellington/go-libsass/libs: invalid flag in #cgo CPPFLAGS: -w

Linking against system libsass with the dev tag works fine.

@drewwells
Copy link
Member

New security features broke cgo golang/go#23749

You'll need to use an older version of Go for now, since no workaround is available for 1.9.4

@drewwells
Copy link
Member

Oh, this might be a workaround: export CGO_LDFLAGS_ALLOW=".*\.a"; can't work on this today but will test out soon.

@rikvdh
Copy link

rikvdh commented Feb 17, 2018

@drewwells You can also remove the -w from libs/wrap_main.go, compiling the libs shall emit warnings. But shall compile fine.

@drewwells
Copy link
Member

I see compile errors on 1.9 and 1.110 after removing -w

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

3 participants