gow requires to have Xcode pre-installed?
aslom opened this issue · 4 comments
Add to instllation as requirement?
https://github.com/mitranim/gow#installation
go get -u github.com/mitranim/gow
# github.com/mitranim/gow
/usr/local/Cellar/go/1.16/libexec/pkg/tool/darwin_amd64/link: /usr/local/Cellar/go/1.16/libexec/pkg/tool/darwin_amd64/link: running strip failed: signal: abort trap
dyld: Library not loaded: @rpath/libcodedirectory.dylib
Referenced from: /Library/Developer/CommandLineTools/usr/bin/strip
Reason: image not found
$ ls -l /usr/local/lib/libcodedirectory.dylib
ls: /usr/local/lib/libcodedirectory.dylib: No such file or directory
Not sure if required... Both dependencies (github.com/rjeczalik/notify
and golang.org/x/sys/unix
) use C in Darwin builds, but MacOS should ship with the required tools installed (?). Unfortunately I'm not sufficiently familiar with C-based tools to tell what's happening here, or which dependency is causing this.
gow
uses only a handful of constants from golang.org/x/sys/unix
. If this is the cause, we could copy the constants to gow
and remove the dependency. Perhaps, if you have spare time, you could do that and see if it builds? Apologies for offloading, but I'd have to seriously mess with my system to test this.
I have installed latest Xcode and linked dylib and gow instllation succeeded:
$ ln -s /Applications/Xcode.app/Contents//Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libcodedirectory.dylib /usr/local/lib/libcodedirectory.dylib
$ ls -l /usr/local/lib/libcodedirectory.dylib
lrwxr-xr-x 1 aslom staff 110 Mar 24 10:34 /usr/local/lib/libcodedirectory.dylib -> /Applications/Xcode.app/Contents//Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libcodedirectory.dylib
$ go get -u github.com/mitranim/gow
$ gow version
go version go1.16 darwin/amd64
My ask was only to document what are requirements in case somebody else runs into the same problem hopefully that helps.
I do not know anything about golang.org/x/sys/unix or how to test it :( I expect C-based tools may be complex and frustrating to get tests 😱 😨
Good to know. I might debug this properly when setting up the next machine (in months / years). For now, I'll probably try to drop one dependency as described above, and also document it as you suggested. Thanks for the notification. 🙂