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

Hotspot build system looking for sdt.h in the wrong place

XMLWordPrintable

    • b24
    • linux

        The Hotspot build system bases the inclusion of the DTrace functionality on Linux on whether or not the /usr/include/sys/sdt.h file exists. That works as long as the system /usr/include path is the one used by the compiler, but the new "self hosted" compilers have their own sysroot with their own <sysroot>/usr/include, so if the sdt.h file *does* exist on the build machine but not in the compiler sysroot then the build system will incorrectly think that it should enable dtrace and will fail when compiling dtrace.hpp like so:

        In file included from hotspot/src/share/vm/utilities/hashtable.inline.hpp:31:0,
                         from hotspot/src/share/vm/classfile/systemDictionary.hpp:35,
                         from hotspot/src/share/vm/ci/ciEnv.hpp:30,
                         from hotspot/src/share/vm/ci/ciUtilities.hpp:28,
                         from hotspot/src/share/vm/ci/ciNullObject.hpp:30,
                         from hotspot/src/share/vm/ci/ciConstant.hpp:29,
                         from hotspot/src/share/vm/ci/ciArray.hpp:29,
                         from hotspot/src/share/vm/precompiled/precompiled.hpp:33:
        hotspot/src/share/vm/utilities/dtrace.hpp:31:21: fatal error: sys/sdt.h: No such file or directory
         #include <sys/sdt.h>
                             ^
        compilation terminated.

              mikael Mikael Vidstedt
              mikael Mikael Vidstedt
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: