<div dir="ltr">Hi again,<div><br></div><div>I wanted to give an update. I decided to use the other approach (using the PKG_CONFIG_PATH environment variable). I was able to compile fontconfig using that environment variable. So it seems that there is an issue with using the other approach that gets recommended.</div><div><br></div><div>-Antelmo</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 13, 2018 at 1:42 PM, Antelmo Aguilar <span dir="ltr"><<a href="mailto:aaguilar@nd.edu" target="_blank">aaguilar@nd.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>After doing the make command, it complained that it was unable to find the ft2build.h file. More specifically, it gave me this error:</div><div><br></div><div><div>make[3]: Entering directory `/opt/test_build/fontconfig/<wbr>src/fontconfig-2.13.0/src'</div><div> CC fcfreetype.lo</div><div>In file included from fcftint.h:26:0,</div><div> from fcfreetype.c:48:</div><div>../fontconfig/fcfreetype.h:27:<wbr>22: fatal error: ft2build.h: No such file or directory</div><div> #include <ft2build.h></div><div> ^</div><div>compilation terminated.</div></div><div><br></div><div><br></div><div>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).</div><div><br></div><div>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: <a href="https://pastebin.com/2WzyVrTx" target="_blank">https://pastebin.com/<wbr>2WzyVrTx</a></div><div><br></div><div>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. <br><br>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: <a href="https://pastebin.com/bHyeFCh5" target="_blank">https://pastebin.com/bHyeFCh5</a><wbr> </div><div><br></div><div>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. </div><div><br></div><div>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.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Antelmo</div></font></span></div>
</blockquote></div><br></div>