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

Cannot build from source #58

Closed
matthew-gill opened this issue Dec 18, 2018 · 2 comments

Comments

@matthew-gill
Copy link

commented Dec 18, 2018

Hey @havoc-io I'm wanting to test out the changes you made for conflict resolution. I believe I need to compile from source?

I've ran
go generate ./pkg/... (which seemed to run successfully)
However:
go run scripts/build.go

Causes a bunch of errors, ending with:

In file included from /usr/local/include/stdbool.h:4:
In file included from /usr/local/include/stdbool.h:4:
/usr/local/include/stdbool.h:4:10: error: #include nested too deeply
#include <stdbool.h>
         ^
In file included from ../../go/pkg/mod/github.com/havoc-io/fsevents@v0.0.0-20180903111129-10556809b434/wrap.go:7:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:65:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/FSEvents.framework/Headers/FSEvents.h:26:
/usr/local/include/Block.h:16:3: error: Never include this file directly. Use <lzma.h> instead.
#       error Never include this file directly. Use <lzma.h> instead.
        ^
13 errors generated.

Any ideas?
Also, it would be great to get a new --devel release up so I wouldn't need to compile. Any chance?

@matthew-gill

This comment has been minimized.

Copy link
Author

commented Dec 19, 2018

Strange one which I ended up fixing. This was a new Macbook where I migrated my old content over. The solution described here fixed it : golang/go#25240 (comment)

@havoc-io

This comment has been minimized.

Copy link
Collaborator

commented Jan 4, 2019

Glad you were able to sort this out. CGO can be a pain, especially on macOS where Apple seems keen on changing the SDK structure and behavior with every release.

With Go 1.11 and 1.12, they've switched all of the macOS syscall implementations to route through libsystem_kernel.dylib and libSystem.dylib, just as they do on other kernels without a stable syscall ABI. I've been wanting to look into the mechanism that they're using for this and trying to adapt the github.com/fsnotify/fsevents package to use this mechanism instead of cgo, though I'm not sure if it's as flexible as the syscall package on (e.g.) Windows. It would negate the need for cgo though, and then we could disable it like we do on all other platforms. This would also have the nice side effect of allowing full Mutagen compilation from any platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.