Open vrmiguel opened 1 year ago
For libmagic.dylib
there's #30 which I didn't get to merge yet.
As for why libmagic
is not found with just cargo build
I'm not sure. I don't have a Mac, so can't really test how Brew behaves, especially on arm64. I can experiment by using GitHub Actions for this (see .github/workflows/mac.yml
) but this is a bit cumbersome.
Can you check if the Brew directories are included in the default ld
library paths?
The undefined symbols might be solved with using pkg-config
, see #1
Could you check whether Brew installed a libmagic.pc
or such and post it?
This might be a similar case as https://github.com/robo9k/rust-magic-sys/pull/16#issuecomment-949094327 and https://github.com/robo9k/rust-magic-sys/pull/30#issuecomment-1337537973
Could you elaborate why you got your own wizardry
binding instead of using the/my magic
crate?
Hey there! I'm trying to use
magic-sys
on an app of mine but I'm having some issues compiling on macOSVersions
and
magic-sys
0.3.0Build outputs
When running
cargo build
When running
MAGIC_DIR=/opt/homebrew/Cellar/libmagic/5.44/lib MAGIC_STATIC=false cargo run
It seems
build.rs
still only looks forlibmagic.so
instead oflibmagic.dylib
on macOS, which causes the build to fail, despite #32If I go to
/opt/homebrew/Cellar/libmagic/5.44/lib
and symlinklibmagic.dylib
tolibmagic.so
then it works correctlyWhen running
MAGIC_DIR=/opt/homebrew/Cellar/libmagic/5.44/lib MAGIC_STATIC=true cargo run