Skip to content

Fix constants accidentally removed for Linux uClibc targets#5141

Open
operutka wants to merge 1 commit into
rust-lang:mainfrom
operutka:uclibc-constants
Open

Fix constants accidentally removed for Linux uClibc targets#5141
operutka wants to merge 1 commit into
rust-lang:mainfrom
operutka:uclibc-constants

Conversation

@operutka
Copy link
Copy Markdown
Contributor

@operutka operutka commented Jun 4, 2026

Description

This PR fixes constants that were, probably accidentally, removed by commit 2fe1d91 for uClibc in all operating systems. However, based on the commit message, the commit was supposed to fix things for L4Re, not break things for other operating systems.

So this PR limits the uClibc exclusions introduced in 2fe1d91 to apply only if the target OS is L4Re. This also fixes #5140.

Sources

I believe no links to sources are necessary here. The affected constants were previously available for all linux-like operating systems and environments. This PR simply reverts things to the previous state for all operating systems except L4Re.

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI

Notes

There was nothing to update in libc-test/semver. The constants are already present in linux.txt.

I'm unable to run the tests locally though. After building custom rustc and rust-std for armv7-unknown-linux-uclibceabihf, I'm able to initiate the build of libc-test but it fails because the following header files are missing in my case:

  • linux/can/j1939.h
  • linux/mount.h
  • linux/openat2.h

I guess they require a more up to date Linux headers then I currently have in my toolchain. When I comment out the header files, I get a ton of missing symbol errors. I'll try to re-run the test with a more recent toolchain.

@rustbot label +stable-nominated

The constants were removed by commit 2fe1d91 for uClibc in all
operating systems. However, the commit was supposed to fix things
for L4Re, not break things for other operating systems.

So this commit limits the uClibc exclusions introduced in 2fe1d91
to apply only if the target OS is L4Re.
@rustbot rustbot added S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Jun 4, 2026
@operutka
Copy link
Copy Markdown
Contributor Author

operutka commented Jun 5, 2026

I've got an update related to the local tests. I've generated a new toolchain using Buildroot with up to date kernel headers but I'm still unable to build the libc-test. There is a ton of errors unrelated to the constants that I've made available again through this PR. The error log is attached.

Given that, I believe the tests never worked on the Linux uClibc target in the first place and, in fact, the libc-test does not build even if I revert my commit.

I think fixing the tests for uClibc is a whole different job that's well outside of scope of this PR.

build-error.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IPV6_TRANSPARENT is not defined for uClibc targets

2 participants