<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 - fatal error: 'sys/sysctl.h' file not found"
   href="https://bugs.llvm.org/show_bug.cgi?id=48568">48568</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>fatal error: 'sys/sysctl.h' file not found
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Test Suite
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>11.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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Programs Tests
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nnelson@infowest.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Ubuntu 20.10
After 11.0.1 rc2 test run

cd ~/Documents/llvm-project/llvm/utils/release/rc2/
tar xf clang+llvm-11.0.1-rc2-x86_64-linux-gnu-ubuntu-20.10.tar.xz

cd test-suite-build

export
CC=/home/nnelson/Documents/llvm-project/llvm/utils/release/rc2/clang+llvm-11.0.1-rc2-x86_64-linux-gnu-ubuntu-20.10/bin/clang
export
CXX=/home/nnelson/Documents/llvm-project/llvm/utils/release/rc2/clang+llvm-11.0.1-rc2-x86_64-linux-gnu-ubuntu-20.10/bin/clang++

cmake
-DCMAKE_C_COMPILER=/home/nnelson/Documents/llvm-project/llvm/utils/release/rc2/clang+llvm-11.0.1-rc2-x86_64-linux-gnu-ubuntu-20.10/bin/clang
\
-C../llvm-test-suite/cmake/caches/O3.cmake \
../llvm-test-suite &> cmake_final.log

make -j 31 > make.log
/usr/bin/ld: CMakeFiles/mybison.dir/files.c.o: in function `openfiles':
files.c:(.text+0x947): warning: the use of `mktemp' is dangerous, better use
`mkstemp' or `mkdtemp'
/usr/bin/ld: CMakeFiles/unix-smail.dir/deliver.c.o: in function `deliver':
deliver.c:(.text+0x153): warning: the use of `mktemp' is dangerous, better use
`mkstemp' or `mkdtemp'
/usr/bin/ld: CMakeFiles/PathFinder.dir/main.c.o: in function
`runInteractively':
main.c:(.text+0x508): warning: the `gets' function is dangerous and should not
be used.
/usr/bin/ld: CMakeFiles/office-ispell.dir/ispell.c.o: in function `main':
ispell.c:(.text+0xbbc): warning: the use of `mktemp' is dangerous, better use
`mkstemp' or `mkdtemp'
/home/nnelson/Documents/llvm-project/llvm/utils/release/rc2/llvm-test-suite/MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/memstats.c:60:10:
fatal error: 'sys/sysctl.h' file not found
#include <sys/sysctl.h>
         ^~~~~~~~~~~~~~
1 error generated.
make[2]: ***
[MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/CMakeFiles/CLAMR.dir/build.make:362:
MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/CMakeFiles/CLAMR.dir/memstats.c.o]
Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:33683:
MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/CMakeFiles/CLAMR.dir/all] Error
2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:130: all] Error 2

tail of make.log
[ 36%] Built target tramp3d-v4
make[1]: Leaving directory
'/home/nnelson/Documents/llvm-project/llvm/utils/release/rc2/test-suite-build'

>From Khem Raj <<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>> in an email to llvm-dev.
Since 5.5 release Linux has dropped sysctl syscall see
<a href="https://github.com/torvalds/linux/commit/61a47c1ad3a4dc6882f01ebdc88138ac62d0df03">https://github.com/torvalds/linux/commit/61a47c1ad3a4dc6882f01ebdc88138ac62d0df03</a>
and subsequently, glibc also dropped the sys/sysctl.h header and
sysctl function. So perhaps tests need to cater for that</pre>
        </div>
      </p>


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

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>