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

[alpha, linux] OpenJDK fails to build on Alpha platform due to MAP_FIXED_NOREPLACE value.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 24, 25
    • hotspot
    • other
    • linux

      On Alpha platform MAP_FIXED_NOREPLACE is defined as 0x200000, not as 0x100000 default provided by OpenJDK:

      // Note that the value for MAP_FIXED_NOREPLACE differs between architectures, but all architectures
      // supported by OpenJDK share the same flag value.
      #define MAP_FIXED_NOREPLACE_value 0x100000

      This causes the static assertion to fail during the compilation:

      /<<PKGBUILDDIR>>/src/hotspot/os/linux/os_linux.cpp:2994:37: error: static assertion failed: MAP_FIXED_NOREPLACE == MAP_FIXED_NOREPLACE_value
       2994 | STATIC_ASSERT(MAP_FIXED_NOREPLACE == MAP_FIXED_NOREPLACE_value);
      /<<PKGBUILDDIR>>/src/hotspot/share/utilities/debug.hpp:290:44: note: in definition of macro ‘STATIC_ASSERT’
        290 | #define STATIC_ASSERT(Cond) static_assert((Cond), #Cond)
            | ^~~~
      /<<PKGBUILDDIR>>/src/hotspot/os/linux/os_linux.cpp:2994:37: note: the comparison reduces to ‘(2097152 == 1048576)’
       2994 | STATIC_ASSERT(MAP_FIXED_NOREPLACE == MAP_FIXED_NOREPLACE_value);
      /<<PKGBUILDDIR>>/src/hotspot/share/utilities/debug.hpp:290:44: note: in definition of macro ‘STATIC_ASSERT’
        290 | #define STATIC_ASSERT(Cond) static_assert((Cond), #Cond)
        
      See[1].

      [1] https://buildd.debian.org/status/fetch.php?pkg=openjdk-24&arch=alpha&ver=24%7E22ea-1&stamp=1730843640&raw=0

            Unassigned Unassigned
            vpetko Vladimir Petko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: