jermp/fulgor

Error in ggcat_querier compilation

nsapoval opened this issue · 5 comments

When installing on a x86_64 Linux system, during the GGCAT API compilation step the following error occurs

error: to use a constant of type `TypeId` in a pattern, `TypeId` must be annotated with `#[derive(PartialEq, Eq)]`

However, if I manually check out GGCAT repo at 793471d, and then proceed with the compilation, everything compiles correctly. (I am using nightly Rust)

It looks that the ggcat repo in the external should be updated to the above version, instead of the one it uses right now.

jermp commented

Hello @nsapoval,
I'm not able to replicate this issue. I successfully compile the library on both Mac OS (x86 and ARM) and Linux x86 (tried on three different machines).

What Rust compiler version are you using?

I'm reporting the ones I tested below:

rustc 1.69.0 (84c898d65 2023-04-16)
rustc 1.68.2 (9eb3afe9e 2023-03-27)

CC: Hi @rob-p, have you also seen this issue?

rob-p commented

Hi @jermp,

It worked fine but then I upgraded the nightly compiler and got the same error as @nsapoval:

error: to use a constant of type `TypeId` in a pattern, `TypeId` must be annotated with `#[derive(PartialEq, Eq)]`
   --> crates/assembler_minimizer_bucketing/src/lib.rs:212:1
    |
212 | / #[dynamic_dispatch(H = [
213 | |     hashes::cn_nthash::CanonicalNtHashIteratorFactory,
214 | |     #[cfg(not(feature = "devel-build"))] hashes::fw_nthash::ForwardNtHashIteratorFactory
215 | | ], CX = [
216 | |     #[cfg(not(feature = "devel-build"))] colors::bundles::multifile_building::ColorBundleMultifileBuilding,
217 | |     colors::non_colored::NonColoredManager,
218 | | ])]
    | |___^
    |
    = note: the traits must be derived, manual `impl`s are not sufficient
    = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
    = note: this error originates in the attribute macro `dynamic_dispatch` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `ggcat_assembler_minimizer_bucketing` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
make[3]: *** [lib/libggcat_cpp_bindings.a] Error 101
make[2]: *** [CMakeFiles/ggcat_cpp_api] Error 2
make[1]: *** [CMakeFiles/ggcat_cpp_api.dir/all] Error 2
make: *** [all] Error 2

Specifically, if you do rustup update, you will get the latest compiler (if you're on the nightly branch). For me this is now rustc 1.72.0-nightly (101fa903b 2023-06-04). On that compiler we observe the above error.

--Rob

jermp commented

Oh ok, thanks for verifying!
I saw the GGCAT repo was updated recently so that's probably why it works now with the newer version of the compiler.

We need to check if the latest commit in the original repo compiles on Mac too; I needed to hack it to make it work.
Will do tomorrow!

jermp commented

Just sent this pull request algbio/ggcat#29 to let GGCAT compile on Mac OS too.
After that has been merged, we can safely update the dependency to the main GGCAT repo.
Thanks!

jermp commented

Fixed, as of algbio/ggcat@3d303fb.