Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codon v0.17.0 compilation failure with LLVM 18 #590

Open
admnd opened this issue Sep 13, 2024 · 1 comment
Open

Codon v0.17.0 compilation failure with LLVM 18 #590

admnd opened this issue Sep 13, 2024 · 1 comment

Comments

@admnd
Copy link

admnd commented Sep 13, 2024

On a Gentoo box with LLVM 18.1.8 the build aborts with:

[ 77%] Building CXX object CMakeFiles/codonc.dir/codon/parser/visitors/typecheck/assign.cpp.o
[ 77%] Building CXX object CMakeFiles/codonc.dir/codon/parser/visitors/typecheck/basic.cpp.o
[ 77%] Building CXX object CMakeFiles/codonc.dir/codon/parser/visitors/typecheck/call.cpp.o
/tmp/codon/codon/compiler/memory_manager.cpp: In member function ‘virtual void codon::BoehmGCJITLinkMemoryManager::allocate(const llvm::jitlink::JITLinkDylib*, llvm::jitlink::LinkGraph&, llvm::jitlink::JITLinkMemoryManager::OnAllocatedFunction)’:
/tmp/codon/codon/compiler/memory_manager.cpp:182:13: error: ‘class llvm::orc::AllocGroup’ has no member named ‘getMemLifetimePolicy’; did you mean ‘constexpr const unsigned int llvm::orc::AllocGroup::BitsForLifetimePolicy’? (not accessible from this context)
  182 |         (AG.getMemLifetimePolicy() == llvm::orc::MemLifetimePolicy::Standard)
      |             ^~~~~~~~~~~~~~~~~~~~
In file included from /usr/lib/llvm/18/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h:21,
                 from /usr/lib/llvm/18/include/llvm/ExecutionEngine/JITLink/JITLink.h:20,
                 from /tmp/codon/./codon/cir/llvm/llvm.h:28,
                 from /tmp/codon/codon/compiler/memory_manager.h:9,
                 from /tmp/codon/codon/compiler/memory_manager.cpp:3:
/usr/lib/llvm/18/include/llvm/ExecutionEngine/Orc/Shared/MemoryFlags.h:115:29: note: declared private here
  115 |   static constexpr unsigned BitsForLifetimePolicy = 2;
      |                             ^~~~~~~~~~~~~~~~~~~~~
/tmp/codon/codon/compiler/memory_manager.cpp:182:50: error: ‘llvm::orc::MemLifetimePolicy’ has not been declared
  182 |         (AG.getMemLifetimePolicy() == llvm::orc::MemLifetimePolicy::Standard)
      |                                                  ^~~~~~~~~~~~~~~~~
/tmp/codon/codon/compiler/memory_manager.cpp:186:36: error: expected primary-expression before ‘char’
  186 |     Seg.WorkingMem = SegAddr.toPtr<char *>();
make[2]: *** [CMakeFiles/codonc.dir/build.make:156: CMakeFiles/codonc.dir/codon/compiler/memory_manager.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:812: CMakeFiles/codonc.dir/all] Error 2
@arshajii
Copy link
Contributor

Hi @admnd -- Codon requires LLVM 17 currently. We use a LLVM fork with a few modifications: https://github.com/exaloop/llvm-project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants