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

Failed to install it on macOS Mojave #165

Closed
passos opened this issue Sep 28, 2018 · 2 comments
Closed

Failed to install it on macOS Mojave #165

passos opened this issue Sep 28, 2018 · 2 comments

Comments

@passos
Copy link

passos commented Sep 28, 2018

install it by following commands:

$ go get -u github.com/rjeczalik/notify
# github.com/rjeczalik/notify
../github.com/rjeczalik/notify/watcher_fsevents_cgo.go:10:10: fatal error: 'CoreServices/CoreServices.h' file not found
#include <CoreServices/CoreServices.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

$ go version
go version go1.11 darwin/amd64

macOS 10.14

if I clone the repo and build it

➜  notify git:(master) go build
go: finding golang.org/x/sys v0.0.0-20180926160741-c2ed4eda69e7
# github.com/rjeczalik/notify
./watcher_fsevents_cgo.go:10:10: fatal error: 'CoreServices/CoreServices.h' file not found
#include <CoreServices/CoreServices.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
➜  notify git:(master) ✗ go build -x
WORK=/var/folders/sl/pycwhjgs03s_8121kvbnly2h0000gn/T/go-build371896428
mkdir -p $WORK/b001/
cd /Users/simon/workspace/oss/notify
CGO_LDFLAGS='"-g" "-O2" "-framework" "CoreServices"' /usr/local/go/pkg/tool/darwin_amd64/cgo -objdir $WORK/b001/ -importpath github.com/rjeczalik/notify -- -I $WORK/b001/ -g -O2 ./watcher_fsevents_cgo.go
# github.com/rjeczalik/notify
./watcher_fsevents_cgo.go:10:10: fatal error: 'CoreServices/CoreServices.h' file not found
#include <CoreServices/CoreServices.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
@rjeczalik
Copy link
Owner

Try running sudo xcode-select -install and retry building notify.

@passos
Copy link
Author

passos commented Oct 2, 2018

@rjeczalik Thanks for the reply. I tried but it didn't work.

Finally I found the problem is I installed llvm by brew before. And it can't work with latest code. I remove it by brew uninstall llvm. then the go build use system version llvm and it works.

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

2 participants