lpython icon indicating copy to clipboard operation
lpython copied to clipboard

llvm/Transforms/IPO/PassManagerBuilder.h: No such file or directory

Open Kazade opened this issue 1 year ago • 3 comments

I've just tried to compile on Fedora 39, and I've hit this error:

evaluator.cpp:39:10: fatal error: llvm/Transforms/IPO/PassManagerBuilder.h: No such file or directory
   39 | #include <llvm/Transforms/IPO/PassManagerBuilder.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

According to this LLVM issue, this header file was removed in LLVM 17. Presumably lpython needs to be updated to support later LLVM?

I couldn't find anyone else reporting this so I don't know if it's something I've done wrong..

Kazade avatar Apr 17 '24 08:04 Kazade

Found the same error trying to build on msys2/ucrt64. The llvm version in this environment is llvm-18.1.4

another problem is, that

#include <llvm/Transforms/Vectorize.h>

has to be replace with

#include <llvm/Transforms/Vectorize/LoopVectorize.h>
#include <llvm/Transforms/Vectorize/SLPVectorizer.h>

I didn't found an reference of which llvm has to be used right now.

carlkl avatar Apr 29 '24 14:04 carlkl

Yes, we don't support LLVM 17 yet. All our frontends have to be update for it.

certik avatar Apr 29 '24 19:04 certik

see https://github.com/lcompilers/lpython/issues/2678 for a first test with llvm-15 on msys2-clang64.

carlkl avatar May 01 '24 15:05 carlkl