This issue also applies to app-text/ttf2pk2-2.0_p20230311::tex-overlay. From 'build.log' host headers are being used: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./include -I/usr/include/freetype2 -DHAVE_LIBKPATHSEA -Wimplicit -Wreturn-type -march=native -O2 -pipe -c -o errormsg.o errormsg.c And host libraries are being used: /storage/strogdon/gentoo-rap/bin/bash ./libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -Wimplicit -Wreturn-type -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed -o ttf2pk errormsg.o filesrch.o ftlib.o ligkern.o newobj.o parse.o subfont.o texenc.o ttfenc.o pklib.o ttf2pk.o ttflib.o -lkpathsea -L/usr/lib/x86_64-linux-gnu -lfreetype -lz -lpng12 -lz -lm /storage/strogdon/gentoo-rap/bin/bash ./libtool --tag=CC --mode=link x86_64-pc-linux-gnu-gcc -Wimplicit -Wreturn-type -march=native -O2 -pipe -Wl,-O1 -Wl,--as-needed -o ttf2tfm errormsg.o filesrch.o ftlib.o ligkern.o newobj.o parse.o subfont.o texenc.o ttfenc.o case.o tfmaux.o ttf2tfm.o ttfaux.o vplaux.o -lkpathsea -L/usr/lib/x86_64-linux-gnu -lfreetype -lz -lpng12 -lz -lm I suspect that on Gentoo the search for 'freetype-config' should be disabled. From the configure file there is --with-system-freetype2 use installed freetype2 headers and library (requires freetype-config) If I move freetype-config out of the way 'ttf2pk2' is configured correctly and it builds.
Created attachment 885088 [details] build.log
Instead, we need to help it find our ft2, not use a bundled one. Ideally by just making it use pkg-config.