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

expression is not an integral constant expression

XMLWordPrintable

    • x86_64
    • os_x

      ADDITIONAL SYSTEM INFORMATION :
      macOS 15.4.1 24E263 arm64
      Apple clang version 17.0.0 (clang-1700.0.13.3)
      OpenJDK 11.0.27

      A DESCRIPTION OF THE PROBLEM :
      When trying to build OpenJDK 11.0.27 on macOS 15.4.1 for MacPorts, I get an error saying 'expression is not an integral constant expression' for the expression '(-1)<<13' in src/jdk.pack/share/native/common-unpack/constants.h.

      I've discussed this on the macports-dev mailinglist (https://lists.macports.org/pipermail/macports-dev/2025-April/046226.html), where it was suggested to replace this expression with '~0U<<13'. I don't know if this is the best fix, but this indeed makes OpenJDK 11.0.27 build on macOS 15.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Try to build OpenJDK 11.0.27 on macOS 15.4.1.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      A successful build.
      ACTUAL -
      A failed build with an 'expression is not an integral constant expression' error message about '(-1)<<13' in src/jdk.pack/share/native/common-unpack/constants.h

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

              Created:
              Updated: