Skip to content

Issue building LLMV pass #1

@MFijneman

Description

@MFijneman

For the master branch, it is not clear from the description which version of cmake, GCC and LLVM are used. This makes it very difficult to actually build the LLVM pass.

From the source files, I deduced that LLVM should be 3.7.0 or 3.7.1. But when trying to build the pass with LLVM on ubuntu 16.04, I obtain the following error:

alpaca@alpaca-VirtualBox:~/alpaca-oopsla2017/ext/alpaca/LLVM/build$ LLVM_DIR=/opt/llvm/share/llvm/cmake cmake ..
-- The C compiler identification is GNU 4.7.3
-- The CXX compiler identification is GNU 4.7.3
-- Check for working C compiler: /usr/bin/gcc-4.7
-- Check for working C compiler: /usr/bin/gcc-4.7 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/g++-4.7
-- Check for working CXX compiler: /usr/bin/g++-4.7 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/alpaca/alpaca-oopsla2017/ext/alpaca/LLVM/build
alpaca@alpaca-VirtualBox:~/alpaca-oopsla2017/ext/alpaca/LLVM/build$ makeScanning dependencies of target AlpacaPass
[ 14%] Building CXX object src/CMakeFiles/AlpacaPass.dir/AlpacaPass.cpp.o
/home/alpaca/alpaca-oopsla2017/ext/alpaca/LLVM/src/AlpacaPass.cpp: In function ‘void get_gv_list(llvm::Module*)’:
/home/alpaca/alpaca-oopsla2017/ext/alpaca/LLVM/src/AlpacaPass.cpp:8:24: error: no matching function for call to ‘std::vector<llvm::GlobalVariable*>::push_back(llvm::Module::global_iterator&)’
/home/alpaca/alpaca-oopsla2017/ext/alpaca/LLVM/src/AlpacaPass.cpp:8:24: note: candidates are:
In file included from /usr/include/c++/4.7/vector:65:0,
                 from /opt/llvm/include/llvm/PassInfo.h:17,
                 from /opt/llvm/include/llvm/PassSupport.h:26,
                 from /opt/llvm/include/llvm/Pass.h:381,
                 from /home/alpaca/alpaca-oopsla2017/ext/alpaca/LLVM/src/include/global.h:4,
                 from /home/alpaca/alpaca-oopsla2017/ext/alpaca/LLVM/src/include/AnalyzeTasks.h:4,
                 from /home/alpaca/alpaca-oopsla2017/ext/alpaca/LLVM/src/include/AlpacaPass.h:4,
                 from /home/alpaca/alpaca-oopsla2017/ext/alpaca/LLVM/src/AlpacaPass.cpp:1:
/usr/include/c++/4.7/bits/stl_vector.h:881:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = llvm::GlobalVariable*; _Alloc = std::allocator<llvm::GlobalVariable*>; std::vector<_Tp, _Alloc>::value_type = llvm::GlobalVariable*]
/usr/include/c++/4.7/bits/stl_vector.h:881:7: note:   no known conversion for argument 1 from ‘llvm::Module::global_iterator {aka llvm::ilist_iterator<llvm::GlobalVariable>}’ to ‘llvm::GlobalVariable* const&’
/usr/include/c++/4.7/bits/stl_vector.h:899:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = llvm::GlobalVariable*; _Alloc = std::allocator<llvm::GlobalVariable*>; std::vector<_Tp, _Alloc>::value_type = llvm::GlobalVariable*]
/usr/include/c++/4.7/bits/stl_vector.h:899:7: note:   no known conversion for argument 1 from ‘llvm::Module::global_iterator {aka llvm::ilist_iterator<llvm::GlobalVariable>}’ to ‘llvm::GlobalVariable*&&’
make[2]: *** [src/CMakeFiles/AlpacaPass.dir/AlpacaPass.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/AlpacaPass.dir/all] Error 2
make: *** [all] Error 2

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