moore icon indicating copy to clipboard operation
moore copied to clipboard

Build and Install problems in moore

Open DeepFlyingSky opened this issue 2 years ago • 5 comments

Follow the README.md to build the lllvm and then circt.

It will raise an error

CMake Error at llvm/install/lib/cmake/llvm/AddLLVM.cmake:1820 (add_dependencies):
  The dependency target "mlir-cpu-runner" of target "check-circt" does not
  exist.
Call Stack (most recent call first):
  llvm/install/lib/cmake/llvm/AddLLVM.cmake:1841 (add_lit_target)
  test/CMakeLists.txt:41 (add_lit_testsuite)

It's because the llvm upstream no longer support auto build mlir-cpu-runner, unless you check the LLVM_NATIVE_ARCH

Do not build llc and mlir-cpu-runner to run MLIR tests

We can change -DLLVM_TARGETS_TO_BUILD="" to -DLLVM_TARGETS_TO_BUILD="host" in cmake settings.

And I still cannot run cargo install moore success, in spite of cargo build get approved. I'm new to rust and learning it now. The error message is follow

  cargo:rustc-link-lib=dylib=pthread
  cargo:rustc-link-lib=dylib=m
  cargo:rustc-link-lib=dylib=z
  cargo:rustc-link-lib=dylib=tinfo
  cargo:rerun-if-changed=wrapper.h

  --- stderr
  wrapper.h:20:10: fatal error: 'mlir-c/Dialect/Standard.h' file not found
  wrapper.h:20:10: fatal error: 'mlir-c/Dialect/Standard.h' file not found, err: true
  thread 'main' panicked at 'Unable to generate bindings: ()',

DeepFlyingSky avatar Apr 20 '22 06:04 DeepFlyingSky

Same issue!

gussmith23 avatar Jul 12 '22 02:07 gussmith23

Sorry for taking so long to respond to this! Thanks a lot for the great feedback :+1: I'll add the ="host" part to the README. What operating system are you working on where you see the cargo install moore failure?

fabianschuiki avatar Jul 12 '22 08:07 fabianschuiki

OS message is follow

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal

I try the new cmake build setting you just edit , add with -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_LLD=ON to enable compile fast. Meet the same problem mentioned.

More about the error msg:

   Compiling moore-circt-sys v0.14.0
error: failed to run custom build command for `moore-circt-sys v0.14.0`

Caused by:
  process didn't exit successfully: `/tmp/cargo-installP2unrS/release/build/moore-circt-sys-66dee342c323f8c3/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-env-changed=CIRCT_SYS_CIRCT_DIR
......
  cargo:rustc-link-lib=dylib=tinfo
  cargo:rerun-if-changed=wrapper.h

  --- stderr
  wrapper.h:20:10: fatal error: 'mlir-c/Dialect/Standard.h' file not found
  wrapper.h:20:10: fatal error: 'mlir-c/Dialect/Standard.h' file not found, err: true
  thread 'main' panicked at 'Unable to generate bindings: ()', /home/zhh/.cargo/registry/src/github.com-1ecc6299db9ec823/moore-circt-sys-0.14.0/build.rs:113:10
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile `moore v0.14.0`, intermediate artifacts can be found at `/tmp/cargo-installP2unrS`

Caused by:
  build failed

DeepFlyingSky avatar Jul 13 '22 05:07 DeepFlyingSky

I am having the same issue as the one mentioned above. Even after rolling back both my LLVM and CIRCT builds and using crate install --path . I am unable to build Moore. There appear to be some significant updates on the LLVM side that have broken the Moore build. Is there a timeline for a Moore update?

samerogers avatar Aug 23 '22 21:08 samerogers

I have the same problem. Is there any update?

Phantom1003 avatar Oct 30 '22 08:10 Phantom1003