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

Build fails with system headers after 8204572

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: infrastructure
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b20
    • CPU:
      generic
    • OS:
      linux

      Backports

        Description

        Fridrich Strba from SUSE discovered that after JDK-8204572, building OpenJDK fails when configuring to use system headers for libraries like jpeg and lcms with:

        === Output from failing command(s) repeated here ===
        /usr/bin/printf "* For target support_native_java.desktop_libjavajpeg_imageioJPEG.o:\n"
        * For target support_native_java.desktop_libjavajpeg_imageioJPEG.o:
        (/usr/bin/grep -v -e "^Note: including file:" < /srv/glaubitz/openjdk/jdk/build/linux-x86_64-normal-server-release/make-support/failure-logs/support_native_java.desktop_libjavajpeg_imageioJPEG.o.log || true) | /usr/bin/head -n 12
        /srv/glaubitz/openjdk/jdk/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c:49:10: fatal error: com_sun_imageio_plugins_jpeg_JPEGImageReader.h: No such file or directory
         #include "com_sun_imageio_plugins_jpeg_JPEGImageReader.h"
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        compilation terminated.
        if test `/usr/bin/wc -l < /srv/glaubitz/openjdk/jdk/build/linux-x86_64-normal-server-release/make-support/failure-logs/support_native_java.desktop_libjavajpeg_imageioJPEG.o.log` -gt 12; then /usr/bin/echo " ... (rest of output omitted)" ; fi
        /usr/bin/printf "* For target support_native_java.desktop_liblcms_LCMS.o:\n"
        * For target support_native_java.desktop_liblcms_LCMS.o:
        (/usr/bin/grep -v -e "^Note: including file:" < /srv/glaubitz/openjdk/jdk/build/linux-x86_64-normal-server-release/make-support/failure-logs/support_native_java.desktop_liblcms_LCMS.o.log || true) | /usr/bin/head -n 12
        /srv/glaubitz/openjdk/jdk/src/java.desktop/share/native/liblcms/LCMS.c:29:10: fatal error: sun_java2d_cmm_lcms_LCMS.h: No such file or directory
         #include "sun_java2d_cmm_lcms_LCMS.h"
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        compilation terminated.
        if test `/usr/bin/wc -l < /srv/glaubitz/openjdk/jdk/build/linux-x86_64-normal-server-release/make-support/failure-logs/support_native_java.desktop_liblcms_LCMS.o.log` -gt 12; then /usr/bin/echo " ... (rest of output omitted)" ; fi
        /usr/bin/printf "\n* All command lines available in /srv/glaubitz/openjdk/jdk/build/linux-x86_64-normal-server-release/make-support/failure-logs.\n"

        * All command lines available in /srv/glaubitz/openjdk/jdk/build/linux-x86_64-normal-server-release/make-support/failure-logs.
        /usr/bin/printf "=== End of repeated output ===\n"
        === End of repeated output ===

        This can be fixed with:

        --- jdk11/make/common/JdkNativeCompilation.gmk Wed Jun 20 19:46:44 2018 -0700
        +++ jdk11/make/common/JdkNativeCompilation.gmk Thu Jun 21 10:10:16 2018 +0200
        @@ -119,9 +119,11 @@
           endif
         
           ifneq ($$($1_HEADERS_FROM_SRC), false)
        - $1_SRC_HEADER_FLAGS := $$(foreach dir, $$(wildcard $$($1_SRC) \
        - $$(call GetJavaHeaderDir, $$(MODULE))), -I$$(dir))
        + $1_SRC_HEADER_FLAGS := $$(addprefix -I, $$(wildcard $$($1_SRC)))
           endif
        + # Always add the java header dir
        + $1_SRC_HEADER_FLAGS += $$(addprefix -I, $$(call GetJavaHeaderDir, $$(MODULE)))
        +
           ifneq ($$($1_EXTRA_HEADER_DIRS), )
             $1_PROCESSED_EXTRA_HEADER_DIRS := $$(foreach dir, $$($1_EXTRA_HEADER_DIRS), \
                 $$(call ProcessDir, $$(dir)))

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                glaubitz John Paul Adrian Glaubitz
                Reporter:
                glaubitz John Paul Adrian Glaubitz
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: