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

Linux-sparc fails to build after JDK-8199712 (Flight Recorder)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b19
    • CPU:
      sparc
    • OS:
      linux

      Backports

        Description

        Hotspot no longer builds on linux-sparc after 8199712:

        === Output from failing command(s) repeated here ===
        /usr/bin/printf "* For target hotspot_variant-server_libjvm_objs_os_perf_linux.o:\n"
        * For target hotspot_variant-server_libjvm_objs_os_perf_linux.o:
        (/bin/grep -v -e "^Note: including file:" < /srv/glaubitz/jdk/build/linux-sparcv9-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_os_perf_linux.o.log || true) | /usr/bin/head -n 12
        /srv/glaubitz/jdk/src/hotspot/os/linux/os_perf_linux.cpp: In member function ‘bool CPUInformationInterface::initialize()’:
        /srv/glaubitz/jdk/src/hotspot/os/linux/os_perf_linux.cpp:1028:45: error: ‘VM_Version_Ext’ has not been declared
           _cpu_info->set_number_of_hardware_threads(VM_Version_Ext::number_of_threads());
                                                     ^~~~~~~~~~~~~~
        /srv/glaubitz/jdk/src/hotspot/os/linux/os_perf_linux.cpp:1029:34: error: ‘VM_Version_Ext’ has not been declared
           _cpu_info->set_number_of_cores(VM_Version_Ext::number_of_cores());
                                          ^~~~~~~~~~~~~~
        /srv/glaubitz/jdk/src/hotspot/os/linux/os_perf_linux.cpp:1030:36: error: ‘VM_Version_Ext’ has not been declared
           _cpu_info->set_number_of_sockets(VM_Version_Ext::number_of_sockets());
                                            ^~~~~~~~~~~~~~
        /srv/glaubitz/jdk/src/hotspot/os/linux/os_perf_linux.cpp:1031:27: error: ‘VM_Version_Ext’ has not been declared
           _cpu_info->set_cpu_name(VM_Version_Ext::cpu_name());
        if test `/usr/bin/wc -l < /srv/glaubitz/jdk/build/linux-sparcv9-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_os_perf_linux.o.log` -gt 12; then /bin/echo " ... (rest of output omitted)" ; fi
           ... (rest of output omitted)
        /usr/bin/printf "\n* All command lines available in /srv/glaubitz/jdk/build/linux-sparcv9-normal-server-release/make-support/failure-logs.\n"

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

        A first step to fix the problem is adding the missing include for linux-sparc:

        diff -r 781f36c0831e src/hotspot/os/linux/os_perf_linux.cpp
        --- a/src/hotspot/os/linux/os_perf_linux.cpp Wed May 16 13:14:58 2018 +0200
        +++ b/src/hotspot/os/linux/os_perf_linux.cpp Wed May 16 15:39:14 2018 +0200
        @@ -40,6 +40,9 @@
         #include "vm_version_ext_aarch64.hpp"
         #endif
         #endif
        +#ifdef SPARC
        +#include "vm_version_ext_sparc.hpp"
        +#endif

         #include <stdio.h>
         #include <stdarg.h>

        However, the build still fails as vm_ext_version_sparc.{hpp,cpp} was written with Solaris in mind only:

        === Output from failing command(s) repeated here ===
        /usr/bin/printf "* For target hotspot_variant-server_libjvm_objs_os_perf_linux.o:\n"
        * For target hotspot_variant-server_libjvm_objs_os_perf_linux.o:
        (/bin/grep -v -e "^Note: including file:" < /srv/glaubitz/jdk/build/linux-sparcv9-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_os_perf_linux.o.log || true) | /usr/bin/head -n 12
        In file included from /srv/glaubitz/jdk/src/hotspot/os/linux/os_perf_linux.cpp:43:0:
        /srv/glaubitz/jdk/src/hotspot/cpu/sparc/vm_version_ext_sparc.hpp:30:10: fatal error: kstat.h: No such file or directory
         #include <kstat.h>
                  ^~~~~~~~~
        compilation terminated.
        if test `/usr/bin/wc -l < /srv/glaubitz/jdk/build/linux-sparcv9-normal-server-release/make-support/failure-logs/hotspot_variant-server_libjvm_objs_os_perf_linux.o.log` -gt 12; then /bin/echo " ... (rest of output omitted)" ; fi
        /usr/bin/printf "\n* All command lines available in /srv/glaubitz/jdk/build/linux-sparcv9-normal-server-release/make-support/failure-logs.\n"

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

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: