<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57594>57594</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Can not build 15.0.0 on i686 against older kernel (pre-4.1)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          satmandu
      </td>
    </tr>
</table>

<pre>
    14.x built fine. This might be related to this issue with llvm 13: https://bugs.llvm.org/show_bug.cgi?id=51917

Building llvm 15.0.0 on i686 gives me this error:
```
[7465/7686] Building CXX object tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/NativeThreadLinux.cpp.o
samu: job failed: CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/local/bin/ccache /usr/local/lib/ccache/bin/clang++ -DHAVE_ROUND -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/usr/local/tmp/crew/llvm.20220906180702.dir/builddir/tools/lldb/source/Plugins/Process/Linux -I/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux -I/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/include -I/usr/local/tmp/crew/llvm.20220906180702.dir/builddir/tools/lldb/include -I/usr/local/tmp/crew/llvm.20220906180702.dir/builddir/include -I/usr/local/tmp/crew/llvm.20220906180702.dir/llvm/include -I/usr/local/tmp/crew/llvm.20220906180702.dir/llvm/../clang/include -I/usr/local/tmp/crew/llvm.20220906180702.dir/builddir/tools/lldb/../clang/include -I/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source -I/usr/local/tmp/crew/llvm.20220906180702.dir/builddir/tools/lldb/source -isystem /usr/local/include/libxml2 -latomic -fPIC -flto=thin -fvisibility-inlines-hidden -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -fdiagnostics-color -flto=thin -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3 -DNDEBUG  -fno-exceptions -std=c++14 -MD -MT tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/Perf.cpp.o -MF tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/Perf.cpp.o.d -o tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/Perf.cpp.o -c /usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp
clang-14: warning: -latomic: 'linker' input unused [-Wunused-command-line-argument]
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:135:17: error: no member named 'aux_offset' in 'perf_event_mmap_page'
  metadata_page.aux_offset =
  ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:136:21: error: no member named 'data_offset' in 'perf_event_mmap_page'
      metadata_page.data_offset + metadata_page.data_size;
      ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:136:49: error: no member named 'data_size' in 'perf_event_mmap_page'
      metadata_page.data_offset + metadata_page.data_size;
                                  ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:137:17: error: no member named 'aux_size' in 'perf_event_mmap_page'
  metadata_page.aux_size = num_aux_pages * getpagesize();
  ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:140:41: error: no member named 'aux_size' in 'perf_event_mmap_page'
          DoMmap(nullptr, metadata_page.aux_size, PROT_READ, MAP_SHARED,
                          ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:141:32: error: no member named 'aux_offset' in 'perf_event_mmap_page'
                 metadata_page.aux_offset, "aux buffer")) {
                 ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:177:29: error: no member named 'data_offset' in 'perf_event_mmap_page'
              mmap_metadata.data_offset,
              ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:178:46: error: no member named 'data_size' in 'perf_event_mmap_page'
           static_cast<size_t>(mmap_metadata.data_size)};
                               ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:184:46: error: no member named 'aux_size' in 'perf_event_mmap_page'
           static_cast<size_t>(mmap_metadata.aux_size)};
                               ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:208:38: error: no member named 'data_size' in 'perf_event_mmap_page'
  uint64_t data_size = mmap_metadata.data_size;
                       ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:244:37: error: no member named 'aux_head' in 'perf_event_mmap_page'
  uint64_t aux_head = mmap_metadata.aux_head;
                      ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:301:47: error: no member named 'data_size' in 'perf_event_mmap_page'
  if (mmap_metadata.data_head < mmap_metadata.data_size)
                                ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:304:26: error: no member named 'data_size' in 'perf_event_mmap_page'
    return mmap_metadata.data_size; // The buffer has wrapped.
           ~~~~~~~~~~~~~ ^
/usr/local/tmp/crew/llvm.20220906180702.dir/lldb/source/Plugins/Process/Linux/Perf.cpp:310:8: warning: unused variable 'log' [-Wunused-variable]
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzdWUtz4jgQ_jVwUdlljIFw4ECATFI1CRSQnbm5ZEsYTYTklWRI9tdvtw0hmSQTspNk2XW5jKWW-vG5H0JKNLvrNSL_liSFkI4shOI-mS-FJSuRLR1JODFcUscZcZo4JAhrC042wi2JlOsVaTRrzT5ZOpdbeKmFZ3AnRWZ9pPraZNC2S72JodNPM1FrnglWaw5bjW6jUwuGtaBfPU9BBSZUtmXb8gM_IFoR0T5pk0ysOSjFKx24MdqgtGp6O9jeVbN12onaLRDbgZm11pDccx58_0508oOnDszR0sIYKVmCGurCpBxeJrLIhELKxOiUW3z7KlRxC7-DS3rDz4Tku4nV4O3AcpTPhAHiFXWg8HxpOGVVf5rnvq4UtHRVIGY_dEIWFNgxbA0G_cH5KB5MJiGgcwfWbnvO-7Pz4cV02wnMC4sipE6pRKyFgmea0nTJn1KlSO6p-8GSKvgsp3ATb3je_2MUT8fXV0NoxGcXX0fx-OxsNprHpxfzGYhtR0j4cnUdz8bX08EIW1_70y-jcuy-L57Nh4N4ML6azftX8_iyP5iOZ3vC2Xh62X_a_fXi8mLfe_HEArfKUWXDNyXo4FNhEIZBN2g3ToJOEG4RRwdm1eubP-1viP1EGUKlsmD8QzB6V96_zwwp78nI9_de_6E4vrOgR971gcFBPGHvrOOrpwlka0SVSm5XMiQe1AO9EinxFpOLATyl05AlIDEraKyFFYmQwt15QkmoJ9ZbCsY40L5RKeHJb52h8Ku0V6jCcubl1NAVd9xA78YIxz3rDORrC-2UWuf9WVCcuYLaA93eQnDJgL1wgkrxFzcwMOeMKodaIWOpYRg-qqbS_DblufP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