Mail archive
alpine-devel

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

From: Bernhard Ehlers <list_at_bernhard-ehlers.de>
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!")' > hello.py
~ # python3 hello.py
Hallo world!
~ # cp -p /usr/bin/ldd .
~ # cxfreeze hello.py
… 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):
Aborted
~ #

Three alternatives come into my mind:
- drop cx_freeze
- patch cx_freeze v5.1.1, https://github.com/msys2/MINGW-packages/commit/4c18633ba2331d980f00aff075f17135399c43c5 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/libssl.so.1.1
        ldd (0x7ffb49916000)
        libcrypto.so.1.1 => /lib/libcrypto.so.1.1 (0x7ffb49618000)
        libc.musl-x86_64.so.1 => ldd (0x7ffb49916000)

The loader ld-musl-x86_64.so.1 and libc.musl-x86_64.so.1 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):
#!!/bin/sh
exec /lib/ld-musl-* --list -- "$_at_"

Here an example, with more reasonable results:
~ # ldd.new /lib/libssl.so.1.1
        /lib/ld-musl-x86_64.so.1 (0x7fa671495000)
        libcrypto.so.1.1 => /lib/libcrypto.so.1.1 (0x7fa671197000)
        libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7fa671495000)



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Tue Jun 04 2019 - 21:22:13 UTC