fontfor icon indicating copy to clipboard operation
fontfor copied to clipboard

dyld: Library not loaded: /usr/local/opt/fontconfig/lib/libfontconfig.1.dylib

Open xcodebuild opened this issue 4 years ago • 2 comments

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 

xcodebuild avatar May 20 '20 09:05 xcodebuild

brew install fontconfig

fix this for me

xcodebuild avatar May 20 '20 09:05 xcodebuild

Yes, on macOS you need to install fontconfig to run it.

it's because:

  1. servo/libfontconfig will dynamic link when decete fontconfig installed in system.
  2. 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.

7sDream avatar May 20 '20 09:05 7sDream

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.

7sDream avatar Nov 13 '23 15:11 7sDream