-
Bug
-
Resolution: Fixed
-
P3
-
10
-
Amazon Linux 2012
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8221338 | openjdk8u222 | Magnus Ihse Bursie | P3 | Resolved | Fixed | b01 |
Filed on behalf of Ziyi Luo (luoziyi@amazon.com).
When building OpenJDK 10+33 on Amazon Linux 2012, variable `FONTCONFIG_CFLAGS` will be set during the configuration.
But the variable is not exported to `spec.gmk` because of a missing declaration in `make/autoconf/spec.gmk.in`. This results in the missing of `FONTCONFIG_CFLAGS` variable during the make. Hence fail the AWT build with the following message:
```
/home/luoziyi/build-src/src/java.desktop/unix/native/common/awt/fontpath.c:581:35: fatal error: fontconfig/fontconfig.h: No such file or directory
#include <fontconfig/fontconfig.h>
```
This is related to the previous commit: http://hg.openjdk.java.net/jdk/jdk/rev/5a270d2dfa5d#l5.7
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM:
* Make sure you do not have Fontconfig installed on your Linux machine.
* Use `--with-fontconfig="$FONTCONFIG_PATH` and start the configuration.
* Search for `FONTCONFIG_CFLAGS` in `build/linux-x86_64-normal-server-release/spec.gmk`
EXPECTED VERSUS ACTUAL BEHAVIOR:
EXPECTED -
Find `FONTCONFIG_CFLAGS:=-I/path/to/fontconfig/include` in `build/linux-x86_64-normal-server-release/spec.gmk` just like `CUPS_CFLAGS`
ACTUAL -
Cannot find `FONTCONFIG_CFLAGS`
REPRODUCIBILITY:
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND:
Add the declaration of `FONTCONFIG_CFLAGS` in `make/autoconf/spec.gmk.in`:
--- ./make/autoconf/spec.gmk.in 2017-11-28 15:10:25.000000000 +0000
+++ /home/luoziyi/workplace/OpenJDK10Src/make/autoconf/spec.gmk.in 2017-11-30 20:18:56.497833196 +0000
@@ -294,6 +294,7 @@
FREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@
FREETYPE_LICENSE=@FREETYPE_LICENSE@
CUPS_CFLAGS:=@CUPS_CFLAGS@
+FONTCONFIG_CFLAGS:=@FONTCONFIG_CFLAGS@
ALSA_LIBS:=@ALSA_LIBS@
ALSA_CFLAGS:=@ALSA_CFLAGS@
LIBFFI_LIBS:=@LIBFFI_LIBS@
When building OpenJDK 10+33 on Amazon Linux 2012, variable `FONTCONFIG_CFLAGS` will be set during the configuration.
But the variable is not exported to `spec.gmk` because of a missing declaration in `make/autoconf/spec.gmk.in`. This results in the missing of `FONTCONFIG_CFLAGS` variable during the make. Hence fail the AWT build with the following message:
```
/home/luoziyi/build-src/src/java.desktop/unix/native/common/awt/fontpath.c:581:35: fatal error: fontconfig/fontconfig.h: No such file or directory
#include <fontconfig/fontconfig.h>
```
This is related to the previous commit: http://hg.openjdk.java.net/jdk/jdk/rev/5a270d2dfa5d#l5.7
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM:
* Make sure you do not have Fontconfig installed on your Linux machine.
* Use `--with-fontconfig="$FONTCONFIG_PATH` and start the configuration.
* Search for `FONTCONFIG_CFLAGS` in `build/linux-x86_64-normal-server-release/spec.gmk`
EXPECTED VERSUS ACTUAL BEHAVIOR:
EXPECTED -
Find `FONTCONFIG_CFLAGS:=-I/path/to/fontconfig/include` in `build/linux-x86_64-normal-server-release/spec.gmk` just like `CUPS_CFLAGS`
ACTUAL -
Cannot find `FONTCONFIG_CFLAGS`
REPRODUCIBILITY:
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND:
Add the declaration of `FONTCONFIG_CFLAGS` in `make/autoconf/spec.gmk.in`:
--- ./make/autoconf/spec.gmk.in 2017-11-28 15:10:25.000000000 +0000
+++ /home/luoziyi/workplace/OpenJDK10Src/make/autoconf/spec.gmk.in 2017-11-30 20:18:56.497833196 +0000
@@ -294,6 +294,7 @@
FREETYPE_BUNDLE_LIB_PATH=@FREETYPE_BUNDLE_LIB_PATH@
FREETYPE_LICENSE=@FREETYPE_LICENSE@
CUPS_CFLAGS:=@CUPS_CFLAGS@
+FONTCONFIG_CFLAGS:=@FONTCONFIG_CFLAGS@
ALSA_LIBS:=@ALSA_LIBS@
ALSA_CFLAGS:=@ALSA_CFLAGS@
LIBFFI_LIBS:=@LIBFFI_LIBS@
- backported by
-
JDK-8221338 FONTCONFIG_CFLAGS missing from spec.gmk.in
-
- Resolved
-