Skip to content
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

Linux client cannot start up on CentOS 8 #6

Closed
fsgmhoward opened this issue May 8, 2021 · 3 comments
Closed

Linux client cannot start up on CentOS 8 #6

fsgmhoward opened this issue May 8, 2021 · 3 comments

Comments

@fsgmhoward
Copy link

First is the version of GLIBC used. The libpython3.8 is compiled using a newer version than the one in CentOS 8.

[root@storage-1 miner]# ./cmd
[197894] Error loading Python lib '/uupool/miner/libpython3.8.so.1.0': dlopen: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /uupool/miner/libpython3.8.so.1.0)

This is still resolvable. The shared library can be loaded after I compiled a new GLIBC 2.29. However, now it comes the second error:

Traceback (most recent call last):
  File "cmd.py", line 223, in <module>
  File "asyncio/base_events.py", line 616, in run_until_complete
  File "cmd.py", line 42, in main
  File "cmd.py", line 29, in help_menu
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128)
[197904] Failed to execute script cmd

Since this binary is packaged using pyinstaller and I assume it is in frozen mode, so I am not able to use any environment variable to make it work. I tried LANG, LC_ALL, PYTHONIOENCODING and none of them works. I am 100% sure that my console is able to output Chinese characters and is set in UTF-8 mode.

[root@storage-1 miner]# echo $LANG
zh_CN.UTF-8
[root@storage-1 miner]# echo $PYTHONIOENCODING
utf-8
[root@storage-1 miner]# echo $LC_ALL
zh_CN.UTF-8

Chinese stdout test:

[root@storage-1 miner]# yum update
上次元数据过期检查:1:29:50 前,执行于 2021年05月08日 星期六 10时20分46秒。
依赖关系解决。

....
@chuwt
Copy link
Collaborator

chuwt commented May 8, 2021

I'll check it in centos8

@chuwt
Copy link
Collaborator

chuwt commented May 9, 2021

try this:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
source /etc/profile

@fsgmhoward
Copy link
Author

fsgmhoward commented May 9, 2021

No. It is not working.

[root@storage-1 miner]# export LC_ALL=en_US.UTF-8
[root@storage-1 miner]# export LANG=en_US.UTF-8
[root@storage-1 miner]# source /etc/profile
[root@storage-1 miner]# ./cmd -h
Traceback (most recent call last):
  File "cmd.py", line 223, in <module>
  File "asyncio/base_events.py", line 616, in run_until_complete
  File "cmd.py", line 218, in main
  File "cmd.py", line 29, in help_menu
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128)
[201104] Failed to execute script cmd

I guess a quick way to make this working is to provide a version with only ASCII output (i.e. a version with basic English output), preferably using a older GLIBC (centos's built-in glibc is 2.28). I compiled the GLIBC from source code and use elfpatch to change the rpath to the newer GLIBC. Although not very likely, there is a possibility that I messed up this.

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

No branches or pull requests

2 participants