mlir-sys icon indicating copy to clipboard operation
mlir-sys copied to clipboard

build fails with mlir 18.1.6

Open jerielverissimo opened this issue 1 year ago • 1 comments

Hi folks, I'm trying to build this lib on my environment (ArchLinux) with LLVM 18 installed: 18.1.8 but I'm facing the following error:

error: library name must not be empty

error: could not compile `mlir-sys` (lib) due to 1 previous error

jerielverissimo avatar Jul 27 '24 14:07 jerielverissimo

I had to compile LLVM w/ MLIR/TableGen myself and point the 3 envvars LLVM_SYS_190_PREFIX, MLIR_SYS_190_PREFIX, and TABLEGEN_190_PREFIX to my install location to fix this problem. It's because of the way LLVM from the Arch repositories is compiled I think. The llvm-sys and inkwell have features to fix this by preferring static linking, but it appears mlir-sys and melior don't yet. I think the only version that works for all 3 right now is 19.x too, but someone can correct me if I'm wrong.

LordGoatius avatar Mar 30 '25 01:03 LordGoatius