rjeczalik / notify

File system event notification library on steroids.
MIT License
902 stars 128 forks source link

Error installing notify #164

Open kmlroot opened 5 years ago

kmlroot commented 5 years ago

Hi,

I'm trying to install notify but it throws an error.

# github.com/rjeczalik/notify
ld: warning: text-based stub file /System/Library/Frameworks//CoreServices.framework/CoreServices.tbd and library file /System/Library/Frameworks//CoreServices.framework/CoreServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork.tbd and library file /System/Library/Frameworks//CFNetwork.framework/Versions/A/CFNetwork are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/Versions/A/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList.tbd and library file /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList are out of sync. Falling back to library file for linking.

Always it error is present trying to install quorum blockchain

I'm running on MacOS Sierra.

Regards,

Mauricio

rjeczalik commented 5 years ago

@fmauricios Do you have xcode command line tools installed? Looks like the issue may be with your toolchain. If not, could you please rerun build with -x flag and paste the output?

eranhr commented 5 years ago

Same problem here.

Error message:

../../vendor/github.com/rjeczalik/notify/watcher_fsevents_cgo.go:10:10: fatal error: 'CoreServices/CoreServices.h' file not found

include <CoreServices/CoreServices.h>

When reviewing the file watcher_fsevents_cgo.go (at 10:10) it seems that the #include <CoreServices/CoreServices.h> statement is commented, so why error about the #include statement?


1. // Copyright (c) 2014-2015 The Notify Authors. All rights reserved.
2. // Use of this source code is governed by the MIT license that can be
3. // found in the LICENSE file.
4. 
5. // +build darwin,!kqueue
6. 
7. package notify
8. 
9. /*
10. #include <CoreServices/CoreServices.h>
11. 
12. typedef void (*CFRunLoopPerformCallBack)(void*);
13. 
14. void gosource(void *);
15. void gostream(uintptr_t, uintptr_t, size_t, uintptr_t, uintptr_t, uintptr_t);
16. 
17. static FSEventStreamRef EventStreamCreate(FSEventStreamContext * context, uintptr_t info, CFArrayRef paths, FSEventStreamEventId since, CFTimeInterval latency, FSEventStreamCreateFlags flags) {
18.     context->info = (void*) info;
19.     return FSEventStreamCreate(NULL, (FSEventStreamCallback) gostream, context, paths, since, latency, flags);
20. }
21. 
22. #cgo LDFLAGS: -framework CoreServices
23. */
24. import "C"
25. 
26. import ( ...

Attached build output file xgo.zip

rjeczalik commented 5 years ago

@EranHr In CGO you put C code inside a comment. The problem here is missing or lacking xcode/SDK installation. Have you tried executing xcode-select --install?