WARNING: could not find the required Xft headers and/or libraries

149 views
Skip to first unread message

David F.

unread,
Jun 28, 2022, 7:16:36 PM6/28/22
to fltk.general
Hello,

I upgraded from Debian Jessie to Buster.  I'm using a customized 1.4 branch.  I rebuilt the library and built my application.  I noticed scaling wasn't working.  So I see something about needing USE_XFT for it to work.   I then changed the config.log and found the:

WARNING: could not find the required Xft headers and/or libraries

configure:7725: checking for freetype-config
configure:7758: result: no
configure:7867: WARNING: could not find the required Xft headers and/or libraries.
configure:7869: please install Xft headers and libraries or use 'configure --disable-xft'.
configure:8017: checking for X11/extensions/Xdbe.h
configure:8017: gcc -c    conftest.c >&5
configure:8017: $? = 0
configure:8017: result: yes


So I tried:  apt-get install libxft-dev  (said already installed, so uninstall then install again).

But it still says the Xft headers and/or libraries don't exist.

While in the log built with Jessie I see:

configure:7536: checking for freetype-config
configure:7554: found /usr/bin/freetype-config
configure:7566: result: /usr/bin/freetype-config
configure:7579: checking for FcPatternCreate in -lfontconfig
configure:7604: gcc -o conftest   -I/usr/include/freetype2    conftest.c -lfontconfig  -lXinerama -lpthread -ldl -lm  -lX11  >&5
configure:7604: $? = 0
configure:7613: result: yes
configure:7624: checking X11/Xft/Xft.h usability
configure:7624: gcc -c   -I/usr/include/freetype2  conftest.c >&5
configure:7624: $? = 0
configure:7624: result: yes
configure:7624: checking X11/Xft/Xft.h presence
configure:7624: gcc -E -I/usr/include/freetype2  conftest.c
configure:7624: $? = 0
configure:7624: result: yes
configure:7624: checking for X11/Xft/Xft.h
configure:7624: result: yes

Any hint on what I'm supposed to install so scaling will work again?

Thanks!!

David F.

unread,
Jun 28, 2022, 7:49:41 PM6/28/22
to fltk.general
You can get around one issue with:

ln -s /usr/bin/pkg-config /usr/bin/freetype-config

Now I'm getting:

/usr/include/X11/Xft/Xft.h:39:10: fatal error: ft2build.h: No such file or directory

But the libfreetype6-dev is already installed too which I guess is where ft2build.h comes from?

David F.

unread,
Jun 28, 2022, 8:06:02 PM6/28/22
to fltk.general
Actually the problem was the freetype-config.  I tried this and it worked:

#!/bin/sh
exec pkg-config freetype2 "$@"

Albrecht Schlosser

unread,
Jun 29, 2022, 8:34:39 AM6/29/22
to fltkg...@googlegroups.com
On 6/29/22 01:16 David F. wrote:
I upgraded from Debian Jessie to Buster.  I'm using a customized 1.4 branch.

How old is your customized branch? This is very likely the culprit (see below).


I rebuilt the library and built my application.  I noticed scaling wasn't working.  So I see something about needing USE_XFT for it to work.   I then changed the config.log and found the:

WARNING: could not find the required Xft headers and/or libraries

configure:7725: checking for freetype-config
configure:7758: result: no

The freetype developers removed freetype-config and we followed this step to use pkg-config first and then, only if it doesn't find freetype, fall back to the old freetype-config (assuming that the running system is older than the above change).


Any hint on what I'm supposed to install so scaling will work again?

I suggest to upgrade your customized FLTK 1.4 branch to a newer state, then this ought to work again (if my assumption is correct that your version is older).

Or you could try to pick the changes from this commit from Jan. 2019:

commit 669f159665b04a3bf9c2dbbe9db71b59a45e46c2
Date:   Wed Jan 30 17:58:22 2019 +0100

     Fix for STR#3473 (and its duplicate STR#3507)
    
    Recent Linux distribution have replaced the freetype-config command
    by pkg-config. The fix tries the new procedure with pkg-config and
    falls back to freetype-config if the new procedure fails.

[end of commit log]

David F.

unread,
Aug 2, 2022, 2:49:39 AM8/2/22
to fltk.general
yes it's a bit older, I had all those STR's I added years ago (as one big patch) that you implemented in a different way so it makes trying to catch up a bit tough, I have one branch updated but doesn't have ./configure or  anything for some reason, i was using it to test on windows.  maybe I'll try to catch up when this chaos stops...
Reply all
Reply to author
Forward
0 new messages