EH failures in MCJIT

After re-cmaking and rebuilding everything from scratch, I'm seeing failures in MCJIT. It this something known or expected? I build LLVM/clang with pre-packaged clang-3.7.0, with "-stdlib=libc++".

Example failure:

/w/bld/org/./bin/lli -remote-mcjit -mcjit-remote-process=/w/bld/org/./bin/lli-child-target /w/src/llvm.org/test/ExecutionEngine/MCJIT/remote/eh.ll

Hi Krzysztof,

If I understand correctly you’re building LLVM top-of-tree with 3.7.0?
Or is this a bug in 3.7.0?

What operating system are you on?

Cheers,
Lang.

Hi Lang,

I am on Ubuntu 14.04.
I am building ToT: llvm, clang, polly, lld, compiler-rt, libcxx, libcxxabi.
The build compiler is: clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04
The failures show up during "make check-all".

My cmake command was:

cmake -G 'Unix Makefiles'
   -DCMAKE_BUILD_TYPE=Release
   -DCMAKE_INSTALL_PREFIX=/w/c/org
   -DLLVM_TARGETS_TO_BUILD:STRING=all
   -DLLVM_BUILD_RUNTIME:BOOL=ON
   -DLIBCLANG_BUILD_STATIC=ON
   -DLLVM_ENABLE_PIC:BOOL=ON
   -DLLVM_ENABLE_ASSERTIONS:BOOL=ON
   -DLLVM_INCLUDE_TOOLS:BOOL=ON
   -DLLVM_LIT_ARGS:STRING="-s -v"
   -DWITH_POLLY:BOOL=ON
   -DLINK_POLLY_INTO_TOOLS:BOOL=ON
-DCMAKE_C_COMPILER=/w/c/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang
-DCMAKE_CXX_COMPILER=/w/c/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang++
   -DCMAKE_CXX_FLAGS='-stdlib=libc++'
   -DCMAKE_BUILD_WITH_INSTALL_RPATH=1
'-DCMAKE_INSTALL_RPATH:STRING=/w/c/clang+llvm-3.7.0-x86_64-linux-gnu-ubuntu-14.04/lib'
   -DCMAKE_EXE_LINKER_FLAGS='-lc++ -lc++abi'
   -DCMAKE_SHARED_LINKER_FLAGS='-lc++ -lc++abi'
   /w/src/llvm.org

-Krzysztof

I recognize these failures, and I think they should be fixed when building with clang 3.8. IIRC the cause of the errors is that libc++abi.so linked to the wrong unwinding libraries pre-3.8. I believe the relevant commit is r255559 (http://reviews.llvm.org/rL255559).

PS. You should use -DLLVM_ENABLE_LIBCXX=ON instead of -DCMAKE_CXX_FLAGS=‘-stdlib=libc++’.

/Eric

Thanks. I'll switch to 3.8 once it's released.

-Krzysztof

You don’t even have to switch to a full 3.8 stack. You just have to install a new libc++abi.so, which you can build with 3.7.

Thanks very much Eric. :slight_smile:

I have replaced libc++abi.so and .a in my 3.7.0 installation with the ones from ToT and everything is clean again.

Thanks for help!

-Krzysztof