DanielGavin / ols

Language server for Odin
MIT License
422 stars 64 forks source link

Assertion failure src/llvm_backend_stmt.cpp #484

Closed sltu closed 2 weeks ago

sltu commented 3 weeks ago

Hi, I got this issue when I started build.sh script (Debian 12, llvm14, clang 14)

ols on master

❯ ./build.sh 
src/llvm_backend_stmt.cpp(1577): Assertion Failure: `are_types_ide​‌​
ntical(e->type, value.type)` 
./build.sh: line 50: 1058026 Illegal instruction     (core dumped)​‌​
 odin build src/ -show-timings -collection:src=src -out:ols -micro​‌​
arch:native -no-bounds-check -o:speed $@
DanielGavin commented 3 weeks ago

This is a compiler bug.

I think it's caused by having an old llvm version. The Linux build for CI is using llvm 17 and it works fine there.

sltu commented 3 weeks ago

Yes, It can be that issue. With llvm 17, do I need to upgrade clang version to 17 also?

DanielGavin commented 3 weeks ago

I'm nearly certain you have to update clang. Pretty sure llvm was installed when you installed clang.

DanielGavin commented 3 weeks ago

But it might be possible to have multiple llvm versions on Debian. I'm not actually sure.