Extra error output when running coreutils command in a yocto build environment
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
I have installed ubuntu 25.10 and I am doing yocto builds on this machine. The yocto build is using some of the coreutils in the build process.
The problem is that most of them print the error message: couldn't allocate absolute path for 'null'.
Here an extract of the strace output of running the command ls:
2207467 lstat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
2207467 lstat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=16384, ...}) = 0
2207467 lstat("/usr/lib/cargo", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
2207467 lstat("/usr/lib/cargo/bin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
2207467 lstat("/usr/lib/cargo/bin/coreutils", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
2207467 lstat("/usr/lib/cargo/bin/coreutils/locales", 0x7ffdeb6e1d90) = -1 ENOENT (No such file or directory)
2207467 lstat("/usr/lib/cargo/bin/coreutils/locales/ls", 0x7ffdeb6e1d90) = -1 ENOENT (No such file or directory)
2207467 statx(AT_FDCWD, "/usr/lib/cargo/bin/coreutils/locales/ls", AT_STATX_SYNC_AS_STAT, STATX_ALL, 0x7ffdeb6e2040) = -1 ENOENT (No such file or directory)
2207467 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
2207467 rt_sigprocmask(SIG_BLOCK, [HUP USR1 USR2 ALRM TERM CHLD], [], 8) = 0
2207467 write(2, "couldn't allocate absolute path for 'null'.\n", 44) = 44
Creating the following symbolic link, locales -> /usr/share/locales, inside the directory /usr/lib/cargo/bin/coreutils makes this message not printed anymore.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by running the coreutils ls command in the described Yocto environment and compare its strace output. Investigate the locales lookup under /usr/lib/cargo/bin/coreutils, including the reported locales -> /usr/share/locales workaround. Done means the spurious "couldn't allocate absolute path for 'null'" output no longer appears without requiring that symlink.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100