New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] complains of no UTF-8 while locale *is* UTF-8 #52
Comments
Centos 7.9
Ubuntu 20.04
|
@joske As @daniejstriata pointed out above, you can generate one with |
@aristocratos Why would we get the error if the locale is UTF8? |
@daniejstriata The output when running just |
@daniejstriata |
@aristocratos I have tried to compile statically on Fedora 34 but I get a failure. Dynamic is fine: I have the development tools installed. Regrettably I'm not sure what I'm missing. $ make STATIC=true
|
@daniejstriata Also not sure if you just re-ran the make command just for the ouput, but make sure to |
@aristocratos I'll try some more. I already had libstdc++.x86_64 and libstdc++-devel.x86_64 installed. What is suspicious is that dynamic does not fail so should that not indicate I have all the relevant packages installed? |
@daniejstriata You can try without |
On Fedora 34 I had to install:
|
@aristocratos When I run the statically compiled binary I created just now from the latest git repo on a Centos 7 host it quits without any output/errors but. It still works normally on Centos 8 or the Fedora host I built the binary on.
Version I built |
@daniejstriata |
@aristocratos I installed the version you compiled and is doing the same thing as mine. The exit code is 1
--debug also made no difference
I was able to use with gdb
|
@daniejstriata |
@aristocratos There is no stack.
|
@daniejstriata |
@aristocratos Sorry, was busy day at work yesterday. Yes locales are installed: [jdehaes@berx771 AMH-4.2]$ locale -a | grep en_US But I guess you already know by know from the others. Can not build on this machine as the most recent GCC I have is 8.3. @daniejstriata how did you get working compilers on RHEL 7.x?? They are not in EPEL or RHEL satellite. |
@aristocratos Unfortunately, same: [jdehaes@berx771 tmp]$ chmod 755 btop |
@joske |
@aristocratos No. [jdehaes@berx771 tmp]$ LANG= LC_ALL= ./btop |
@joske |
@aristocratos Same: |
@aristocratos Nope: |
@joske |
@aristocratos Both fail: |
@joske |
@joske |
@aristocratos same. Edit: lower case also same. |
@aristocratos Strange as locale, when run in terminal returns something else entirely: |
Environment does not have all those LC_ vars, but it does have LANG: |
@aristocratos This is even worse ;-) : snip of btop.log (previous attempt and current): 2021/09/29 (10:45:38) | ===> btop++ v.1.0.10 |
@aristocratos This one works (although it complained my terminal was one character too narrow (79x24 by accident). When I resized to 80x24 it worked without any arguments :-). |
@joske |
@aristocratos Same with old with sudo: RHEL has strange defaults, and our company messes with lots of things in the images used for our VMs (although I disable a lot of those already). But the fact that other users report the same, I'm inclined to think it's RHEL and not our company that messes this up. Running btop under strace did not yield any clues as to what is failing exactly. Any ideas on how to troubleshoot (if you still care as it's working now). Edit: the last version you attached here does not give any warning when ran with sudo (while without it still logs the warning) : 2021/09/29 (11:16:32) | ===> btop++ v.1.0.10 |
@joske Will include the fix in release v1.0.11 tonight along with new static binaries. |
@joske I built on my Fedora install. |
@aristocratos The last zip uploaded worked on my Centos 7 servers. Here is the output from running it with debug.
|
@joske @daniejstriata |
Describe the bug
Running on RHEL 7.7 at work, using the statically compiled binary 1.0.9, it complains of no UTF-8 locale detected. While locale is:
[jdehaes@berx771 Snape]$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
When using the --utf-force flag, btop works perfectly. We have the same on other RHEL 7.x boxes.
I can not compile/debug btop on this machine (as its compilers are too old - even with gcc 8.3 -std=c++20 is not available). On a RHEL 8 system this just works. I can compile/debug there (after installing gcc 10 toolchain), but useless as the problem doesn't occur there. The locale settings are identical on that system.
To Reproduce
Get a RHEL 7.7 (probably any 7.x will do) system (via docker?) and copy the btop binary. It will complain although locale is UTF-8.
Expected behavior
btop can run with the --utf-force flag.
[jdehaes@berx771 Snape]$ btop
ERROR: No UTF-8 locale detected!
Use --utf-force argument to force start if you're sure your terminal can handle it.
[If applicable, add screenshots to help explain your problem.]
Info (please complete the following information):
Additional context
contents of
~/.config/btop/btop.log
-> nothing there other than no UTF-8 locale detected.The text was updated successfully, but these errors were encountered: