-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
Env:
go version go1.19 darwin/arm64
OS: macOS Monterey 12.5
I've previously installed Pistol on OS 11.6/Intel with no issues, but on a new machine I'm unable to install or build it.
Steps:
$ brew install libmagic
...
(installation succeeds)
$ brew link libmagic
Already linked: /opt/homebrew/Cellar/libmagic/5.42
$ go install github.com/doronbehar/pistol/cmd/[email protected]
../../go/pkg/mod/github.com/doronbehar/[email protected]/magicmime.go:28:11: fatal error: 'magic.h' file not found
$ CGO_CFLAGS="-I${HOMEBREW_PREFIX}/Cellar/libmagic/5.42/include" go install github.com/doronbehar/pistol/cmd/[email protected]
/opt/homebrew/Cellar/go/1.19/libexec/pkg/tool/darwin_arm64/link: running clang failed: exit status 1
ld: library not found for -lmagic
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I get the last error (ld: library not found for -lmagic) when attempting to build from source, as well.
I'm mostly posting this in case other OS X users run into it -- the problem seems to be with libmagic, and I suspect you're unable to help troubleshoot OS X anyway :)
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed