Fix kornia-io docs not building on docs.rs#328
Merged
edgarriba merged 1 commit intokornia:mainfrom Apr 2, 2025
Merged
Conversation
edgarriba
approved these changes
Apr 1, 2025
Member
edgarriba
left a comment
There was a problem hiding this comment.
LGTM. Have you tried locally ? or any ideas how to test that will work online
Member
Author
|
I ran the docs on local docs.rs container. Although it fixes the issue with gstreamer, there is also a similar issue with turbojpeg crate. I will look into turbojpeg crate, and hopefully find a fix. docs.rs container logs# rustc version
rustc 1.88.0-nightly (0b45675cf 2025-03-31)# docs.rs version
docsrs 0.6.0 (ee9a3fe 2025-04-01)# build log
[INFO] running `Command { std: "docker" "create" "-v" "/root/developer/docs.rs/.rustwide-docker/builds/kornia-io-0.1.9-rc.2/target:/opt/rustwide/target:rw,Z" "-v" "/root/developer/docs.rs/.rustwide-docker/builds/kornia-io-0.1.9-rc.2/source:/opt/rustwide/workdir:ro,Z" "-v" "/root/developer/docs.rs/.rustwide-docker/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/root/developer/docs.rs/.rustwide-docker/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "DOCS_RS=1" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "3221225472" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux-micro" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "rustdoc" "--lib" "-Zrustdoc-map" "--all-features" "--config" "build.rustflags=[\"--cfg\", \"docsrs\"]" "-Zhost-config" "-Ztarget-applies-to-host" "--config" "host.rustflags=[\"--cfg\", \"docsrs\"]" "--config" "build.rustdocflags=[\"--cfg\", \"docsrs\", \"--cfg\", \"docsrs\", \"-Z\", \"unstable-options\", \"--emit=invocation-specific\", \"--resource-suffix\", \"-20250331-1.88.0-nightly-0b45675cf\", \"--static-root-path\", \"/-/rustdoc.static/\", \"--cap-lints\", \"warn\", \"--extern-html-root-takes-precedence\"]" "--offline" "-Zunstable-options" "--config=doc.extern-map.registries.crates-io=\"https://docs.rs/{pkg_name}/{version}/x86_64-unknown-linux-gnu\"" "-Zrustdoc-scrape-examples" "--target" "x86_64-unknown-linux-gnu", kill_on_drop: false }`
[INFO] [stdout] 442e983af3ef57faf7c7a5db03c4a6173a436e5c3b74c1e483347137eb3a5e2f
[INFO] running `Command { std: "docker" "start" "-a" "442e983af3ef57faf7c7a5db03c4a6173a436e5c3b74c1e483347137eb3a5e2f", kill_on_drop: false }`
[INFO] [stderr] warning: only one of `license` or `license-file` is necessary
[INFO] [stderr] `license` should be used if the package license can be expressed with a standard SPDX expression.
[INFO] [stderr] `license-file` should be used if the package uses a non-standard license.
[INFO] [stderr] See https://doc.rust-lang.org/cargo/reference/manifest.html#the-license-and-license-file-fields for more information.
[INFO] [stderr] warning: target filter specified, but no targets matched; this is a no-op
[INFO] [stderr] Compiling cfg-expr v0.17.2
[INFO] [stderr] Checking num-traits v0.2.19
[INFO] [stderr] Checking crossbeam-deque v0.8.6
[INFO] [stderr] Compiling glib-macros v0.20.7
[INFO] [stderr] Compiling turbojpeg-sys v1.0.1
[INFO] [stderr] Checking futures-util v0.3.31
[INFO] [stderr] Checking rayon-core v1.12.1
[INFO] [stderr] error: failed to run custom build command for `turbojpeg-sys v1.0.1`
[INFO] [stderr]
[INFO] [stderr] Caused by:
[INFO] [stderr] process didn't exit successfully: `/opt/rustwide/target/debug/build/turbojpeg-sys-8362f4cf01cd747e/build-script-build` (exit status: 101)
[INFO] [stderr] --- stdout
[INFO] [stderr] cargo:rerun-if-changed=build.rs
[INFO] [stderr] cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_TURBOJPEG_STATIC
[INFO] [stderr] X86_64_UNKNOWN_LINUX_GNU_TURBOJPEG_STATIC unset
[INFO] [stderr] cargo:rerun-if-env-changed=TURBOJPEG_STATIC
[INFO] [stderr] TURBOJPEG_STATIC unset
[INFO] [stderr] cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_TURBOJPEG_DYNAMIC
[INFO] [stderr] X86_64_UNKNOWN_LINUX_GNU_TURBOJPEG_DYNAMIC unset
[INFO] [stderr] cargo:rerun-if-env-changed=TURBOJPEG_DYNAMIC
[INFO] [stderr] TURBOJPEG_DYNAMIC unset
[INFO] [stderr] cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_TURBOJPEG_SHARED
[INFO] [stderr] X86_64_UNKNOWN_LINUX_GNU_TURBOJPEG_SHARED unset
[INFO] [stderr] cargo:rerun-if-env-changed=TURBOJPEG_SHARED
[INFO] [stderr] TURBOJPEG_SHARED unset
[INFO] [stderr] cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_TURBOJPEG_SOURCE
[INFO] [stderr] X86_64_UNKNOWN_LINUX_GNU_TURBOJPEG_SOURCE unset
[INFO] [stderr] cargo:rerun-if-env-changed=TURBOJPEG_SOURCE
[INFO] [stderr] TURBOJPEG_SOURCE unset
[INFO] [stderr] Building turbojpeg from source
[INFO] [stderr] CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
[INFO] [stderr] CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
[INFO] [stderr] HOST_CMAKE_TOOLCHAIN_FILE = None
[INFO] [stderr] CMAKE_TOOLCHAIN_FILE = None
[INFO] [stderr] CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
[INFO] [stderr] CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
[INFO] [stderr] HOST_CMAKE_GENERATOR = None
[INFO] [stderr] CMAKE_GENERATOR = None
[INFO] [stderr] CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
[INFO] [stderr] CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
[INFO] [stderr] HOST_CMAKE_PREFIX_PATH = None
[INFO] [stderr] CMAKE_PREFIX_PATH = None
[INFO] [stderr] CMAKE_x86_64-unknown-linux-gnu = None
[INFO] [stderr] CMAKE_x86_64_unknown_linux_gnu = None
[INFO] [stderr] HOST_CMAKE = None
[INFO] [stderr] CMAKE = None
[INFO] [stderr] running: cd "/opt/rustwide/target/x86_64-unknown-linux-gnu/debug/build/turbojpeg-sys-a5a8a1bf6fb24135/out/build" && CMAKE_PREFIX_PATH="" LC_ALL="C" "cmake" "/opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/turbojpeg-sys-1.0.1/libjpeg-turbo" "-DCMAKE_INSTALL_DEFAULT_LIBDIR=lib" "-DCMAKE_INSTALL_PREFIX=/opt/rustwide/target/x86_64-unknown-linux-gnu/debug/build/turbojpeg-sys-a5a8a1bf6fb24135/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug" "-DENABLE_SHARED=0" "-DENABLE_STATIC=1" "-DREQUIRE_SIMD=ON"
[INFO] [stderr]
[INFO] [stderr] --- stderr
[INFO] [stderr]
[INFO] [stderr] thread 'main' panicked at /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/cmake-0.1.54/src/lib.rs:1119:5:
[INFO] [stderr]
[INFO] [stderr] failed to execute command: No such file or directory (os error 2)
[INFO] [stderr] is `cmake` not installed?
[INFO] [stderr]
[INFO] [stderr] build script failed, must exit now
[INFO] [stderr] note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[INFO] [stderr] warning: build failed, waiting for other jobs to finish...
[INFO] running `Command { std: "docker" "inspect" "442e983af3ef57faf7c7a5db03c4a6173a436e5c3b74c1e483347137eb3a5e2f", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "442e983af3ef57faf7c7a5db03c4a6173a436e5c3b74c1e483347137eb3a5e2f", kill_on_drop: false }`
[INFO] [stdout] 442e983af3ef57faf7c7a5db03c4a6173a436e5c3b74c1e483347137eb3a5e2f |
Member
|
yep, something go broken with turbojpeg |
Member
|
can you rebase this one ? |
|
andrew-shc
pushed a commit
to andrew-shc/kornia-rs
that referenced
this pull request
Aug 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #319
The docs.rs fails to build the documentation because
gstreamer-app-syscustom build script fails. See Logs.After inspecting the
gstreamer-app-sys/Cargo.tomland it's build.rs, I came to know that enablingdocsrsflag would fix the issue.Also,
gio-syscrate also usesdocsrsflag to disable it's build scriptI tested it on my local machine by uninstalling
gstreamer, and it works.