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

gow requires to have Xcode pre-installed? #15

Open
aslom opened this issue Mar 24, 2021 · 4 comments
Open

gow requires to have Xcode pre-installed? #15

aslom opened this issue Mar 24, 2021 · 4 comments

Comments

@aslom
Copy link

aslom commented Mar 24, 2021

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
@mitranim
Copy link
Owner

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.

@aslom
Copy link
Author

aslom commented Mar 24, 2021

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

@aslom
Copy link
Author

aslom commented Mar 24, 2021

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 😱 😨

@mitranim
Copy link
Owner

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. 🙂

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