10XGenomics / scHLAcount

Count HLA alleles in single-cell RNA-seq data
MIT License
58 stars 12 forks source link

Cannot build -- referenced git submodule is not readable w/o a password #12

Closed ppapadopoulos closed 4 years ago

ppapadopoulos commented 4 years ago

Attempting to build from the head of your tree. (or your 0.1.0 version, both have the same problem) https://github.com/rust-bio/htslib.git is not readable. Is this intentional?

In the checkout scHLAcount/git/checkouts/rust-htslib-ac43057d2e45ec9e/18072e0

cat .gitmodules

[submodule "htslib"] path = htslib url = https://github.com/rust-bio/htslib.git

cdarby commented 4 years ago

I was able to build the executable just now with no issues. In which file are you finding this incorrect URL for rust-htslib? I don't think it's in our code. Our code only refers to the rust-htslib dependency here: https://github.com/10XGenomics/scHLAcount/blob/master/Cargo.toml#L19

ppapadopoulos commented 4 years ago

Digging into the details, I think it may be because you can automatically download and I cannot. OR you already have a cached version of the repository that is unavailable generally.

In the checked-out repository scHLAcount-0.1.0/git/checkouts/rust-htslib-ac43057d2e45ec9e/18072e0
and in that checkout is the htslib submodule definition scHLAcount-0.1.0/git/checkouts/rust-htslib-ac43057d2e45ec9e/18072e0/.gitmodules and it's contents are: [submodule "htslib"] path = htslib url = https://github.com/rust-bio/htslib.git <=== This is what I CANNOT see. even as an authenticated user in github

There is no htslib repo under rust bio that is visible to me. So the submodule checkout fails when I try to build. I'm guessing that you are either authenticated OR already have a cached version of this repo on your build machine.

Here's the full output that I get.

$ export CARGO_HOME=$(pwd) $ cargo build Updating crates.io index Updating git repositoryhttps://github.com/10XGenomics/rust-debruijn Updating git repositoryhttps://github.com/10XGenomics/rust-pseudoaligner.git Updating git repositoryhttps://github.com/rust-bio/rust-htslib.git **Updating git submodulehttps://github.com/rust-bio/htslib.git** error: failed to getrust-htslibas a dependency of packagesc_hla_count v0.1.0 (/tmp/scHLAcount-0.1.0)`

Caused by: failed to load source for dependency rust-htslib

Caused by: Unable to update https://github.com/rust-bio/rust-htslib.git?rev=18072e0faf909ed19da4d1226a35c239a4b4292e#18072e0f

Caused by: failed to update submodule htslib

Caused by: failed to fetch submodule htslib from https://github.com/rust-bio/htslib.git

Caused by: failed to authenticate when downloading repository attempted to find username/password via git's credential.helper support, but failed

Caused by: failed to acquire username/password from local configuration

`

cdarby commented 4 years ago

Thank you for the extended information. It seems that rust-htslib updated their .gitmodules to use samtools/htslib and recently removed this rust-bio/htslib - which must be cached on my machine as you say (I don't see it on Github when authenticated either). This is an issue because we have a dependency on the git repository of rust-htslib and not the crate. I have updated the Cargo.toml file (and one place in the source code) to depend on the crate. If you could try and build again - from the master branch not the release - and let me know if it succeeds.

ppapadopoulos commented 4 years ago

Thanks for looking at this. I now get almost all the way through the build, but fails in the final stage of building rust-htslib. (nearly all the way through) Toolchain is: rust 1.45, llvm-10.0.0, clang-10.0.0, gcc-8.4.0.

Built with export CARGO_HOME=$(pwd) cargo build --release

Here's the leading error.

Compiling rust-htslib v0.25.0 error[E0277]:htslib::htsFilebindgen_ty_1doesn't implementstd::fmt::Debug --> /tmp/scHLAcount/target/release/build/rust-htslib-47287e54c86a5946/out/bindings.rs:3:33295 help: the traitstd::fmt::Debugis not implemented forhtslib::htsFilebindgen_ty_1 = note: add#[derive(Debug)]or manually implementstd::fmt::Debug = note: required because of the requirements on the impl ofstd::fmt::Debugfor&htslib::htsFile__bindgen_ty_1 = note: required for the cast to the object typedyn std::fmt::Debug` = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: htslib::hts_opt__bindgen_ty_1 doesn't implement std::fmt::Debug --> /tmp/scHLAcount/target/release/build/rust-htslib-47287e54c86a5946/out/bindings.rs:3:43063

`

cdarby commented 4 years ago

I'm afraid I don't know enough about this specific error or the rust-htslib project to know why this error is happening and rust-htslib 0.25.0 won't compile for you.

@pmarks Could you by chance take a look at this user's compilation error?

Alternatively @ppapadopoulos you could seek assistance directly from the rust-htslib team.

ppapadopoulos commented 4 years ago

@cdarby ... I opened an issue yesterday on the rust-htslib github. (https://github.com/rust-bio/rust-htslib/issues/229). Thanks, Phil

cdarby commented 4 years ago

I read the issue you opened at rust-htslib, and I'm a bit confused. I thought that changing our software to depend on a crate version of rust-htslib resolved the issue that they've since removed the repo rust-htslib/htslib.git. (Depending on a github version was not a stable choice for us and is ultimately our problem not theirs, and I appreciate your catch very much.) As you commented above, you now encounter an issue compiling the crate version of 0.25.0 - which I thought would be what you'd inquire to them about.

pmarks commented 4 years ago

@ppapadopoulos can you try again w/ latest master? I've update to the latest rust-htslib which should fix this issue.

ppapadopoulos commented 4 years ago

Thank you! @pmarks and @cdarby.
Build is now working without error,

Compiling rust-htslib v0.32.0 Compiling debruijn_mapping v0.2.0 (https://github.com/10XGenomics/rust-pseudoaligner.git?rev=ae4aadbce921d3233e3bd9b3ee8a8466804b20ad#ae4aadbc) **Compiling sc_hla_count v0.1.0 (/tmp/scHLAcount) Finished release [optimized + debuginfo] target(s) in 2m 44s**