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

docs.rs build failed due to tensorflow-sys #2713

Open
harloc-AI opened this issue Jan 9, 2025 · 1 comment
Open

docs.rs build failed due to tensorflow-sys #2713

harloc-AI opened this issue Jan 9, 2025 · 1 comment

Comments

@harloc-AI
Copy link

harloc-AI commented Jan 9, 2025

Crate name

rustai_abalone

Build failure link

https://docs.rs/crate/rustai_abalone/0.1.1/builds/1614420

Additional details

Hello everyone,

Locally generating the docs worked and also my github workflow runs all tests successfully.

I think at the core of this problem is the following:

[INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op
[INFO] [stderr]    Compiling tensorflow-sys v0.24.0
[INFO] [stderr] error: failed to run custom build command for `tensorflow-sys v0.24.0`

The build environment has some troubles to build tensorflow-sys.

Is there a chance, that I can make some specification that can help?
Is there any other way to run the build for docs.rs?
What will be the next steps?

Thank you for every help!

All my best,

Harald Locke

@syphar
Copy link
Member

syphar commented Jan 10, 2025

for these kind of build configurations we have two documentation pages:

Also it's always helpful to look at how the tensorflow-sys crate itself is configuring its build:
https://github.com/tensorflow/rust/blob/454da033e4eb5ac3fff96c7bed9734c49d7e3bd3/tensorflow-sys/Cargo.toml#L18-L19

In this case you see there is a special private/docs-rs feature.

My guess is they are using one of the techniques for building with system dependencies:

having a private feature that makes your crate build without the system dependencies, since most of the time the API/interface you're documenting doesn't actually change depending on the system dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants