Hello,
I am having issues compiling the latest version of Fontconfig from source in a Red Hat 7 system. I am unsure where the issue is exactly, but I suspect that for some reason the FREETYPE_LIBS and FREETYPE_CFLAGS environment variables are not being used correctly.
I compiled Freetype 2.9 by source and installed it on both a custom directory and the default directory. Using the environment variables to specify the location of freetype did allow the configuration script to find freetype. At first I did not pay attention to the lines after the configuration script said it did find freetype so I continued with the "make" command once the configuration was done.
After doing the make command, it complained that it was unable to find the ft2build.h file. More specifically, it gave me this error:
make[3]: Entering directory `/opt/test_build/fontconfig/src/fontconfig-2.13.0/src'
CC fcfreetype.lo
In file included from fcftint.h:26:0,
from fcfreetype.c:48:
../fontconfig/fcfreetype.h:27:22: fatal error: ft2build.h: No such file or directory
#include <ft2build.h>
^
compilation terminated.
From my logic, I would have assumed that the FREETYPE_CFLAGS environment variable would tell fontconfig where to find the ft2build.h (which I double checked the directory I set in that variable and it did indeed contain the header file fontconfig was complaining it could not find).
So I found a workaround for fontconfig to find the "missing" header file by using the CPPFLAGS environment variable to also contain the include directory for Freetype. This allowed the compilation to continue, but then it gave an error again. This pastebin is an example of the output from make when I received that error: https://pastebin.com/2WzyVrTx
As you can see, "make" gives several linking warnings which I suspect is what causes the undefined reference error in the end. The undefined references are from functions that are defined in the Freetype library and I was able to verify that they are there using the "nm" command.
So I really have no idea why fontconfig is unable to link the freetype library to find these functions. Also, here is a pastebin of the configuration output: https://pastebin.com/bHyeFCh5
So I really have no idea why fontconfig is unable to link the freetype library to find these functions. Also, here is a pastebin of the configuration output: https://pastebin.com/bHyeFCh5
I had mentioned that I did not pay attention to the lines after the configuration script said it found Freetype. While I was diagnosing the issue, I noticed that the configuration script was also unable to find the Freetype functions that it checks for even though they are defined in the library file of Freetype.
Hopefully someone can help point out what I might be doing wrong, but so far it seems that there might be an issue with the configuration script. Thanks in advance.
-Antelmo
_______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/fontconfig