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

[macOS 12] Build failed: parameter 'SizeOfTag' set but not used

    XMLWordPrintable

Details

    • 2d
    • x86_64
    • os_x

    Description

      ADDITIONAL SYSTEM INFORMATION :
      OS: macOS Monterey 12.3 (21E230) x86_64

      Configuration summary:
      * Name: macosx-x86_64-server-release
      * Debug level: release
      * HS debug level: product
      * JVM variants: server
      * JVM features: server: 'cds compiler1 compiler2 dtrace epsilongc g1gc jfr jni-check jvmci jvmti management parallelgc serialgc services shenandoahgc vm-structs zgc'
      * OpenJDK target: OS: macosx, CPU architecture: x86, address length: 64
      * Version string: 19-internal-adhoc.yuantj.jdk (19-internal)
      * Source date: Determined at build time

      Tools summary:
      * Boot JDK: openjdk version "17.0.2" 2022-01-18 OpenJDK Runtime Environment Homebrew (build 17.0.2+0) OpenJDK 64-Bit Server VM Homebrew (build 17.0.2+0, mixed mode, sharing) (at /usr/local/Cellar/openjdk/17.0.2/libexec/openjdk.jdk/Contents/Home)
      * Toolchain: clang (clang/LLVM from Xcode 13.3)
      * C Compiler: Version 13.1.6 (at /usr/bin/clang)
      * C++ Compiler: Version 13.1.6 (at /usr/bin/clang++)

      A DESCRIPTION OF THE PROBLEM :
      I was trying to build the latest (Mar 18, 2022, 11:05 am, UTC) clone of JDK on macOS, using the default configuration, but failed with 2 compilation errors. See "Actual Result" for details.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Run the following command:

      ```sh
      $ git clone https://github.com/openjdk/jdk.git
      $ cd jdk
      $ chmod +x configure
      $ ./configure
      $ make
      ```

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Build successfully
      ACTUAL -
      Build failed with the following message:

      ```plain
      /Users/yuantj/tmp/build/jdk/src/java.desktop/share/native/liblcms/cmstypes.c:3441:132: error: parameter 'SizeOfTag' set but not used [-Werror,-Wunused-but-set-parameter]
      void *Type_ProfileSequenceId_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag)
                                                                                                                                         ^
      /Users/yuantj/tmp/build/jdk/src/java.desktop/share/native/liblcms/cmstypes.c:5137:125: error: parameter 'SizeOfTag' set but not used [-Werror,-Wunused-but-set-parameter]
      void *Type_Dictionary_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag)
                                                                                                                                  ^
      2 errors generated.
      make[3]: *** [/Users/yuantj/tmp/build/jdk/build/macosx-x86_64-server-release/support/native/java.desktop/liblcms/cmstypes.o] Error 1
      make[3]: *** Waiting for unfinished jobs....
      make[2]: *** [java.desktop-libs] Error 2

      ERROR: Build failed for target 'default (exploded-image)' in configuration 'macosx-x86_64-server-release' (exit code 2)
      Stopping sjavac server

      === Output from failing command(s) repeated here ===
      * For target support_native_java.desktop_liblcms_cmstypes.o:
      /Users/yuantj/tmp/build/jdk/src/java.desktop/share/native/liblcms/cmstypes.c:3441:132: error: parameter 'SizeOfTag' set but not used [-Werror,-Wunused-but-set-parameter]
      void *Type_ProfileSequenceId_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag)
                                                                                                                                         ^
      /Users/yuantj/tmp/build/jdk/src/java.desktop/share/native/liblcms/cmstypes.c:5137:125: error: parameter 'SizeOfTag' set but not used [-Werror,-Wunused-but-set-parameter]
      void *Type_Dictionary_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag)
                                                                                                                                  ^
      2 errors generated.

      * All command lines available in /Users/yuantj/tmp/build/jdk/build/macosx-x86_64-server-release/make-support/failure-logs.
      === End of repeated output ===

      No indication of failed target found.
      Hint: Try searching the build log for '] Error'.
      Hint: See doc/building.html#troubleshooting for assistance.

      make[1]: *** [main] Error 2
      make: *** [default] Error 2
      ```

      `jdk/build/macosx-x86_64-server-release/make-support/failure-logs/support_native_java.desktop_liblcms_cmstypes.o.cmdline` says:

      ```plain
      /usr/bin/clang -MMD -MF /Users/yuantj/tmp/build/jdk/build/macosx-x86_64-server-release/support/native/java.desktop/liblcms/cmstypes.d.tmp -I/Users/yuantj/tmp/build/jdk/build/macosx-x86_64-server-release/support/modules_include/java.base -I/Users/yuantj/tmp/build/jdk/build/macosx-x86_64-server-release/support/modules_include/java.base/darwin -I/Users/yuantj/tmp/build/jdk/src/java.base/share/native/libjava -I/Users/yuantj/tmp/build/jdk/src/java.base/unix/native/libjava -I/Users/yuantj/tmp/build/jdk/src/hotspot/share/include -I/Users/yuantj/tmp/build/jdk/src/hotspot/os/posix/include -DMAC_OS_X_VERSION_MIN_REQUIRED=10120 -mmacosx-version-min=10.12.0 -DLIBC=default -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT -DMACOSX -DNDEBUG -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wreorder -Wunused-function -Wundef -Wunused-value -Woverloaded-virtual -fmacro-prefix-map=/Users/yuantj/tmp/build/jdk/= -std=c99 -m64 -arch x86_64 -D_LITTLE_ENDIAN -DARCH='"x86_64"' -Dx86_64 -D_LP64=1 -fno-delete-null-pointer-checks -fvisibility=hidden -DCMS_DONT_USE_FAST_FLOOR -I/Users/yuantj/tmp/build/jdk/src/java.desktop/share/native/liblcms -I/Users/yuantj/tmp/build/jdk/build/macosx-x86_64-server-release/support/headers/java.desktop -I/Users/yuantj/tmp/build/jdk/src/java.desktop/share/native/common/awt/debug -I/Users/yuantj/tmp/build/jdk/src/java.desktop/unix/native/libawt/java2d -I/Users/yuantj/tmp/build/jdk/src/java.desktop/share/native/libawt/java2d -g -Wno-unknown-warning-option -Wno-unused-parameter -Wno-unused -Wno-tautological-compare -Wno-format-nonliteral -Wno-undef -Werror -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks -O3 -c -o /Users/yuantj/tmp/build/jdk/build/macosx-x86_64-server-release/support/native/java.desktop/liblcms/cmstypes.o /Users/yuantj/tmp/build/jdk/src/java.desktop/share/native/liblcms/cmstypes.c
      ```

      `jdk/build/macosx-x86_64-server-release/make-support/failure-logs/support_native_java.desktop_liblcms_cmstypes.o.log` says:

      ```plain
      /Users/yuantj/tmp/build/jdk/src/java.desktop/share/native/liblcms/cmstypes.c:3441:132: error: parameter 'SizeOfTag' set but not used [-Werror,-Wunused-but-set-parameter]
      void *Type_ProfileSequenceId_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag)
                                                                                                                                         ^
      /Users/yuantj/tmp/build/jdk/src/java.desktop/share/native/liblcms/cmstypes.c:5137:125: error: parameter 'SizeOfTag' set but not used [-Werror,-Wunused-but-set-parameter]
      void *Type_Dictionary_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag)
                                                                                                                                  ^
      2 errors generated.
      ```

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: