Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regex 1.3.0 fails to build #400

Closed
BurntSushi opened this issue Sep 3, 2019 · 7 comments
Closed

regex 1.3.0 fails to build #400

BurntSushi opened this issue Sep 3, 2019 · 7 comments
Labels
C-build-failure Category: This is a crate that failed to build

Comments

@BurntSushi
Copy link
Member

Here's the build log:

https://docs.rs/crate/regex/1.3.0/builds/182874

I can't seem to make sense of the error and I can't reproduce it, even after installing the same version of Rust nightly as used on docs.rs:

$ rustc --version
rustc 1.39.0-nightly (bea0372a1 2019-08-20)

$ cargo build
   Compiling memchr v2.2.1
   Compiling lazy_static v1.4.0
   Compiling regex-syntax v0.6.12 (/home/andrew/code/rust/regex/regex-syntax)
   Compiling thread_local v0.3.6
   Compiling aho-corasick v0.7.6
   Compiling regex v1.3.0 (/home/andrew/code/rust/regex)
    Finished dev [unoptimized + debuginfo] target(s) in 6.17s

$ cargo doc
 Documenting lazy_static v1.4.0
    Checking lazy_static v1.4.0
 Documenting regex-syntax v0.6.12 (/home/andrew/code/rust/regex/regex-syntax)
    Checking regex-syntax v0.6.12 (/home/andrew/code/rust/regex/regex-syntax)
 Documenting memchr v2.2.1
    Checking memchr v2.2.1
    Checking thread_local v0.3.6
    Checking aho-corasick v0.7.6
 Documenting thread_local v0.3.6
 Documenting aho-corasick v0.7.6
 Documenting regex v1.3.0 (/home/andrew/code/rust/regex)
    Finished dev [unoptimized + debuginfo] target(s) in 4.46s

Any ideas on how to debug this?

@pietroalbini
Copy link
Member

cc @onur @QuietMisdreavus

@Nemo157
Copy link
Member

Nemo157 commented Sep 4, 2019

You have the Cargo.lock in the distributed package. Extracting it and attempting to build with an older compiler I get:

> cargo download regex | tar xz
INFO: cargo-download v0.1.2
INFO: Latest version of crate regex=* is 1.3.0
INFO: Crate `regex==1.3.0` downloaded successfully

> cd regex-1.3.0

> cargo +stable --version
cargo 1.37.0 (9edd08916 2019-08-02)

> cargo +stable build --locked
error: failed to parse lock file at: /tmp/tmp.suvZWYqiw1/regex-1.3.0/Cargo.lock

Caused by:
  invalid serialized PackageId for key `package.dependencies`

While my current nightly (cargo 1.39.0-nightly (3f700ec43 2019-08-19)) appears to be able to handle it fine.

Looking at the lockfile the package ids it has are very different to most of my lockfiles, they're all missing the registry and only a few of them have a version number specified.

@pietroalbini
Copy link
Member

The different lockfile seems to be caused by rust-lang/cargo#7070.

@pietroalbini
Copy link
Member

pietroalbini commented Sep 4, 2019

#402 should fix this issue once a build is rescheduled with it.

@BurntSushi
Copy link
Member Author

You have the Cargo.lock in the distributed package.

Interesting. It's not committed to source control. I didn't know Cargo.lock was included with the package for libraries.

Anyway, thanks so much for the quick debugging! I uploaded regex 1.3.1 using the current stable compiler and that seems to have done the trick: https://docs.rs/regex/1.3.1/regex/

@pietroalbini pietroalbini added the C-build-failure Category: This is a crate that failed to build label Nov 2, 2019
@pietroalbini
Copy link
Member

Sorry for the delay! @jyn514 removed the dependency from Cargo, so I queued a rebuild and the docs are live! https://docs.rs/regex/1.3.0/regex/

@BurntSushi
Copy link
Member Author

@pietroalbini Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-build-failure Category: This is a crate that failed to build
Projects
None yet
Development

No branches or pull requests

3 participants