Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.5
-
None
-
Linux, cross-compiling x86 -> ARM
-
28c0b26fb7a6d33670d3ad523562aa11dcd40d35
Description
I'm trying to cross-compile Qt and use "-force-pkg-config -system-freetype". The host system does not have freetype headers, so I end up with:
In file included from ../../include/QtGui/private/../../../src/gui/text/qfontengine_qpf_p.h:62:0, from ../../include/QtGui/private/qfontengine_qpf_p.h:1, from embedded/qwindowsystem_qws.cpp:83: ../../include/QtGui/private/../../../src/gui/text/qfontengine_ft_p.h:58:22: fatal error: ft2build.h: No such file or directory
This is because config.tests/unix/freetype/freetype.pri does not care for pkg-config at all and has no case for cross-compiling, so the headers are not found. I have a brute-force patch attached that I use to tell it to do the right this.
I think this is still incomplete: whoever uses freetype sets LIBS += -lfreetype (or LIBS_PRIVATE), which should instead use the information returned by pkg-config first. I can't simply use link_pkgconfig in my patch because that would insert freetype into LIBS instead of LIBS_PRIVATE e.g. for src/gui/text/. I could upload that patch to gerrit but I'm unsure if this is the correct approach at all.
Attachments
Issue Links
- relates to
-
QTBUG-37871 Failed to build with "-system-freetype"
- Closed
-
QTBUG-54911 New configure uses host freetype when cross compiling
- Closed