Skip to content

wc: support cross-platform building and 32-bit#11452

Merged
cakebaker merged 1 commit intouutils:mainfrom
OOM-WG:main
Mar 31, 2026
Merged

wc: support cross-platform building and 32-bit#11452
cakebaker merged 1 commit intouutils:mainfrom
OOM-WG:main

Conversation

@YumeYuka
Copy link
Copy Markdown
Contributor

Commit By @ShIroRRen

@oech3

This comment was marked as resolved.

@ShIroRRen
Copy link
Copy Markdown
Contributor

Windows does not support stdbuf. cygwin support is enough.

Just to make the if more correct, although it won't build it

@oech3

This comment was marked as resolved.

@oech3

This comment was marked as resolved.

@ShIroRRen
Copy link
Copy Markdown
Contributor

You should add

#[cfg(not(unix))]
compile_error!("stdbuf is not supported on the target");

and remove stdbuf-error-command-not-supported from ftl files instead.

I added it

@oech3
Copy link
Copy Markdown
Contributor

oech3 commented Mar 22, 2026

Does this PR cover #11311 and #11428 ? cc @0323pin

@sylvestre
Copy link
Copy Markdown
Contributor

plenty of jobs are failing

@ShIroRRen
Copy link
Copy Markdown
Contributor

plenty of jobs are failing

Because of the feature, I missed one during testing, and now I've added it.

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

Congrats! The gnu test tests/printf/printf-surprise is now passing!
Note: The gnu test tests/env/env-signal-handler was skipped on 'main' but is now failing.

@oech3
Copy link
Copy Markdown
Contributor

oech3 commented Mar 26, 2026

It is not clear for me how is this PR(diff) related with 32bit. uutils's CI is already running jobs for 32bit targets.

@ShIroRRen
Copy link
Copy Markdown
Contributor

It is not clear for me how is this PR(diff) related with 32bit. uutils's CI is already running jobs for 32bit targets.

libc::mode_t is u16 on 32-bit and u32 on 64-bit (on Android),but st_mode is always u32 (c_uint), so I fixed it

@oech3
Copy link
Copy Markdown
Contributor

oech3 commented Mar 26, 2026

Do you actuall need 1 line diff only for it?

@ShIroRRen
Copy link
Copy Markdown
Contributor

Do you actuall need 1 line diff only for it?

I only found this one error during compilation, and after fixing it, all Android targets can be compiled

@oech3
Copy link
Copy Markdown
Contributor

oech3 commented Mar 26, 2026

Please reduce diff to 1 line if it is enough and squash commits. Other refactoring conflicts with other PRs.

Co-Authored-By: 白彩恋 <169267914+shirorren@users.noreply.github.com>
@YumeYuka
Copy link
Copy Markdown
Contributor Author

Please reduce diff to 1 line if it is enough and squash commits. Other refactoring conflicts with other PRs.

Done

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/misc/coreutils. tests/misc/coreutils is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/tail/truncate. tests/tail/truncate is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Note: The gnu test tests/seq/seq-epipe is now being skipped but was previously passing.
Congrats! The gnu test tests/printf/printf-surprise is now passing!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 31, 2026

Merging this PR will degrade performance by 14.62%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 2 regressed benchmarks
✅ 297 untouched benchmarks
⏩ 46 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation sort_ascii_utf8_locale 16.1 ms 15.4 ms +4.84%
Simulation true_consecutive_calls 170.3 ns 199.4 ns -14.62%
Simulation false_consecutive_calls 170.3 ns 199.4 ns -14.62%

Comparing OOM-WG:main (7b88683) with main (230e0cf)

Open in CodSpeed

Footnotes

  1. 46 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@cakebaker cakebaker changed the title fix: supports cross-platform building and 32-bit wc: support cross-platform building and 32-bit Mar 31, 2026
@cakebaker cakebaker merged commit ff89074 into uutils:main Mar 31, 2026
160 of 162 checks passed
@cakebaker
Copy link
Copy Markdown
Contributor

Thanks!

@ShIroRRen
Copy link
Copy Markdown
Contributor

Please reduce diff to 1 line if it is enough and squash commits. Other refactoring conflicts with other PRs.

However, this will still not solve cross-platform compilation, using MSVC to compile stdbuf will still fail

@oech3
Copy link
Copy Markdown
Contributor

oech3 commented Mar 31, 2026 via email

@ShIroRRen
Copy link
Copy Markdown
Contributor

Windows does not have same system with LD_PRELOAD. So building it does not making a sense.

What I mean is that cross-platform builds will fail, for example, building for Android on Windows, because the build script checks the current platform rather than the platform to be built

@oech3
Copy link
Copy Markdown
Contributor

oech3 commented Mar 31, 2026 via email

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.

5 participants