UniCode Decode Error - Solved

  • Hey Guys,

    I've been trying to compile my own copy of libre from Git. My goal is to add some support for AppleSMC and eventually mbpfan so I can run Libre on an older mac mini without the fan running constantly.

    But I can't get it to compile at all. Note I've made no changes yet, just try to compile the source right off of Git(current stable release) using "PROJECT=Generic ARCH=x86_64 make image"

    I've tried in two different dockers. The first was and ubuntu 16.04 LTS docker, and then I tried the more recent 18.04 docker, and both times I get stopped at the same spot:

    File "/home/paul/http://LibreELEC.tv/build.LibreELEC-Generic.x86_64-9.0-devel/toolchain/lib/python3.6/subprocess.py", line 740, in _translate_newlines data = data.decode(encoding, errors) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 144: ordinal not in range(128) ninja: build stopped: subcommand failed. Makefile:12: recipe for target 'image' failed

    I've tried searching to no avail. I'm sure I'm missing something simple, as this is the first time I've built Libre.

    Your help and guidance is appreciated.

  • Python 3.5 is installed by default on Ubuntu 16.04 and it looks like its asking for python 3.6 currently. I was confused by that as on the Compile page its doesn't state anything about what versions of python are needed. I believe there is a PPA for Ubuntu 16.04.

  • Do post an update if installing python3.6 works - I'm not entirely sure if that is the correct solution (although it may avoid the issue) as I don't know why the python3.6 package would need python3.6 in the build host (and why python 3.5 wouldn't be used)... there may be a cross-compile issue here.

  • Thanks Hias, this does appear to have solved it. The locale on the ubuntu docker was not set. Installing locale was required first, and then setting en_US.UTF-8 by editing /etc/default/locale and inserting en_US.UTF-8

    Code
    $ sudo apt-get install locale
    
    $ cat /etc/default/locale
    
    insert the following line to the file: LANG=en_US.UTF-8