Closed gibranv closed 5 years ago
Same exact problem observed on OSX El Capitan 10.11.6
It seems that golang has introduced restrictions on the cgo
LDFLAGS, this is security related: https://github.com/golang/go/issues/23749.
BTW the good news is that it seems the flag -fconstant-cfstrings
has been whitelisted and the patch will be availbale in go1.11: https://github.com/golang/go/commit/f7c2a71632854050d9fe6de115c6c346fcd9774c#diff-4edde0d5efc092a14e579fd0de312bdeR51
So, until go1.11 is published, some quick workarounds:
-fconstant-cfstring
flag from usb_darwin.go
and see if it compiles fine without it.CGO_LDFLAGS_ALLOW="-fconstant-cfstring"
env variable that should allow the above flag.
Hi I'm trying to get information about the connected serial devices using the serial.v1/enumerator library but I get the following error:
go build go.bug.st/serial.v1/enumerator: invalid flag in #cgo LDFLAGS: -fconstant-cfstrings
My sample code used which comes from the godoc documentation of the serial.v1 library (https://godoc.org/go.bug.st/serial.v1) is:
go env:
I tried the code in a Windows and Linux environment and I dont get the error. Has anybody encounter this issue?