Bug 279865 - Mk/Uses/cargo.mk: GitHub-sourced elements of CARGO_CRATES are cloned without git submodules
Summary: Mk/Uses/cargo.mk: GitHub-sourced elements of CARGO_CRATES are cloned without ...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: FreeBSD Rust Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-19 19:49 UTC by Yuri Victorovich
Modified: 2024-06-21 11:39 UTC (History)
1 user (show)

See Also:


Attachments
port.shar (34.81 KB, text/plain)
2024-06-19 19:49 UTC, Yuri Victorovich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2024-06-19 19:49:31 UTC
Created attachment 251581 [details]
port.shar

In the attached example the failure occurs because the submodule contains the CMakeLists.txt file which is missing.


---the failure message---
error: failed to run custom build command for `ls-qpack-sys v0.1.4 (/usr/ports/www/py-qh3/work-py311/ls-qpack-rs-86a836850b45593a1635e757439e291214573828/ls-qpack-sys)`

Caused by:
  process didn't exit successfully: `/usr/ports/www/py-qh3/work-py311/qh3-1.0.8/target/release/build/ls-qpack-sys-aa90669d06979fb6/build-script-build` (exit status: 101)
  --- stdout
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-freebsd = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_freebsd = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-freebsd = None
  CMAKE_GENERATOR_x86_64_unknown_freebsd = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-freebsd = None
  CMAKE_PREFIX_PATH_x86_64_unknown_freebsd = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-freebsd = None
  CMAKE_x86_64_unknown_freebsd = None
  HOST_CMAKE = None
  CMAKE = None
  running: cd "/usr/ports/www/py-qh3/work-py311/qh3-1.0.8/target/release/build/ls-qpack-sys-db79e05370cb866c/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/usr/ports/www/py-qh3/work-py311/ls-qpack-rs-86a836850b45593a1635e757439e291214573828/ls-qpack-sys/deps/ls-qpack" "-DLSQPACK_BIN=OFF" "-DCMAKE_INSTALL_PREFIX=/usr/ports/www/py-qh3/work-py311/qh3-1.0.8/target/release/build/ls-qpack-sys-db79e05370cb866c/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 --target=x86_64-unknown-freebsd -pipe -fstack-protector-strong -fno-strict-aliasing" "-DCMAKE_C_COMPILER=/usr/local/libexec/ccache/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -stdlib=libc++ --target=x86_64-unknown-freebsd -pipe -fstack-protector-strong -fno-strict-aliasing" "-DCMAKE_CXX_COMPILER=/usr/local/libexec/ccache/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 --target=x86_64-unknown-freebsd -pipe -fstack-protector-strong -fno-strict-aliasing" "-DCMAKE_ASM_COMPILER=/usr/local/libexec/ccache/cc" "-DCMAKE_BUILD_TYPE=Release"

  --- stderr
  CMake Warning:
    Ignoring extra path from command line:

     "/usr/ports/www/py-qh3/work-py311/ls-qpack-rs-86a836850b45593a1635e757439e291214573828/ls-qpack-sys/deps/ls-qpack"


  CMake Error: The source directory "/usr/ports/www/py-qh3/work-py311/ls-qpack-rs-86a836850b45593a1635e757439e291214573828/ls-qpack-sys/deps/ls-qpack" does not appear to contain CMakeLists.txt.
  Specify --help for usage, or press the help button on the CMake GUI.
  thread 'main' panicked at /usr/ports/www/py-qh3/work-py311/qh3-1.0.8/cargo-crates/cmake-0.1.50/src/lib.rs:1098:5:

  command did not execute successfully, got: exit status: 1

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.11-64bit" PYO3_PYTHON="/usr/local/bin/python3.11" PYTHON_SYS_EXECUTABLE="/usr/local/bin/python3.11" "cargo" "rustc" "--features" "pyo3/extension-module" "--features" "pyo3/generate-import-lib" "--message-format" "json-render-diagnostics" "--manifest-path" "/usr/ports/www/py-qh3/work-py311/qh3-1.0.8/Cargo.toml" "--release" "--lib"`
Error: command ['maturin-3.11', 'pep517', 'build-wheel', '-i', '/usr/local/bin/python3.11', '--compatibility', 'off'] returned non-zero exit status 1

ERROR Backend subprocess exited when trying to invoke build_wheel
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2024-06-20 12:04:59 UTC
Why is it affected to rust@ ?
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2024-06-20 17:19:21 UTC
(In reply to Mikael Urankar from comment #1)

Because the problem exists for USES=cargo, and Mk/Uses/cargo.mk is maintained by rust@FreeBSD.org.
Comment 3 Mikael Urankar freebsd_committer freebsd_triage 2024-06-21 11:39:01 UTC
(In reply to Yuri Victorovich from comment #2)
I still fail to see why it's a rust problem.

You have to add a missing distfile:
https://github.com/Ousret/ls-qpack-rs/blob/main/.gitmodules

https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github-multiple
Example 21. How to Use USE_GITHUB with Git Submodules?