You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly, systemfonts is a dependency of devtools but if there is an issue installing systemfonts, the described alternative is to install using devtools. New system, devtools doesn't exist yet, if it did I wouldn't have spent the last couple hours trying to get a font to work :)
g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I'/usr/lib/R/library/cpp11/include' -fpic -O2 -g -c caches.cpp -o caches.o
In file included from caches.h:6,
from caches.cpp:1:
FontDescriptor.h:7:10: fatal error: ft2build.h: No such file or directory
7 | #include <ft2build.h>
The following lets the install get further:
install.packages("systemfonts",configure.vars=c("INCLUDE_DIR='/usr/include/freetype2'"))
But then it still fails later:
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘systemfonts’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/usr/lib/R/library/00LOCK-systemfonts/00new/systemfonts/libs/systemfonts.so':
/usr/lib/R/library/00LOCK-systemfonts/00new/systemfonts/libs/systemfonts.so: undefined symbol: FcFontSetDestroy
[] freetype-2.13.2_1 Font rendering engine and library API
[] freetype-devel-2.13.2_1 Font rendering engine and library API - development files
I do have the freetype packages installed, and when I use font-manager the fonts show up (freetype is also a dependency of kde plasma, and firefox). I had been going down a long list and probably installed 40 other R packages on the machine that day, and have installed others since, but can't get this one installed. I even downloaded the source compiled it, which it compiled without errors:
have you tried updating fontconfig? FcFontSetDestroy is provided from that and if that is not available it could indicate some issue with that system library
I had a similar error, in that when installing systemfonts in a conda environment I was getting the same ft2build.h: No such file or directory error. The problem is that when running pkg-config --cflags fontconfig freetype2 there is an error that fontconfig requires expat, but expat was not installed. Instead of giving an error at that step, systemfonts creates an empty PKG_CFLAGS variable. I installed expat into the conda environment, and systemfonts was able to build and install. I think this same problem will occur if fontconfig, freetype2, or anything they depend on are missing.
I'm not sure of the exact problem in the configure file that prevents the pkg-config error from triggering the ERROR MESSAGE block.
Activity
brianlamere commentedon Apr 14, 2025
[] freetype-2.13.2_1 Font rendering engine and library API
[] freetype-devel-2.13.2_1 Font rendering engine and library API - development files
I do have the freetype packages installed, and when I use font-manager the fonts show up (freetype is also a dependency of kde plasma, and firefox). I had been going down a long list and probably installed 40 other R packages on the machine that day, and have installed others since, but can't get this one installed. I even downloaded the source compiled it, which it compiled without errors:
this netted a systemfonts.so file, but I couldn't manage the rest of a manual installation (since I didn't know what else to do)
thomasp85 commentedon Apr 23, 2025
have you tried updating fontconfig? FcFontSetDestroy is provided from that and if that is not available it could indicate some issue with that system library
JeffLessem-CU commentedon Jun 16, 2025
I had a similar error, in that when installing systemfonts in a conda environment I was getting the same
ft2build.h: No such file or directoryerror. The problem is that when runningpkg-config --cflags fontconfig freetype2there is an error that fontconfig requires expat, but expat was not installed. Instead of giving an error at that step, systemfonts creates an emptyPKG_CFLAGSvariable. I installed expat into the conda environment, and systemfonts was able to build and install. I think this same problem will occur if fontconfig, freetype2, or anything they depend on are missing.I'm not sure of the exact problem in the
configurefile that prevents thepkg-configerror from triggering the ERROR MESSAGE block.