mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] MXE, Shared QT builds, and Freetype


From: Mark Brand
Subject: Re: [Mingw-cross-env-list] MXE, Shared QT builds, and Freetype
Date: Tue, 26 Feb 2013 13:53:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 SeaMonkey/2.16

Jeremy Salwen wrote:
Hi all,

I'm looking to build a shared version of QT based on the MXE setup. I've actually made quite a bit of progress, and I've been able to convert all of the required packages for qtbase into shared builds that compile and install correctly. If I get it working, I'll put the changes up on github.

This topic has come up from time to time on the mailing list. You might want to search the archives for previous discussions.


However, when I try to compile a shared build of qtbase, I get errors resolving symbols in libfreetype (see the attached build log). From what I can tell, qt is simply forgetting to add the flag -lfreetype when compiling qwindows.dll , as qbasicfontdatabase.cpp (which compiles into qwindows.ll) uses functions defined in libfreetype. Unfortunately, the ./configure script seems to be oblivious of any options involving freetype, and greets -no-freeetype -system-freetype, and -qt-freetype with the same "invalid command-line switch".

When I asked in the QT IRC channel, I was questioned why I was building QT on windows with freetype, which I'm not sure about. Why does MXE build QT with freetype?
First some background:
MXE uses qtbase's configure script, rather than configure.exe which is specifically for Windows. The configure script lacks the 'freetype' options that configure.exe has. The configure script uses the "system" freetype library if found. In our case, it is found in the MXE "system". The configure script also needs to find fontconfig before finding freetype. As far as I can tell, fontconfig isn't even used for Windows, but we have fontconfig as a fake dependency just to make this work.

Your main question is why -lfreetype is missing when linking qwindows.dll in a shared Qt build with "system-freetype". I think the problem is an upstream problem. It looks to me like -freetype is not added by the Qt build system except in combination with fontconfig.

MXE has a patch for qtbase to use pkgconfig for freetype. This fixed the problem for our static builds, but as you've discovered, not for shared ones. I see now that the change can be applied in a better place that works for both. Please try it out. The change is in commit 2d29cafd2df.

Alternatively, you could build without "system freetype", maybe by not building it in MXE so configure won't detect it. I'm not sure if that will give you "no freetype" or "qt (bundled) freetype". Otherwise, you could add the explicit freeype options to the configure script that configure.exe has. Maybe that would be a good contribution for upstream.

Mark




reply via email to

[Prev in Thread] Current Thread [Next in Thread]