#1938 closed task (fixed)
LC_ALL=C causes bash testsuite failure and ugly "make menuconfig" output
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Book | Version: | SVN |
Severity: | normal | Keywords: | |
Cc: |
Description
Bash-3.2 uses LANG=en_US.UTF-8 in the run-intl test. However, we set LC_ALL=C in the environment, and that overrides $LANG in the test, leading to the failure.
The minimal solution is:
sed -i 's/LANG/LC_ALL/' tests/intl.tests
However, I don't know if the original reasoning for setting LC_ALL=C during the whole build still holds. LC_ALL=C is certainly a wrong thing to do during "make menuconfig" of the kernel, because this prevents line drawing characters from being displayed correctly on UTF-8 linux text console during configuration.
Change History (9)
comment:1 by , 18 years ago
Milestone: | → 6.3 |
---|
comment:2 by , 18 years ago
The issue is more complex. "make menuconfig" absolutely requires the correct $LANG on Linux console. Here "correct" means "correct for the host", not necessarily "correct for the final LFS system" (although, in the case when they are different, the important problem of migrating to a different locale is left up to the reader).
But compiling the kernel itself with non-English $LANG or $LC_ALL will embed the translation of the string "version" into /proc/version, which is not desired. Also, I am not sure if LFS is buildable at all with LANG=et_EE or et_EE.UTF-8 instead of LC_ALL=POSIX (because in this locale, the letter "z" is in the middle of the naturally sorted alphabet, and the regular expression [a-z] misses some Latin letters, which can confuse some old configure scripts).
comment:3 by , 18 years ago
Just in case it wasn't clear from my previous reply: dropping LC_ALL=POSIX doesn't cause the correct $LANG to appear magically in the environment.
comment:4 by , 17 years ago
Thus, to fix the Bash test the next sed should do the trick, right?
sed -i 's/LANG/LC_ALL/' tests/intl.tests
For the kernel menuconfig, could this work?
make LANG=<host_LANG_value> menuconfig
comment:5 by , 17 years ago
You have got the idea - but for "make menuconfig" you also have to unset LC_ALL. Maybe: make LANG=<host_LANG_or_LC_CTYPE_value> LC_ALL= menuconfig
comment:6 by , 17 years ago
I committed the changes on r8149.
Please, review it and close this ticket if all looks good.
comment:7 by , 17 years ago
Seems alright to me. The only issue (existed before your commit) is that we hack around a lot with the bash testsuite but don't explain it at all. I'd like to change
To prepare the tests, ensure that locales are set correctly in our environment and that the nobody user can write to the source tree: sed -i 's/LANG/LC_ALL/' tests/intl.tests chown -Rv nobody ./ Now, run the tests as the nobody user: su-tools nobody -s /bin/bash -c "make tests"
comment:8 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Added explanations to Bash testsuite commands in r8153
Well, 4.4 says:
iv: Host Requirements says:
So, the question now is, was glibc <= 2.2.4 the only reason that LC_ALL=POSIX is being used? If so, it looks like it can be removed.