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

HotSpot build error in glibc 2.42+r2

XMLWordPrintable

    • x86_64
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      ArchLinux (with glibc 2.42+r2+g3ec4dd77f648-1 installed)


      A DESCRIPTION OF THE PROBLEM :
      In file included from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/utilities/debug.hpp:28,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/runtime/globals.hpp:28,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/memory/allocation.hpp:28,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/memory/iterator.hpp:28,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/memory/genOopClosures.hpp:28,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/oops/klass.hpp:28,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/runtime/handles.hpp:28,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/memory/universe.hpp:28,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/code/oopRecorder.hpp:28,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/asm/codeBuffer.hpp:28,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/asm/assembler.hpp:28,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/precompiled/precompiled.hpp:29:
      /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/utilities/globalDefinitions.hpp:1276:28: error: ‘unsigned int uabs(int)’ was declared ‘extern’ and later ‘static’ [-fpermissive]
       1276 | static inline unsigned int uabs(int n) { return uabs((unsigned int)n); }
            | ^~~~
      In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14.3.1/include/c++/cstdlib:79,
                       from /usr/lib/gcc/x86_64-pc-linux-gnu/14.3.1/include/c++/stdlib.h:36,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:39,
                       from /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/src/share/vm/utilities/globalDefinitions.hpp:38:
      /usr/include/stdlib.h:989:21: note: previous declaration of ‘unsigned int uabs(int)’
        989 | extern unsigned int uabs (int __x) __THROW __attribute__ ((__const__)) __wur;
            | ^~~~
      make[6]: *** [/builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/make/linux/makefiles/vm.make:310: precompiled.hpp.gch] Error 1
      make[5]: *** [/builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/make/linux/makefiles/top.make:119: the_vm] Error 2
      make[4]: *** [/builds/java8-openjdk/src/jdk8u-jdk8u462-b08/hotspot/make/linux/Makefile:284: product] Error 2
      make[3]: *** [Makefile:231: generic_build2] Error 2
      make[2]: *** [Makefile:177: product] Error 2
      make[1]: *** [HotspotWrapper.gmk:45: /builds/java8-openjdk/src/jdk8u-jdk8u462-b08/build/linux-x86_64-normal-server-release/hotspot/_hotspot.timestamp] Error 2
      make: *** [/builds/java8-openjdk/src/jdk8u-jdk8u462-b08//make/Main.gmk:110: hotspot-only] Error 2

      ArchLinux now update glibc to 2.42+r2 at this version, uabs is `extern`. and in hotspot/src/share/vm/utilities/globalDefinitions.hpp file, uabs is also static, maybe we should check glibc version for this function

      And, java11-openjdk, java17-openjdk, java21-openjdk, java-openjdk (jdk24) package have this error too.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      git clone https://gitlab.archlinux.org/archlinux/packaging/packages/java8-openjdk
      cd java8-openjdk
      makepkg -s

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      successfully build java{8,11,17,21,}-openjdk packages
      ACTUAL -
      receive compile error as above

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

              Created:
              Updated: