Opened 6 years ago

Closed 6 years ago

#10807 closed defect (fixed)

CONFIGURE: FreeType detection fails on automatic re-run of configure script

Reported by: eriktorbjorn Owned by: bgK
Priority: normal Component: Common
Version: Keywords:
Cc: Game:


This happens for me under Debian with the current Git version of ScummVM.

Whenever the configuration script is updated, and I type "make" it will automatically re-run the configuration script:

$ make
Running ./configure with the last specified parameters


Checking for FreeType2... no


WARNING: Disabling engine Z-Vision because the following dependencies are unmet: FreeType2

Looking at config.log, I can see that the FreeType test program failed to compile:

g++ -fuse-ld=gold -Wl,--gdb-index   -ansi -W -Wno-unused-parameter -Wno-empty-body -g -gsplit-dwarf -fvar-tracking-assignments -pedantic -Wno-long-long  ./scummvm-conf.cpp -o ./scummvm-conf 
./scummvm-conf.cpp:1:10: fatal error: ft2build.h: No such file or directory
 #include <ft2build.h>
compilation terminated.
return code: 1

If I run the configure script manually and check that part of the log, it says:

g++ -fuse-ld=gold -Wl,--gdb-index   -ansi -W -Wno-unused-parameter -Wno-empty-body -g -gsplit-dwarf -fvar-tracking-assignments -pedantic -Wno-long-long  ./scummvm-conf.cpp -o ./scummvm-conf -I/usr/include/freetype2 -I/usr/include/libpng16 -lfreetype
return code: 0

So for some reason, some compiler flags were missing the first time around. I do not know what causes this.

Change History (3)

comment:1 by digitall, 6 years ago

Could this be related to i.e. pkg-config vs. freetype-config ?

comment:2 by bgK, 6 years ago

Yes, it's related to this PR. We now define PKG_CONFIG_LIBDIR when automatically running configure, so that its value is saved between runs (useful for the cross-compilation case). There are two main implementations of pkg-config. The one from and the one from The one from github ignores PKG_CONFIG_LIBDIR when it is empty and uses the system .pc lookup directories. The one from fd.o does not and uses an empty search path...
We probably need not to set PKG_CONFIG_LIBDIR when the saved value is empty, or something like that.

comment:3 by bgK, 6 years ago

Owner: set to bgK
Resolution: fixed
Status: newclosed

This should be fixed by commit 8efe46d. However since my system uses the variant of pkg-config that was not affected by the issue, please reopen if it does not work as intended.

Note: See TracTickets for help on using tickets.