lcompilers / lpython

Python compiler
https://lpython.org/
Other
1.5k stars 158 forks source link

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

Open Kazade opened 5 months ago

Kazade commented 5 months ago

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..

carlkl commented 5 months ago

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.

certik commented 5 months ago

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

carlkl commented 5 months ago

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