<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Linux headers are a required but not tested dependency"
   href="https://bugs.llvm.org/show_bug.cgi?id=43386">43386</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Linux headers are a required but not tested dependency
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>9.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>eblot.ml@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>jdevlieghere@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When building for arm-none-eabi target, from a Linux host, lldb requires the
linux headers file to successfully build.

While this extra dependency may or may not be useful for a baremetal (i.e.
non-Linux based) target, the CMake build infrastructure does not test for the
presence of such headers. This means the LLVM builds fails late in the build
process (file 3404 out of 4232 on my host).

As an enhancement, it would be nice to test for such header files during the
CMake build stage to avoid such a late failure.

Linux headers may not be installed by default on Docker containers, for
example.


FAILED:
tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/NativeProcessLinux.cpp.o
/usr/bin/c++  -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -DLLDB_CONFIGURATION_RELEASE
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-Itools/lldb/source/Plugins/Process/Linux
-I/toolchain/llvm/lldb/source/Plugins/Process/Linux -Itools/lldb/source
-Itools/lldb/include -I/toolchain/llvm/lldb/include -Iinclude
-I/toolchain/llvm/llvm/include -I/usr/include/python3.7m
-I/toolchain/llvm/llvm/../clang/include -Itools/lldb/../clang/include
-I/toolchain/llvm/lldb/source/. -fPIC -fvisibility-inlines-hidden
-Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter
-Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic
-Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized
-Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment
-fdiagnostics-color -ffunction-sections -fdata-sections
-Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing
-Wno-deprecated-register -Wno-vla-extension -O3 -DNDEBUG    -fno-exceptions
-fno-rtti -MD -MT
tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/NativeProcessLinux.cpp.o
-MF
tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/NativeProcessLinux.cpp.o.d
-o
tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/NativeProcessLinux.cpp.o
-c /toolchain/llvm/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
In file included from
/toolchain/llvm/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h:25,
                 from
/toolchain/llvm/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp:9:
/toolchain/llvm/lldb/source/Plugins/Process/Linux/ProcessorTrace.h:18:10: fatal
error: linux/perf_event.h: No such file or directory
 #include <linux/perf_event.h>
          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>