Skip to content

docs.rs failed to build argmin-0.2.6 #728

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

Closed
stefan-k opened this issue Apr 23, 2020 · 6 comments
Closed

docs.rs failed to build argmin-0.2.6 #728

stefan-k opened this issue Apr 23, 2020 · 6 comments
Labels
C-build-failure Category: This is a crate that failed to build

Comments

@stefan-k
Copy link

Crate name: argmin
Build failure link: https://docs.rs/crate/argmin/0.2.6/builds/206318

Additional details:
Hi,

First of all thanks for providing this amazing service!
It was just pointed out to me that the docs of the argmin crate were not built successfully. It worked for 0.2.4, but fails since 0.2.5. I have to admit that I'm a bit lost and don't know where to start looking for solutions.
Since the error originates in a dev-dependency, I was wondering if it is possible for me to deactivate dev-dependencies during the docs build.

This is the relevant part of the build log:

[INFO] [stderr] error: failed to run custom build command for `openblas-src v0.7.0`
[INFO] [stderr] 
[INFO] [stderr] Caused by:
[INFO] [stderr]   process didn't exit successfully: `/opt/rustwide/target/debug/build/openblas-src-13fdc4d8599cd912/build-script-build` (exit code: 101)
[INFO] [stderr] --- stdout
[INFO] [stderr] Running: `"cp" "cp" "-R" "source" "source_x86_64-unknown-linux-gnu_tmp"`
[INFO] [stderr] 
[INFO] [stderr] --- stderr
[INFO] [stderr] cp: cannot create directory 'source_x86_64-unknown-linux-gnu_tmp': Read-only file system
[INFO] [stderr] thread 'main' panicked at 'Failed: `"cp" "cp" "-R" "source" "source_x86_64-unknown-linux-gnu_tmp"` (exit code: 1)', /opt/rustwide/cargo-home/registry/src/git.colasdn.top-1ecc6299db9ec823/openblas-src-0.7.0/build.rs:68:17
[INFO] [stderr] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Any help is highly appreciated! Thanks! :)

@stefan-k stefan-k added the C-build-failure Category: This is a crate that failed to build label Apr 23, 2020
@jyn514
Copy link
Member

jyn514 commented Apr 23, 2020

This is because openblas-src is trying to modify the source directory, which is not allowed. This is fixed in the latest 0.9.0 release of openblas.

It seems odd that we're trying to build dev-dependencies. I tried to clone https://github.com/argmin-rs/argmin to verify myself, but since GitHub is giving 500s right now I can't check until later.

@jyn514
Copy link
Member

jyn514 commented Apr 23, 2020

Hmm, this is interesting, cargo +nightly doc --lib --no-deps doesn't compile openblas-sys when I run it locally, but it does in a docs.rs instance.

@jyn514
Copy link
Member

jyn514 commented Apr 23, 2020

Aha, the issue is that even though openblas-sys is a dev-dependency on master, it is a normal dependency on argmin 0.2.6.

@stefan-k
Copy link
Author

This is strange. I can't find openblas-sys in the Cargo.toml of 0.2.5 (here). So I thought maybe you meant via argmin_core 0.2.5, but I also can't find it there. So I guess it must be via another dependency; however, the only one I can think of is ndarray-linalg in argmin_core, but there, the openblas feature gate is not provided. But maybe it still needs it for some reason.

It seems as if argmin_core is the culprit, but since this is now deprecated anyways I think I can just go ahead with a new release of argmin and hope that it works :)

Thanks a lot for the help, I really appreciate it! :)

@jyn514
Copy link
Member

jyn514 commented Apr 24, 2020

I recommend using cargo tree, which will show you which dependencies you pull in and why.

$ cargo tree -p openblas-src -i
openblas-src v0.7.0
├── blas-src v0.4.0
│   └── ndarray-linalg v0.12.0
│       └── modcholesky v0.1.2
│           └── argmin_core v0.2.5
│               └── argmin v0.2.6 (/home/joshua/src/argmin)
│       [dev-dependencies]
│       └── argmin v0.2.6 (/home/joshua/src/argmin) (*)
└── lapack-src v0.4.0
    └── ndarray-linalg v0.12.0 (*)

@stefan-k
Copy link
Author

Thanks for the tip!
I guess this is solved, so I'll close it.

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

2 participants