Skip to content

dependency loop for install #126

Open

Description

@brianlamere

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

Activity

  1. brianlamere commented on Apr 14, 2025

    @brianlamere
    Author

    [] 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:

      550  g++ -std=gnu++17 -shared -L/usr/lib64/R/lib -o systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_local.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_outlines.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o unix/FontManagerLinux.o -L -lfontconfig -lfreetype -L/usr/lib64/R/lib -lR
      551  g++ -std=gnu++17 -shared -L/usr/lib64/R/lib -o systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_local.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_outlines.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o unix/FontManagerLinux.o -L -lfontconfig -lfreetype -L/usr/lib64/R/lib -lR
      552  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c caches.cpp -o caches.o
      553  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c cpp11.cpp -o cpp11.o
      554  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c dev_metrics.cpp -o dev_metrics.o
      555  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c font_matching.cpp -o font_matching.o
      556  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c font_local.cpp -o font_local.o
      557  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c font_registry.cpp -o font_registry.o
      558  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c ft_cache.cpp -o ft_cache.o
      559  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c string_shape.cpp -o string_shape.o
      560  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c font_metrics.cpp -o font_metrics.o
      561  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c font_outlines.cpp -o font_outlines.o
      562  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c font_fallback.cpp -o font_fallback.o
      563  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c string_metrics.cpp -o string_metrics.o
      564  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c emoji.cpp -o emoji.o
      565  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c cache_store.cpp -o cache_store.o
      566  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c init.cpp -o init.o
      567  g++ -std=gnu++17 -I"/usr/lib64/R/include" -DNDEBUG -I/usr/include/freetype2  -I'/usr/lib/R/library/cpp11/include'     -fpic  -O2 -g  -c unix/FontManagerLinux.cpp -o unix/FontManagerLinux.o
      568  g++ -std=gnu++17 -shared -L/usr/lib64/R/lib -o systemfonts.so caches.o cpp11.o dev_metrics.o font_matching.o font_local.o font_registry.o ft_cache.o string_shape.o font_metrics.o font_outlines.o font_fallback.o string_metrics.o emoji.o cache_store.o init.o unix/FontManagerLinux.o -L -lfontconfig -lfreetype -L/usr/lib64/R/lib -lR
    

    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)

  2. thomasp85 commented on Apr 23, 2025

    @thomasp85
    Member

    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

  3. JeffLessem-CU commented on Jun 16, 2025

    @JeffLessem-CU

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions