<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - the cmake test for libffi is unreliable"
   href="http://llvm.org/bugs/show_bug.cgi?id=19528">19528</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>the cmake test for libffi is unreliable
          </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>release blocker
          </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>emanuelecestari@yahoo.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The check done for the libffi doesn't work, I extracted the relevant bits for
the cmake log

[ code ]
Determining if the ffi_call exist failed with the following output:
Change Dir: /tmp/llvmSvn/build/build1/CMakeFiles/CMakeTmp

Run Build Command:/usr/bin/make "cmTryCompileExec3438544690/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec3438544690.dir/build.make
CMakeFiles/cmTryCompileExec3438544690.dir/build
make[1]: Entering directory `/tmp/llvmSvn/build/build1/CMakeFiles/CMakeTmp'
/opt/redist/bin32/cmake/cmake-2.8.12.2-Linux-i386/bin/cmake -E
cmake_progress_report /tmp/llvmSvn/build/build1/CMakeFiles/CMakeTmp/CMakeFiles
1
Building C object
CMakeFiles/cmTryCompileExec3438544690.dir/CheckSymbolExists.c.o
/usr/bin/cc  
-I/tmp/llvmSvn/build/build1/CMakeFiles/CMakeTmp/\"/opt/lib64/libffi/3.0.13/include/ffi.h\"
   -o CMakeFiles/cmTryCompileExec3438544690.dir/CheckSymbolExists.c.o   -c
/tmp/llvmSvn/build/build1/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/tmp/llvmSvn/build/build1/CMakeFiles/CMakeTmp/CheckSymbolExists.c:2:17: fatal
error: ffi.h: No such file or directory
 #include <ffi.h>
                 ^
compilation terminated.
make[1]: *** [CMakeFiles/cmTryCompileExec3438544690.dir/CheckSymbolExists.c.o]
Error 1
make[1]: Leaving directory `/tmp/llvmSvn/build/build1/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec3438544690/fast] Error 2

File /tmp/llvmSvn/build/build1/CMakeFiles/CMakeTmp/CheckSymbolExists.c:

[ /code ]

note the values given to the -I flag, once again the rules used for the
expansion of the values given to cmake entries are not clear, and this test is
doomed to fail no matter what I'm going to feed as an input.
Plus if I go where the building cache is at, and I type 

[ code ]
cmake -LAH | grep FFI
[ /code ]

I can see that the FFI related cache entries are correctly expanded to

[ code ]
FFI_INCLUDE_DIR:PATH="/opt/lib64/libffi/3.0.13/include"
FFI_INCLUDE_PATH:PATH="/opt/lib64/libffi/3.0.13/include/ffi.h"
FFI_LIBRARY_DIR:PATH="/opt/lib64/libffi/3.0.13/lib"
FFI_LIBRARY_PATH:FILEPATH="/opt/lib64/libffi/3.0.13/lib/libffi.so"
[ /code ]

-----
this is about the r206684 from the svn trunk, I also posted my configuration
and softwares used in a dedicated discussion on llvm-dev here
<a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-April/072312.html">http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-April/072312.html</a></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>