keybase / go-notifier

go-notifier: Cross platform system notifications in go (golang)
MIT License
58 stars 18 forks source link

issue building: invalid flag in #cgo LDFLAGS: -sectcreate #3

Open tmc opened 5 years ago

tmc commented 5 years ago
~/go/src/github.com/keybase/go-notifier(master) $ go build
go build github.com/keybase/go-notifier: invalid flag in #cgo LDFLAGS: -sectcreate
~/go/src/github.com/keybase/go-notifier(master) $ go version
go version go1.11.1 darwin/amd64

MacOS version: 10.13.6 (17G2307)

AaronOmanLendesk commented 5 years ago

I'm seeing this too.

↳ go install github.com/keybase/go-notifier/notifier
go build github.com/keybase/go-notifier: invalid flag in #cgo LDFLAGS: -sectcreate

↳ go version
go version go1.11.1 darwin/amd64

↳ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 10.14 (18A391)
      Kernel Version: Darwin 18.0.0
      <snip>
advdv commented 4 years ago

Me too, please advise

go version go1.13.3 darwin/amd64
macOS 10.14.6

I tried the workaround here: https://forum.golangbridge.org/t/invalid-flag-in-cgo-ldflags/10020 but that results in a whole bunch of this:

# github.com/keybase/go-notifier
../../../../pkg/mod/github.com/keybase/go-notifier@v0.0.0-20160519183414-17405ab3fd75/corefoundation.go:25:9: cannot convert nil to type _Ctype_CFTypeRef
../../../../pkg/mod/github.com/keybase/go-notifier@v0.0.0-20160519183414-17405ab3fd75/corefoundation.go:34:3: cannot use nil as type _Ctype_CFDataRef in return argument
../../../../pkg/mod/github.com/keybase/go-notifier@v0.0.0-20160519183414-17405ab3fd75/corefoundation.go:40:26: cannot use nil as type _Ctype_CFAllocatorRef in argument to _Cfunc_CFDataCreate
../../../../pkg/mod/github.com/keybase/go-notifier@v0.0.0-20160519183414-17405ab3fd75/corefoundation.go:41:12: cannot convert nil to type _Ctype_CFDataRef
../../../../pkg/mod/github.com/keybase/go-notifier@v0.0.0-20160519183414-17405ab3fd75/corefoundation.go:42:3: cannot use nil as type _Ctype_CFDataRef in return argument
../../../../pkg/mod/github.com/keybase/go-notifier@v0.0.0-20160519183414-17405ab3fd75/corefoundation.go:66:47: cannot use nil as type _Ctype_CFAllocatorRef in assignment
../../../../pkg/mod/github.com/keybase/go-notifier@v0.0.0-20160519183414-17405ab3fd75/corefoundation.go:67:12: cannot convert nil to type _Ctype_CFDictionaryRef
../../../../pkg/mod/github.com/keybase/go-notifier@v0.0.0-20160519183414-17405ab3fd75/corefoundation.go:68:3: cannot use nil as type _Ctype_CFDictionaryRef in return argument
../../../../pkg/mod/github.com/keybase/go-notifier@v0.0.0-20160519183414-17405ab3fd75/corefoundation.go:79:88: cannot convert &(*_cgoIndex2)[0] (type *_Ctype_CFTypeRef) to type *unsafe.Pointer
../../../../pkg/mod/github.com/keybase/go-notifier@v0.0.0-20160519183414-17405ab3fd75/corefoundation.go:79:59: cannot convert &(*_cgoIndex1)[0] (type *_Ctype_CFTypeRef) to type *unsafe.Pointer
../../../../pkg/mod/github.com/keybase/go-notifier@v0.0.0-20160519183414-17405ab3fd75/corefoundation.go:79:88: too many errors