sprs icon indicating copy to clipboard operation
sprs copied to clipboard

Error building `sprs`

Open MashyBasker opened this issue 4 months ago • 4 comments

What I did

  • Forked and cloned the project
  • run cargo build inside the project

Error encountered

  • Could not find the file Eigen/SparseCore

image

What I tried

  • Try to compile it with Rust nightly(did not work)
  • Tried export dl_eigen=1(did not work)
  • Install eigen2 from AUR(did not work)

MashyBasker avatar Feb 26 '24 16:02 MashyBasker

Could you try cargo build --workspace --exclude sprs-benches or cargo build --workspace --features sprs-benches/dl_eigen? Strange that it does not check find the eigen library. I'll check the setup on my arch install when I'm back at a computer.

mulimoen avatar Feb 26 '24 18:02 mulimoen

After running the two commands you provided, the build process was successful. However, when using cargo build --workspace --features sprs-benches, additional packages were installed, notably vcpkg. Consequently, I assumed that eigen would also be installed. Nevertheless, upon running just cargo build again, the same error as originally posted occurred.

I think it would be good to add the command cargo build --workspace --features sprs-benches/dl_eigen in the sprs-benches/README.md

MashyBasker avatar Feb 27 '24 03:02 MashyBasker

Packages are not installed system-wide, you will need to specify --features sprs-benches/dl_eigen for every cargo invocation, unless you install eigen yourself (package name is eigen).

mulimoen avatar Feb 27 '24 07:02 mulimoen

Yes. I've made a PR for future users who encounter this error while building. Please inform me if I need to make some edits.

MashyBasker avatar Feb 27 '24 09:02 MashyBasker