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

Crates using vulkano-shaders fail to build #2329

Closed
marc0246 opened this issue Nov 20, 2023 · 5 comments
Closed

Crates using vulkano-shaders fail to build #2329

marc0246 opened this issue Nov 20, 2023 · 5 comments

Comments

@marc0246
Copy link

We have a bit of a situation in that all crates that use vulkano-shaders fail to build on docs.rs, at least as of 0.33, for reasons that are beyond me. There's no metadata for docs.rs in vulkano-shaders or any of these crates, and documenting of course works locally.

The following crates are affected:

@Nemo157
Copy link
Member

Nemo157 commented Nov 20, 2023

It may have been rust-lang/rust#111461 giving a wrong error message, but not sure why it would have been erroring at all, I will queue a new build of those versions.

@Nemo157
Copy link
Member

Nemo157 commented Nov 20, 2023

Hmmm, still failed with a more normal error message. I don't see why it's failing though, trying to do a local build using some of the options that docs.rs does doesn't cause any similar sort of failure, and there's no more useful data in the service logs. I can try and debug some more in a local docs.rs instance tomorrow.

@marc0246
Copy link
Author

Thanks a lot! We really appreciate it. It had me stunned as well.

@Nemo157
Copy link
Member

Nemo157 commented Nov 24, 2023

Mostly for future me debugging issues like this, what I eventually did was do the build manually inside the docs.rs build-environment
> docker run -it --rm ghcr.io/rust-lang/crates-build-env/linux-micro /bin/sh
# apt update
# apt install curl
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# . ~/.cargo/env
# cargo install cargo-dl
# cargo dl ilmenite
# cd ilmenite-0.14.0
# cargo check
... errors about missing shaderc library, checked the build.rs and saw they detect docs.rs
# DOCS_RS=1 cargo check
... errors about proc-macro-error or proc-macro2 or something not supporting the latest stable compiler.....
# rustup default nightly
# DOCS_RS=1 cargo check
... expected failure
# ld target/debug/deps/libvulkano_shaders-ebee64e3e6bdf48d.so
ld: warning: cannot find entry symbol _start; not setting start address
ld: target/debug/deps/libvulkano_shaders-ebee64e3e6bdf48d.so: undefined reference to `shaderc_compile_options_initialize'
...

That gives a way to test locally too, DOCS_RS=1 cargo check fails in the same way outside the build environment. The issue is that when attempting to load the proc-macro's .so file it fails because of the missing shaderc library. It's probably worth opening an upstream issue about having rustc provide better diagnostics in this case, I can't find any existing issue about it.

@marc0246
Copy link
Author

Alright, thank you for the help. I guess it's google/shaderc-rs#130 that broke things then.

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