[llvm-bugs] [Bug 41207] New: "Cannot find source file: /usr/include/ffi.h"

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 22 15:23:24 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41207

            Bug ID: 41207
           Summary: "Cannot find source file: /usr/include/ffi.h"
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: nicholas at mxc.ca
                CC: llvm-bugs at lists.llvm.org

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 https://github.com/llvm/llvm-project.git
$ cd llvm-project/
$ mkdir build
$ cd build
$ cmake -G Ninja ../llvm
[... full log here: https://pastebin.com/sCEW35iC ...]
-- 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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190322/42163a5d/attachment.html>


More information about the llvm-bugs mailing list