RE: git: 3a627a5c547a - main - lang/rust: do not build the documentation on armv7 [the Makefile still ties to use the documentation file, so the build fails]

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
Mikael Urankar <mikael_at_FreeBSD.org> wrote on
Date: Thu, 13 Mar 2025 07:29:31 UTC :

> The branch main has been updated by mikael:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=3a627a5c547aeedf2806c249810c098d482de136
> 
> commit 3a627a5c547aeedf2806c249810c098d482de136
> Author: Mikael Urankar <[email protected]>
> AuthorDate: 2025-03-13 07:26:12 +0000
> Commit: Mikael Urankar <[email protected]>
> CommitDate: 2025-03-13 07:26:12 +0000
> 
> lang/rust: do not build the documentation on armv7
> 
> A bug [1] prevents documentation from being compiled on this
> platform, disable it until it's fixed in a release branch.
> 
> [1] https://github.com/rust-lang/rust/pull/137632
> 
> Reported by: mmel
> ---
> lang/rust/Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
> 
> diff --git a/lang/rust/Makefile b/lang/rust/Makefile
> index 7d5f8cf09f04..0c736fa9aa21 100644
> --- a/lang/rust/Makefile
> +++ b/lang/rust/Makefile
> @@ -171,7 +171,11 @@ do-configure:
> @${ECHO_CMD} 'vendor=true' >> ${WRKSRC}/config.toml
> @${ECHO_CMD} 'extended=true' >> ${WRKSRC}/config.toml
> @${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml
> +.if ${ARCH} == "armv7"
> + @${ECHO_CMD} 'docs=false' >> ${WRKSRC}/config.toml

Unfortunately, more in the Makefile is tied to the documentation
file(s) being there. poudriere-devel based builds for armv7 now
get:

/usr/bin/tar xf /wrkdirs/usr/ports/lang/rust/work/_build/dist/rust-docs-1.85.0-armv7-unknown-freebsd.tar.xz -C /wrkdirs/usr/ports/lang/rust/work/_extractdist
tar: Error opening archive: Failed to open '/wrkdirs/usr/ports/lang/rust/work/_build/dist/rust-docs-1.85.0-armv7-unknown-freebsd.tar.xz'
*** Error code 1

The above is likely from the rust-docs-${_PACKAGE_VERS}-${_RUST_TARGET}
notation shown by:

# grep -r docs- /usr/ports/lang/rust/
/usr/ports/lang/rust/Makefile: _COMPONENTS+="rust-docs-${_PACKAGE_VERS}-${_RUST_TARGET} rust-docs-json-${_PACKAGE_VERS}-${_RUST_TARGET}" \
/usr/ports/lang/rust/Makefile:_COMPONENTS+= rust-docs-${_PACKAGE_VERS}-wasm32-unknown-unknown rust-docs-json-${_PACKAGE_VERS}-wasm32-unknown-unknown

But how many of the following need to be dealt with overall?

rust-docs-${_PACKAGE_VERS}-${_RUST_TARGET}
rust-docs-json-${_PACKAGE_VERS}-${_RUST_TARGET}

rust-docs-${_PACKAGE_VERS}-wasm32-unknown-unknown
rust-docs-json-${_PACKAGE_VERS}-wasm32-unknown-unknown

I've not checked for other issues. pkg-plist ? I've not
checked.

May be DOCS from:

OPTIONS_DEFINE=         DOCS GDB LTO PORT_LLVM SOURCES WASM

should be forced to be disabled for armv7 as a means of
control? Or, may be be made not an option for armv7,
handled as an implicit disable?

> +.else
> @${ECHO_CMD} 'docs=${_RUST_BUILD_DOCS}' >> ${WRKSRC}/config.toml
> +.endif
> @${ECHO_CMD} 'verbose=2' >> ${WRKSRC}/config.toml
> .if defined(NIGHTLY_DATE)
> @${ECHO_CMD} 'profiler=true' >> ${WRKSRC}/config.toml



===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.