Skip to content

Conversation

@oech3
Copy link
Contributor

@oech3 oech3 commented Oct 22, 2025

Simplify installing mans and completions. Prepare for reducing deps on system commands.

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@sylvestre sylvestre merged commit 50bdaa1 into uutils:main Oct 22, 2025
121 checks passed
@oech3 oech3 deleted the manpage-direct branch October 22, 2025 20:27
@Ecordonnier
Copy link
Contributor

Ecordonnier commented Oct 24, 2025

@sylvestre This will not work if the user is cross-compiling to a foreign architecture. build-uudoc will generate a binary of the target architecture (e.g. arm64), and the execution of $(BUILDDIR)/uudoc will then fail on the host architecture.

@oech3
Copy link
Contributor Author

oech3 commented Oct 24, 2025

It seems same for previous style and needed to fix --target when we build. No?

@Ecordonnier
Copy link
Contributor

It seems same for previous style and needed to fix --target when we build. No?

As far as I understand, previous style was using the command $(INSTALL) which has the host architecture.

@oech3
Copy link
Contributor Author

oech3 commented Oct 24, 2025

I think we can drop build-uudoc and use cargo run --target=... at install-magpages

@Ecordonnier
Copy link
Contributor

Ecordonnier commented Oct 24, 2025

I think we can drop build-uudoc and use cargo run --target=... at install-magpages

Yes, something like that. Or keep build-uudoc, but make sure that it is compiled for the host architecture (no CARGOFLAGS and no BUILDDIR).

@oech3
Copy link
Contributor Author

oech3 commented Oct 24, 2025

I think current project is not buildable with CARGOFLAGS=--target=....
Do we need additional TARGET_CMD := --target=... at GNUMakefile and swap at build-uudoc?

cc @aaron-ang

@oech3
Copy link
Contributor Author

oech3 commented Oct 24, 2025 via email

@Ecordonnier
Copy link
Contributor

Ecordonnier commented Oct 24, 2025

I think current project is not buildable with CARGOFLAGS=--target=.... Do we need additional TARGET_CMD := --target=... at GNUMakefile and swap at build-uudoc?

cc @aaron-ang

It is buildable as far as I know. See https://github.com/Ecordonnier/coreutils/pull/3/files for some instructions. I get this error on my x64 PC:

ecordonnier@LBM9V6C4:~/dev/coreutils$ rm -rf target/
$ make install-manpages CARGOFLAGS="--target=aarch64-unknown-linux-gnu" DESTDIR=/tmp BUILDDIR=$(pwd)/target/aarch64-unknown-linux-gnu/debug/
...
...
mkdir -p /tmp/usr/local/share/man/man1
/home/ecordonnier/dev/coreutils/target/aarch64-unknown-linux-gnu/debug//uudoc manpage arch > /tmp/usr/local/share/man/man1/arch.1 
/bin/sh: 1: /home/ecordonnier/dev/coreutils/target/aarch64-unknown-linux-gnu/debug//uudoc: Exec format error
make: *** [GNUmakefile:413: install-manpages] Error 126

@Ecordonnier
Copy link
Contributor

@oech3
Copy link
Contributor Author

oech3 commented Oct 24, 2025 via email

@oech3
Copy link
Contributor Author

oech3 commented Oct 26, 2025

coreutils/GNUmakefile

Lines 437 to 465 in 21ee64c

ifeq ($(LOCALES),y)
locales:
@# Copy uucore common locales
@if [ -d "$(BASEDIR)/src/uucore/locales" ]; then \
mkdir -p "$(BUILDDIR)/locales/uucore"; \
for locale_file in "$(BASEDIR)"/src/uucore/locales/*.ftl; do \
$(INSTALL) -m 644 -v "$$locale_file" "$(BUILDDIR)/locales/uucore/"; \
done; \
fi; \
# Copy utility-specific locales
@for prog in $(INSTALLEES); do \
if [ -d "$(BASEDIR)/src/uu/$$prog/locales" ]; then \
mkdir -p "$(BUILDDIR)/locales/$$prog"; \
for locale_file in "$(BASEDIR)"/src/uu/$$prog/locales/*.ftl; do \
if [ "$$(basename "$$locale_file")" != "en-US.ftl" ]; then \
$(INSTALL) -m 644 -v "$$locale_file" "$(BUILDDIR)/locales/$$prog/"; \
fi; \
done; \
fi; \
done
install-locales:
@for prog in $(INSTALLEES); do \
if [ -d "$(BASEDIR)/src/uu/$$prog/locales" ]; then \
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/locales/$$prog"; \
for locale_file in "$(BASEDIR)"/src/uu/$$prog/locales/*.ftl; do \
if [ "$$(basename "$$locale_file")" != "en-US.ftl" ]; then \
$(INSTALL) -m 644 -v "$$locale_file" "$(DESTDIR)$(DATAROOTDIR)/locales/$$prog/"; \

This looks duplication. Is 1st one used at built process?

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

Successfully merging this pull request may close these issues.

3 participants