wellington / go-libsass

Go wrapper for libsass, the only Sass 3.5 compiler for Go
http://godoc.org/github.com/wellington/go-libsass
Apache License 2.0
205 stars 28 forks source link

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

Closed hashworks closed 6 years ago

hashworks commented 6 years ago

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 commented 6 years ago

New security features broke cgo https://github.com/golang/go/issues/23749

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

drewwells commented 6 years ago

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

rikvdh commented 6 years ago

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

drewwells commented 6 years ago

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