RFR: JDK-8001922, JDK-8001927, JDK-8001921 Improve freetype detection
Andreas Rieber
rieberandreas at gmail.com
Fri Oct 25 08:58:51 UTC 2013
Hi Magnus,
its not related to the ubuntu version. I have the problem on ubuntu
12.04. The configure of jdk8 fails with:
checking if we can compile and link with freetype... no
configure: Could not compile and link with freetype. This might be a
32/64-bit mismatch.
configure: Using FREETYPE_CFLAGS=-I/usr/include/freetype2 and
FREETYPE_LIBS=-lfreetype
configure: error: Can not continue without freetype. You might be able
to fix this by running 'sudo apt-get install libfreetype6-dev'.
The configure in jdk8tl works fine.
Andreas
On 25.10.2013 10:49, Magnus Ihse Bursie wrote:
> On 2013-10-25 09:59, Magnus Ihse Bursie wrote:
>> I notice that freetype was found using pkg-config, but FREETYPE_LIBS
>> is only "-lfreetype". That is weird, and possibly a bug in the
>> pkg-config description of freetype on Ubuntu 13.10. As comparison, on
>> my ancient Ubuntu 11.04, FREETYPE_LIBS gets set to
>> "-L/usr/lib/x86_64-linux-gnu -lfreetype".
>
> I checked on a newer Ubuntu (13.04). It turns out that pkg-config is
> stripping the -L provided by the freetype pkg-config metadata file!
> This is apparantly the default behavior of pkg-config, unless
> PKG_CONFIG_ALLOW_SYSTEM_LIBS=true is set. The difference between the
> older and newer Ubuntus seems to be wether pkg-config considers the
> freetype library path to be a system library or not. :-&
>
> I think the best way to proceed is to set PKG_CONFIG_ALLOW_SYSTEM_LIBS
> to force pkg-config to always report system libraries. There's a
> related flag for include files, I should probably turn that on just as
> well.
>
> I'm still curious to how this could ever have worked before my rewrite
> -- we used pkg-config in much the same way, only we didn't try to
> compile with the flags found out in configure. Maybe that's the clue;
> that later on we included the correct library path by chance. Oh well.
>
> /Magnus
More information about the build-dev
mailing list