Bug 235213 - devel/ikos: fails to build with llvm80
Summary: devel/ikos: fails to build with llvm80
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL: https://github.com/NASA-SW-VnV/ikos/i...
Keywords:
Depends on:
Blocks: 235215
  Show dependency treegraph
 
Reported: 2019-01-26 09:09 UTC by Jan Beich
Modified: 2019-01-26 22:16 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (yuri)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2019-01-26 09:09:09 UTC
As only one LLVM version is supported this port shouldn't use LLVM_DEFAULT.

$ echo "DEFAULT_VERSIONS += llvm=80" >>${__MAKE_CONF:-/etc/make.conf}
$ make
[...]
-- Found LLVM: /usr/local/llvm80 (found version "8.0.0") 
CMake Error at frontend/llvm/CMakeLists.txt:127 (message):
  LLVM 7 is required.
[...]
frontend/llvm/src/import/function.cpp:1888:52: error: no viable conversion from 'TinyPtrVector<llvm::DbgVariableIntrinsic *>' to 'TinyPtrVector<llvm::DbgInfoIntrinsic *>'
    llvm::TinyPtrVector< llvm::DbgInfoIntrinsic* > dbg_addrs =
                                                   ^
/usr/local/llvm80/include/llvm/ADT/TinyPtrVector.h:48:3: note: candidate constructor not viable: no known conversion from 'TinyPtrVector<llvm::DbgVariableIntrinsic *>' to 'const llvm::TinyPtrVector<llvm::DbgInfoIntrinsic *> &' for 1st argument
  TinyPtrVector(const TinyPtrVector &RHS) : Val(RHS.Val) {
  ^
/usr/local/llvm80/include/llvm/ADT/TinyPtrVector.h:81:3: note: candidate constructor not viable: no known conversion from 'TinyPtrVector<llvm::DbgVariableIntrinsic *>' to 'llvm::TinyPtrVector<llvm::DbgInfoIntrinsic *> &&' for 1st argument
  TinyPtrVector(TinyPtrVector &&RHS) : Val(RHS.Val) {
  ^
/usr/local/llvm80/include/llvm/ADT/TinyPtrVector.h:111:3: note: candidate constructor not viable: no known conversion from 'TinyPtrVector<llvm::DbgVariableIntrinsic *>' to 'std::initializer_list<DbgInfoIntrinsic *>' for 1st argument
  TinyPtrVector(std::initializer_list<EltTy> IL)
  ^
/usr/local/llvm80/include/llvm/ADT/TinyPtrVector.h:156:3: note: candidate template ignored: could not match 'ArrayRef' against 'TinyPtrVector'
  operator ArrayRef<U>() const {
  ^
/usr/local/llvm80/include/llvm/ADT/TinyPtrVector.h:134:3: note: candidate function
  operator ArrayRef<EltTy>() const {
  ^
/usr/local/llvm80/include/llvm/ADT/TinyPtrVector.h:143:3: note: candidate function
  operator MutableArrayRef<EltTy>() {
  ^
frontend/llvm/src/import/function.cpp:1894:36: error: no member named 'getExpression' in 'llvm::DbgInfoIntrinsic'
                       return dbg->getExpression()->getNumElements() == 0;
                              ~~~  ^
2 errors generated.

build log: https://ptpb.pw/OkhB
Comment 1 Jan Beich freebsd_committer freebsd_triage 2019-01-26 22:05:20 UTC
LLVM < 7 are also not supported. For one, LLVM doesn't have a stable API but https://github.com/NASA-SW-VnV/ikos/commit/a0d88cc005e2 switched to the new API unconditionally.

$ echo "DEFAULT_VERSIONS += llvm=60" >>${__MAKE_CONF:-/etc/make.conf}
$ make
[...]
-- Found LLVM: /usr/local/llvm60 (found version "6.0.0")
CMake Error at frontend/llvm/CMakeLists.txt:127 (message):
  LLVM 7 is required.
[...]
frontend/llvm/src/ikos_pp.cpp:59:10: fatal error: 'llvm/Support/InitLLVM.h' file not found
#include <llvm/Support/InitLLVM.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
frontend/llvm/src/import/function.cpp:552:47: error: no member named 'getDestAlignment' in 'llvm::MemSetInst'; did you mean 'getAlignment'?
                                      memset->getDestAlignment(),
                                              ^~~~~~~~~~~~~~~~
                                              getAlignment
/usr/local/llvm60/include/llvm/IR/IntrinsicInst.h:404:14: note: 'getAlignment' declared here
    unsigned getAlignment() const {
             ^
1 error generated.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2019-01-26 22:15:16 UTC
Ok, thanks, I agree.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-01-26 22:16:08 UTC
A commit references this bug:

Author: yuri
Date: Sat Jan 26 22:15:06 UTC 2019
New revision: 491316
URL: https://svnweb.freebsd.org/changeset/ports/491316

Log:
  devel/ikos: Switch to a fixed LLVM version 70 from LLVM_DEFAULT

  ikos seems to only support a narrow set of versions.

  Also add USE_LDCONFIG.

  PR:		235213
  Reported by:	jbeich

Changes:
  head/devel/ikos/Makefile