<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 - "Cannot find source file: /usr/include/ffi.h""
href="https://bugs.llvm.org/show_bug.cgi?id=41207">41207</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>"Cannot find source file: /usr/include/ffi.h"
</td>
</tr>
<tr>
<th>Product</th>
<td>Build scripts
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>cmake
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nicholas@mxc.ca
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I do have libffi-dev package installed, but the header is in
/usr/include/x86_64-linux-gnu/ffi.h. Notably, ccmake indicates LLVM_ENABLE_FFI
is OFF, yet I still get this error.
Steps:
$ git clone <a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
$ cd llvm-project/
$ mkdir build
$ cd build
$ cmake -G Ninja ../llvm
[... full log here: <a href="https://pastebin.com/sCEW35iC">https://pastebin.com/sCEW35iC</a> ...]
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Configuring done
CMake Error at cmake/modules/AddLLVM.cmake:463 (add_library):
Cannot find source file:
/usr/include/ffi.h
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
Call Stack (most recent call first):
cmake/modules/AddLLVM.cmake:634 (llvm_add_library)
lib/Support/CMakeLists.txt:47 (add_llvm_library)
CMake Error at cmake/modules/AddLLVM.cmake:463 (add_library):
Cannot find source file:
/usr/include/ffi.h
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
Call Stack (most recent call first):
cmake/modules/AddLLVM.cmake:634 (llvm_add_library)
lib/WindowsManifest/CMakeLists.txt:8 (add_llvm_library)
CMake Error at cmake/modules/AddLLVM.cmake:463 (add_library):
No SOURCES given to target: LLVMSupport
Call Stack (most recent call first):
cmake/modules/AddLLVM.cmake:634 (llvm_add_library)
lib/Support/CMakeLists.txt:47 (add_llvm_library)
CMake Error at cmake/modules/AddLLVM.cmake:463 (add_library):
No SOURCES given to target: LLVMWindowsManifest
Call Stack (most recent call first):
cmake/modules/AddLLVM.cmake:634 (llvm_add_library)
lib/WindowsManifest/CMakeLists.txt:8 (add_llvm_library)
-- Build files have been written to: /home/nicholas/llvm-project/build
If I run "ccmake -G Ninja ../llvm" at this stage, then I see FFI_INCLUDE_DIR is
blank, FFI_LIBRARY_DIR is blank and LLVM_ENABLE_FFI is OFF. I wouldn't expect
an error about ffi.h while LLVM_ENABLE_FFI off. Also, I would expect $CC to
search /usr/include/x86_64-linux-gnu and find ffi.h there.</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>