Regression testing on MSYS2 host with mingw-w64

Hi Yaron,

I know you sent me some emails before about regression testing on MSYS2

So you might have some idea about this

I am getting a regression error on check-llvm.

With the llvm/trunk/test/ExecutionEngine/Interpreter/intrinsics.ll

FAIL: LLVM :: ExecutionEngine/Interpreter/intrinsics.ll (7635 of 14266)
******************** TEST ‘LLVM :: ExecutionEngine/Interpreter/intrinsics.ll’ FAILED ********************
Script:

C:/msys64/home/Martell/llvmbuild/./bin/lli.EXE -O0 -force-interpreter < C:/msys64/home/Martell/llvm/test/ExecutionEngine/Interpreter/intrinsics.ll

Exit Code: 1

Command Output (stdout):

Command 0: “C:/msys64/home/Martell/llvmbuild/./bin/lli.EXE” “-O0” “-force-interpreter”
Command 0 Result: 1
Command 0 Output:

Command 0 Stderr:
LLVM ERROR: Tried to execute an unknown external function: truncf

the same failure happens for trunc, round and copysign.

Commenting out these declarations and calls result in a successful make-check.

– Testing: 14266 tests, 8 threads –
Testing: 0 … 10… 20… 30… 40… 50… 60… 70… 80… 90…
Testing Time: 83.21s
Expected Passes : 10267
Expected Failures : 49
Unsupported Tests : 3950
[100%] Built target check-llvm

Have you any idea on how to fix this

Many Thanks

Martell

This test results in UNSUPPORTED on my system, since config.enable_ffi = “OFF”. This is the result of LLVM_ENABLE_FFI which is OFF by default. Is it turned ON in your build?

Is it turned ON in your build?

Yes it is turned on in my build

here is my build script

PATH=/mingw64/bin:$PATH

FFI_INCLUDE_DIR=“$(pkg-config --cflags libffi)”
FFI_INCLUDE_DIR=$(echo $FFI_INCLUDE_DIR | sed ‘s|-I||g’)

/mingw64/bin/cmake.exe
-G"MSYS Makefiles"
-DCMAKE_MAKE_PROGRAM=“/usr/bin/make.exe”
-DCMAKE_C_COMPILER=“/mingw64/bin/gcc.exe”
-DCMAKE_CXX_COMPILER=“/mingw64/bin/g++.exe”
-DFFI_INCLUDE_DIR=“${FFI_INCLUDE_DIR}”
-DCMAKE_C_FLAGS=“${CFLAGS}”
-DCMAKE_CXX_FLAGS=“${CXXFLAGS} ${CPPFLAGS}”
-DCMAKE_INSTALL_PREFIX=/mingw64
-DCMAKE_BUILD_TYPE=Release
-DLLVM_TARGETS_TO_BUILD=“ARM;AArch64;CppBackend;X86”
-DLLVM_ENABLE_ASSERTIONS=OFF
-DLLVM_ENABLE_THREADS=0
-DPYTHON_EXECUTABLE=/mingw64/bin/python2.exe
-DLLVM_ENABLE_FFI=ON
-DLLVM_ENABLE_SPHINX=ON
…/llvm

Is this not supported?

We do have a build of libffi in mingw-w64 and it works well with other projects.

You may be the first person to try this configuration… it would certainly be good if libffi could be made to work and these tests passing, try to see what the problem and patch it.

I hit a similar problem on Linux but only with gcc5 as host compiler,
see http://comments.gmane.org/gmane.comp.compilers.llvm.devel/86999

Hi Ismail,

They are quite possibly related as i am using gcc 5.2 also :slight_smile:

Did you find any upstream bug for this in gcc ?

I’m looking but can’t seem to find any

Many Thanks

Martell

Hi,