X-Original-To: alpine-devel@lists.alpinelinux.org Received: from mx1.tetrasec.net (mx1.tetrasec.net [74.117.190.25]) by lists.alpinelinux.org (Postfix) with ESMTP id F0CBBF85650 for ; Wed, 5 Jun 2019 18:34:02 +0000 (UTC) Received: from mx1.tetrasec.net (mail.local [127.0.0.1]) by mx1.tetrasec.net (Postfix) with ESMTP id 2866F9E1EEF; Wed, 5 Jun 2019 18:34:02 +0000 (UTC) Received: from ncopa-desktop.copa.dup.pw (67.63.200.37.customer.cdi.no [37.200.63.67]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: alpine@tanael.org) by mx1.tetrasec.net (Postfix) with ESMTPSA id 3D8CC9E037C; Wed, 5 Jun 2019 18:34:00 +0000 (UTC) Date: Wed, 5 Jun 2019 20:33:53 +0200 From: Natanael Copa To: Bernhard Ehlers Cc: alpine-devel@lists.alpinelinux.org Subject: Re: [alpine-devel] py3-cx_freeze not compatible with python3.7 on alpine 3.10rc1 Message-ID: <20190605203353.1ee6e383@ncopa-desktop.copa.dup.pw> In-Reply-To: References: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-alpine-linux-musl) X-Mailinglist: alpine-devel Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, 4 Jun 2019 21:22:13 +0200 Bernhard Ehlers wrote: > cx_freeze v5.1.1 is not compatible with python3.7, so the py3-cx_freeze p= ackage won*t work in alpine 3.10. >=20 > Here a test with alpine 3.10rc1, that works fine with alpine 3.9 (and it*= s python 3.6):=20 >=20 > ~ # 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' >=20 > Current thread 0x00007f8e2c36fd48 (most recent call first): > Aborted > ~ #=20 >=20 > 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 i= t. > - use the cx_freeze beta version 6.0b1, but I have no idea what issue tha= t version has I suppose we need to apply that patch. =20 > BTW: The ldd program (in all alpine versions) creates invalid output in c= ase you use it on a library, here an example: >=20 > ~ # ldd /lib/libssl.so.1.1=20 > ldd (0x7ffb49916000) > libcrypto.so.1.1 =3D> /lib/libcrypto.so.1.1 (0x7ffb49618000) > libc.musl-x86_64.so.1 =3D> ldd (0x7ffb49916000) >=20 > 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 cu= rrent directory before using cx_freeze. >=20 > Here my alternative ldd, it works much better with cx_freeze (and pyinsta= ller): > #!!/bin/sh > exec /lib/ld-musl-* --list -- "$@" >=20 > 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 =3D> /lib/libcrypto.so.1.1 (0x7fa671197000) > libc.musl-x86_64.so.1 =3D> /lib/ld-musl-x86_64.so.1 (0x7fa671495000) Good catch. Will fix this. Thanks! -nc PS. those issues could have been reported on the bugtracker on bugs.alpinel= inux.org. --- Unsubscribe: alpine-devel+unsubscribe@lists.alpinelinux.org Help: alpine-devel+help@lists.alpinelinux.org ---