r-lib / textshaping

Bindings to the HarfBuzz library for Text Shaping
Other
17 stars 8 forks source link

ld: library 'freetype' not found #39

Closed rayms closed 7 months ago

rayms commented 7 months ago

I'm trying to install textshaping and I receive the following:

* installing *source* package ‘textshaping’ ... ** package ‘textshaping’ successfully unpacked and MD5 sums checked ** using staged installation Homebrew 4.2.16 Using PKG_CFLAGS=-I/opt/homebrew/include/freetype2 -I/opt/homebrew/include/harfbuzz -I/opt/homebrew/include/glib-2.0 -I/opt/homebrew/include/fribidi Using PKG_LIBS=-lfreetype -lharfbuzz -lfribidi -lpng ** libs using C++ compiler: ‘Apple clang version 15.0.0 (clang-1500.3.9.4)’ using C++11 using SDK: ‘MacOSX14.4.sdk’

And this error message:

ld: library 'freetype' not found clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [textshaping.so] Error 1 ERROR: compilation failed for package ‘textshaping’ * removing ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/textshaping’ Warning message: In i.p(...) : installation of package ‘/var/folders/1b/y12ldbh94x7gtz83wmfttt3h002dnq/T//Rtmp49sCQG/remotes77631af47523/textshaping’ had non-zero exit status

I have reinstalled freetype, harfbuzz, and fribidi using homebrew to no avail. Any advice?

rayms commented 7 months ago

I resolved this by manually setting the PKG_CONFIG_PATH to where the freetype2.pc was located.