fontfor
fontfor copied to clipboard
dyld: Library not loaded: /usr/local/opt/fontconfig/lib/libfontconfig.1.dylib
Steps:
- Download binary for macOS from https://github.com/7sDream/fontfor/releases/tag/v0.3.0
-
chmod +x fontfor-macOS
-
./fontfor-macOS
Got error:
dyld: Library not loaded: /usr/local/opt/fontconfig/lib/libfontconfig.1.dylib
Referenced from: /Users/xcodebuild/Downloads/fontfor-macOS
Reason: image not found
[1] 75413 abort
brew install fontconfig
fix this for me
Yes, on macOS you need to install fontconfig
to run it.
it's because:
-
servo/libfontconfig will dynamic link when decete
fontconfig
installed in system. - And after check the makefile of that crate, I notice that on macOS, when
fontconfig
is not installed, which means it should build a static library by itself and static link to it, but actuly it doesn't compile anything.
So on macOS, we can only install fontconfig in compile docker and use dynamic link to do a successful build. I will open a issue to discuss this behavior.
I think #58 makes this not a problem anymore.
Can be tested by download macOS binary from https://github.com/7sDream/fontfor/actions/runs/6852170331#artifacts and see if it runs/works without any dependencies installed.