Mail archive

[alpine-devel] py3-cx_freeze not compatible with python3.7 on alpine 3.10rc1

From: Bernhard Ehlers <>
Date: Tue, 4 Jun 2019 21:22:13 +0200

cx_freeze v5.1.1 is not compatible with python3.7, so the py3-cx_freeze package won’t work in alpine 3.10.

Here a test with alpine 3.10rc1, that works fine with alpine 3.9 (and it’s python 3.6):

~ # echo 'print("Hallo world!")' >
~ # python3
Hallo world!
~ # cp -p /usr/bin/ldd .
~ # cxfreeze
… lots of output ...
~ # dist/hello
Fatal Python error: initfsencoding: Unable to get the locale encoding
ImportError: invalid flags 1556882925 in 'encodings'

Current thread 0x00007f8e2c36fd48 (most recent call first):
~ #

Three alternatives come into my mind:
- drop cx_freeze
- patch cx_freeze v5.1.1, might help, but I haven’t tested it.
- use the cx_freeze beta version 6.0b1, but I have no idea what issue that version has

BTW: The ldd program (in all alpine versions) creates invalid output in case you use it on a library, here an example:

~ # ldd /lib/
        ldd (0x7ffb49916000) => /lib/ (0x7ffb49618000) => ldd (0x7ffb49916000)

The loader and point to "ldd", what's totally wrong. That's why you have to copy the ldd binary to your current directory before using cx_freeze.

Here my alternative ldd, it works much better with cx_freeze (and pyinstaller):
exec /lib/ld-musl-* --list -- "$_at_"

Here an example, with more reasonable results:
~ # /lib/
        /lib/ (0x7fa671495000) => /lib/ (0x7fa671197000) => /lib/ (0x7fa671495000)

Received on Tue Jun 04 2019 - 21:22:13 UTC