fvwmorg / fvwm3

FVWM version 3 -- the successor to fvwm2
Other
505 stars 79 forks source link

When configured with `--disable-xft` fvwm3 fails to build. #667

Closed Kangie closed 2 years ago

Kangie commented 2 years ago

Upfront Information

1.0.4 / master

Gentoo

Linux monolith.home.footclan.ninja 5.18.1-gentoo-r2 #1 SMP PREEMPT_DYNAMIC Sat Jun 4 01:25:23 AEST 2022 x86_64 AMD Ryzen 9 5950X 16-Core Processor AuthenticAMD GNU/Linux

Expected Behaviour

What were you trying to do?

Build failures were reported through automation, tracked down to gentoo USE=truetype not being enabled for certain profiles / users.

I was able to replicate this issue and track it down to ./configure ... --disable-xft, which I am also able to replicate on master.

With this option set, the following error is received and the build fails.

FftInterface.h:23:9: error: unknown type name 'XftFont'

build-failure-git-master.txt

Actual Behaviour

What should have happened, but didn't?

The software should build!

Steps to Reproduce

git clone https://github.com/fvwmorg/fvwm3.git
cd fvwm3
/autogen.sh && ./configure --disable-xft && make -j
ThomasAdam commented 2 years ago

Hi @Kangie

Yes indeed. libxft is now a core dependency in the git version of fvwm3, but I neglected to remove the configure option for it.

Hence --disable-xft is now no longer needed as you must always have XFT installed.

I'll fix this shortly.

sdomi commented 6 months ago

heads up: on current master, if you invoke ./configure without libxft, it happily lists that you won't have anti-aliasing support, but it'll let you continue. This results in a similar include error like the 1st post.

ThomasAdam commented 6 months ago

Hi @sdomi

A patch would have been much more helpful. Does this help at all?

diff --git a/configure.ac b/configure.ac
index 9596ad38e..b093fdaca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -643,6 +643,11 @@ AH_TEMPLATE([HAVE_XFT_UTF8],[Define if Xft library can handle utf8 encoding])
 AC_SUBST(Xft_LIBS)
 AC_SUBST(Xft_CFLAGS)

+if test x"$with_xft" = "no" || test x"$with_fontconfig" = "xno" || \
+  test x"$have_freetype" = "xno"; then
+  AC_MSG_ERROR(["*** XFT/Fontconfig/Freetype not found. ***])
+fi
+
 # ********* xpm
 problem_xpm=": Xpm library or header not found"
sdomi commented 6 months ago

sorry, didn't have energy for figuring it out (and I thought that making a note here is better than not doing anything at all).

and your patch fixes it, yes :)