0

I need to build the Linux library fontconfig from source and bundle the libfontconfig.so along with an application's bin folder.

When building from source, I add a prefix directory during configure in order to install it in a specific directory. The installation contains a prefix/etc/fonts/fonts.conf file whose path is being hardcoded into the libfontconfig.so (I think so, maybe wrong).

So, when I copy the so file to a different folder in my application's bin folder to be bundled, it errors out saying "Fontconfig error: cannot load default config file" since the place where the application is running no longer has access to the directory where I installed fontconfig.

Now, I know that I can add "--sysconfdir=\etc" so that the .so file would use the host machine's fonts.conf file automatically. However, this is not a solution for me since it requires sudo access to install files in /etc folder and I cannot provide that.

Is there any other way where I can make the .so file to use the host machine's /etc/fonts/font.conf file?

Thanks in advance!

0 Answers0