RFR: JDK-8001922, JDK-8001927, JDK-8001921 Improve freetype detection
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Fri Oct 25 07:59:44 UTC 2013
On 2013-10-25 00:25, Mike Duigou wrote:
> The freetype detection on Ubuntu 13.10 x64 appears to be broken as a result of this changeset.
>
> configure:31851: checking for freetype
> configure:31853: result: yes (using pkg-config)
> configure:34239: checking if we can compile and link with freetype
> configure:34264: /usr/bin/g++-4.8 -o conftest -I/usr/include/freetype2 -lfreetype conftest.cpp >&5
> /tmp/ccfUxhRh.o: In function `main':
> conftest.cpp:(.text+0xa): undefined reference to `FT_Init_FreeType'
> collect2: error: ld returned 1 exit status
> configure:34264: $? = 1
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME "OpenJDK"
> | #define PACKAGE_TARNAME "openjdk"
> | #define PACKAGE_VERSION "jdk8"
> | #define PACKAGE_STRING "OpenJDK jdk8"
> | #define PACKAGE_BUGREPORT "build-dev at openjdk.java.net"
> | #define PACKAGE_URL "http://openjdk.java.net"
> | #define STDC_HEADERS 1
> | #define HAVE_SYS_TYPES_H 1
> | #define HAVE_SYS_STAT_H 1
> | #define HAVE_STDLIB_H 1
> | #define HAVE_STRING_H 1
> | #define HAVE_MEMORY_H 1
> | #define HAVE_STRINGS_H 1
> | #define HAVE_INTTYPES_H 1
> | #define HAVE_STDINT_H 1
> | #define HAVE_UNISTD_H 1
> | #define HAVE_STDIO_H 1
> | #define SIZEOF_INT_P 8
> | #define HAVE_X11_EXTENSIONS_SHAPE_H 1
> | #define HAVE_X11_EXTENSIONS_XRENDER_H 1
> | #define HAVE_X11_EXTENSIONS_XTEST_H 1
> | #define HAVE_X11_INTRINSIC_H 1
> | #define HAVE_CUPS_CUPS_H 1
> | #define HAVE_CUPS_PPD_H 1
> | /* end confdefs.h. */
> |
> | #include<ft2build.h>
> | #include FT_FREETYPE_H
> | int main () {
> | FT_Init_FreeType(NULL);
> | return 0;
> | }
> |
> configure:34271: result: no
> configure:34273: Could not compile and link with freetype. This might be a 32/64-bit mismatch.
> configure:34275: Using FREETYPE_CFLAGS=-I/usr/include/freetype2 and FREETYPE_LIBS=-lfreetype
> configure:34311: error: Can not continue without freetype. You might be able to fix this by running 'sudo apt-get install libfreetype6-dev'.
Are you building a 32 or 64 bit target? What is your complete configure
command line?
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".
Did the build work properly before? That is, not only that configure
accepted your freetype installation, but that the resulting build
actually could link with freetype at runtime? Otherwise, this might be a
case of "failing fast" in configure, rather than a bug.
/Magnus
More information about the build-dev
mailing list