Skip to content

crassipes-0.2.0 build failure #1299

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
drdeaton opened this issue Mar 4, 2021 · 14 comments
Closed

crassipes-0.2.0 build failure #1299

drdeaton opened this issue Mar 4, 2021 · 14 comments
Labels
C-build-failure Category: This is a crate that failed to build S-waiting-on-crate-author Status: This is a build failure that has to be fixed by the crate author, not the docs.rs team

Comments

@drdeaton
Copy link

drdeaton commented Mar 4, 2021

Crate name: Crassipes
Build failure link: https://docs.rs/crate/crassipes/0.2.0/builds/355997

Additional details: Its failing to build because a dependency, crs-bind, which is based directly on the crate vex-rt (which does build) isn't able to build due to code that is present in the original vex-rt crate. The documentation builds and displays fine both on my local machine and in Gitlab CI. crs-bind also builds and documents fine on its own.

@jyn514
Copy link
Member

jyn514 commented Mar 4, 2021

@Dysproh can you replicate this failure locally?

@drdeaton
Copy link
Author

drdeaton commented Mar 4, 2021

No

@jyn514
Copy link
Member

jyn514 commented Mar 4, 2021

@Dysproh do you have a lockfile, maybe? I suspect there's a transitive dependency that changed.

@drdeaton
Copy link
Author

drdeaton commented Mar 4, 2021

the lockfile being cargo.lock? From which project?

@Nemo157
Copy link
Member

Nemo157 commented Mar 4, 2021

The build log looks odd to me, why is it Compiling crs-bind rather than just Checking it, it's a non-build dependency.

EDIT: Ah, it has a build script, that's probably what's being compiled and fails.

@drdeaton
Copy link
Author

drdeaton commented Mar 4, 2021

it has to run bindgen to create ffi bindings. Is there a better way to do this?

It still doesnt fail to doc on gitlab or my machine. Might this be an issue with the version of alloc or core used on docs.rs? Not exactly sure how the compiler decides on which version of those crates to use

@Nemo157
Copy link
Member

Nemo157 commented Mar 4, 2021

The error is valid on some platforms and unrelated to the build-script or generated code.

In ptr::copy(cstring, s.as_mut_ptr(), len); the cstring: *const c_char and s: String, the String always has a u8 buffer while c_char is either i8 or u8 depending on platform.

cargo build --target x86_64-pc-windows-msvc fails similarly for me in crs-bind, I'm not sure why the default linux build failed since afaik that should be a u8 using platform, or why the crs-bind doc build itself succeeded for -msvc 😕

@drdeaton
Copy link
Author

drdeaton commented Mar 4, 2021

Thats interesting. Anyway, these crates should only be built ever for armv7a-vex-eabi, which is just armv7a-none-eabi afaik. Is there any way to make docs.rs only target that platform?

@Nemo157
Copy link
Member

Nemo157 commented Mar 4, 2021

See the targets section in https://docs.rs/about/metadata

@drdeaton
Copy link
Author

drdeaton commented Mar 4, 2021

I tried using targets = ["armv7a-vex-eabi.json"] but now its giving me this: https://docs.rs/crate/crs-bind/0.1.5/builds/357704

@Nemo157
Copy link
Member

Nemo157 commented Mar 4, 2021

The .cargo/config is stripped before the build, so -Zbuild-std isn't used, there's also no currently no way to pass custom arguments to cargo during the build.

@jyn514 do you think it might be appropriate to add cargo-args to the metadata in order to support flags like -Zbuild-std=std,alloc like this build would need?

@jyn514
Copy link
Member

jyn514 commented Mar 4, 2021

Sure, cargo-args seems useful.

@jyn514
Copy link
Member

jyn514 commented Jun 12, 2021

cargo-args was added in #1374, so you can start using -Z build-std now if you like.

@jyn514 jyn514 added C-build-failure Category: This is a crate that failed to build S-waiting-on-crate-author Status: This is a build failure that has to be fixed by the crate author, not the docs.rs team labels Jun 12, 2021
@syphar
Copy link
Member

syphar commented Aug 2, 2023

From my understanding, this could be solved with #2107?

@syphar syphar closed this as completed Oct 24, 2023
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 S-waiting-on-crate-author Status: This is a build failure that has to be fixed by the crate author, not the docs.rs team
Projects
None yet
Development

No branches or pull requests

4 participants