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

linkname errors breaking source build #34

Open
ecarew opened this issue Jul 8, 2022 · 3 comments
Open

linkname errors breaking source build #34

ecarew opened this issue Jul 8, 2022 · 3 comments
Labels
help wanted Extra attention is needed version-breaking

Comments

@ecarew
Copy link

ecarew commented Jul 8, 2022

I have go version go1.18.3 darwin/amd64 on Monterey 12.4 and just replicated this repo then ran make. I got the following errors:

golang.org/x/sys/unix

../../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:43:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:59:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:75:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:90:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:105:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:121:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:136:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:151:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:166:3: //go:linkname must refer to declared function or variable
../../../go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:166:3: too many errors

github.com/getlantern/systray

systray_darwin.m:128:22: warning: 'NSOnState' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
systray_darwin.m:9:33: note: expanded from macro 'NSControlStateValueOn'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:353:34: note: 'NSOnState' has been explicitly marked deprecated here
systray_darwin.m:130:22: warning: 'NSOffState' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
systray_darwin.m:5:34: note: expanded from macro 'NSControlStateValueOff'
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSCell.h:352:34: note: 'NSOffState' has been explicitly marked deprecated here

github.com/robotn/gohook

In file included from ../../../go/pkg/mod/github.com/robotn/[email protected]/hook.go:22:
In file included from ../../../go/pkg/mod/github.com/robotn/[email protected]/event/goEvent.h:18:
In file included from ../../../go/pkg/mod/github.com/robotn/[email protected]/event/pub.h:15:
../../../go/pkg/mod/github.com/robotn/[email protected]/event/../hook/darwin/hook_c.h:619:25: warning: cast to smaller integer type 'uint16_t' (aka 'unsigned short') from 'CFDataRef' (aka 'const struct __CFData *') [-Wpointer-to-int-cast]
../../../go/pkg/mod/github.com/robotn/[email protected]/event/../hook/darwin/hook_c.h:620:26: warning: cast to smaller integer type 'uint16_t' (aka 'unsigned short') from 'CFDataRef' (aka 'const struct __CFData *') [-Wpointer-to-int-cast]
make: *** [build] Error 2

@prashantgupta24
Copy link
Owner

:( Yeah I haven't built this app for a while now, was expecting to break with the latest go versions... Contributions are more than welcome btw! Also there's the pre-built package added to releases if you just want to use the app

@prashantgupta24 prashantgupta24 added help wanted Extra attention is needed version-breaking labels Jul 13, 2022
@ladmini
Copy link

ladmini commented Nov 10, 2022

@prashantgupta24
Hey prashanta, Amazing software thanks a lot!
Same error here. go1.19.3 + mac os 12.6 (21G115) with M1 chip. Is there an update plan?

@prashantgupta24
Copy link
Owner

@ladmini Thank you!

I haven't tried building it for an M1 yet, though this PR is trying to do it: #37

Any help would be appreciated! Meanwhile I just use the prebuilt binary and use it on my M1 using Rosetta emulator (works well)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed version-breaking
Projects
None yet
Development

No branches or pull requests

3 participants