lh232510 / ChiaMiner

12 stars 3 forks source link

Linux client cannot start up on CentOS 8 #6

Closed fsgmhoward closed 2 years ago

fsgmhoward commented 3 years ago

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 commented 3 years ago

I'll check it in centos8

chuwt commented 3 years ago

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

fsgmhoward commented 3 years ago

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.