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

Older commits won't work with bazel >= 7

Open j2kun opened this issue 1 year ago • 2 comments
trafficstars

Commit https://github.com/j2kun/mlir-tutorial/commit/e1ffe387ea6aec76796c6c7393ae75bd18edcb61 pins to bazel version 6.4.0, but users who use bazel via bazelisk before that commit will automatically get bazel version 7 (as of this writing) which breaks the build.

j2kun avatar Dec 29 '23 23:12 j2kun

After adding this version control, mlir-opt build error occurred: ERROR: /root/.cache/bazel/_bazel_root/7d2d5cb6fc2680e0070f72926e327143/external/llvm-project/mlir/BUILD.bazel:4089:11: Compiling mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp failed: (Exit 1): gcc failed: error executing command (from target @llvm-project//mlir:LLVMDialect) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++17' -MD -MF ... (remaining 100 arguments skipped). However, builded successful when build target @llvm-project//mlir:LLVMDialect, and then build mlir-opt.

Commit e1ffe38 pins to bazel version 6.4.0, but users who use bazel via bazelisk before that commit will automatically get bazel version 7 (as of this writing) which breaks the build.

jasonlxzz avatar Jan 29 '25 23:01 jasonlxzz

@jasonlxzz I suspect if you had a bazel version error you'd see errors long before a gcc failure, since it would complain about bzlmod.

j2kun avatar Jan 29 '25 23:01 j2kun