Skip to content

archer build failure with llvm 9 #91

@lee218llnl

Description

@lee218llnl

It looks like Archer fails to build with LLVM 9:

[ 26%] Building CXX object lib/CMakeFiles/LLVMArcher.dir/Transforms/Instrumentation/InstrumentParallel.cpp.o
/usr/workspace/lee218/delete/spack-ulna-openmpi/ArcherBuild/archer/lib/Transforms/Instrumentation/InstrumentParallel.cpp:188:45: error: no matching function for call to 'cast'
    Function* __tsan_default_suppressions = cast<Function>(M->getOrInsertFunction("__tsan_default_suppressions",
                                            ^~~~~~~~~~~~~~
/usr/workspace/lee218/delete/spack-ulna-openmpi/opt/spack/linux-rhel7-broadwell/gcc-8.1.0/llvm-9.0.0-7onw4vzicjqun2vojttomwc7egcfmsu4/include/llvm/Support/Casting.h:256:44: note: candidate function [with X = llvm::Function, Y = llvm::FunctionCallee] not viable: expects an l-value for 1st argument
inline typename cast_retty<X, Y>::ret_type cast(Y &Val) {
                                           ^
/usr/workspace/lee218/delete/spack-ulna-openmpi/opt/spack/linux-rhel7-broadwell/gcc-8.1.0/llvm-9.0.0-7onw4vzicjqun2vojttomwc7egcfmsu4/include/llvm/Support/Casting.h:249:1: note: candidate template ignored: requirement '!is_simple_type<llvm::FunctionCallee>::value' was not satisfied [with X = llvm::Function, Y = llvm::FunctionCallee]
cast(const Y &Val) {
^
/usr/workspace/lee218/delete/spack-ulna-openmpi/opt/spack/linux-rhel7-broadwell/gcc-8.1.0/llvm-9.0.0-7onw4vzicjqun2vojttomwc7egcfmsu4/include/llvm/Support/Casting.h:263:46: note: candidate template ignored: could not match 'Y *' against 'llvm::FunctionCallee'
inline typename cast_retty<X, Y *>::ret_type cast(Y *Val) {
                                             ^
/usr/workspace/lee218/delete/spack-ulna-openmpi/opt/spack/linux-rhel7-broadwell/gcc-8.1.0/llvm-9.0.0-7onw4vzicjqun2vojttomwc7egcfmsu4/include/llvm/Support/Casting.h:271:1: note: candidate template ignored: could not match 'unique_ptr<type-parameter-0-1, default_delete<type-parameter-0-1> >' against 'llvm::FunctionCallee'
cast(std::unique_ptr<Y> &&Val) {
^
/usr/workspace/lee218/delete/spack-ulna-openmpi/ArcherBuild/archer/lib/Transforms/Instrumentation/InstrumentParallel.cpp:204:15: error: no viable conversion from 'llvm::FunctionCallee' to 'llvm::Constant *'
    Constant* constant = M->getOrInsertFunction("__archer_get_omp_status",
              ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
make[2]: *** [lib/CMakeFiles/LLVMArcher.dir/Transforms/Instrumentation/InstrumentParallel.cpp.o] Error 1
make[1]: *** [lib/CMakeFiles/LLVMArcher.dir/all] Error 2
make: *** [all] Error 2

This appears to be related to https://bugs.freedesktop.org/show_bug.cgi?id=109540. A proper fix may look something like the commit pointed to in the previous link: llvm-mirror/llvm@9ec60d7#diff-295d2c56655729b2bd6dc1dfca7c2f0e.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions