Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8192854

FONTCONFIG_CFLAGS missing from spec.gmk.in

    XMLWordPrintable

Details

    • b33
    • 10
    • b35
    • x86
    • linux

    Backports

      Description

        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@

        Attachments

          Issue Links

            Activity

              People

                ihse Magnus Ihse Bursie
                phh Paul Hohensee
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: