New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alpine Linux / armhf problems, and fixes #237

Closed
puresilk opened this Issue Jan 31, 2019 · 9 comments

Comments

Projects
None yet
3 participants
@puresilk
Copy link

puresilk commented Jan 31, 2019

Hi,
I have added some patches to make nuitka work on Alpine Linux armhf for --standalone mode.
I've written a blogpost about it, explaing the problems and my patches, which is here:
https://pi3g.com/2019/01/31/using-nuitka-compiler-for-python3-on-alpine-linux-armhf-musl/

I'm attaching the patched files. Hope this helps!
Max

nuitka_patches.zip

@kayhayen

This comment has been minimized.

Copy link
Member

kayhayen commented Jan 31, 2019

Thanks @puresilk this is definitely interesting stuff.

I will try and incorporate this for the next pre-release and let you know, so you can give it a spin. Good news that non-glibc actually works these days. Previously alpine failed due to how fibers were implemented with makecontext, but apparently that barrier is no more.

Also interesting article.

Yours,
Kay

@kayhayen kayhayen self-assigned this Jan 31, 2019

@puresilk

This comment has been minimized.

Copy link
Author

puresilk commented Jan 31, 2019

Hi Kay,

glad you find it useful :-), yes - comment on this issue and I will try the next pre-release. I tried to keep my patch generic, so it would work on non armhf systems too, but have not tested it.

Max

@kayhayen kayhayen added the enhancement label Feb 1, 2019

@kayhayen

This comment has been minimized.

Copy link
Member

kayhayen commented Feb 1, 2019

Please try this out, http://nuitka.net/doc/factory.html

@kayhayen kayhayen added the factory label Feb 1, 2019

@kayhayen

This comment has been minimized.

Copy link
Member

kayhayen commented Feb 1, 2019

I have done your patches slightly different. I think ldd means that nothing needs to be done, just like with not found. Also the scan of the file system is named differently and I attempted a cached function to determine if it is Alpine, that hopefully works.

@kayhayen

This comment has been minimized.

Copy link
Member

kayhayen commented Feb 1, 2019

But I am optimistic this should work. If not, let me know, so we can tweak it further.

@puresilk

This comment has been minimized.

Copy link
Author

puresilk commented Feb 2, 2019

Hi Kay,
I've tested to build with the factory version today - no errors, and the executable works. Seems to be OK!

All the libraries are there as I would expect them to be:

image

I will need to package it and test it on an environment without the python3-dev package being installed - might take me some time, as I have to work on another urgent project. Will report back here how it works.

Thank you for accepting the patch suggestion, in the name of all Alpine users!

Max

@kayhayen kayhayen added develop and removed factory labels Feb 3, 2019

@jeritiana

This comment has been minimized.

Copy link

jeritiana commented Feb 14, 2019

Hello guys,

I stumbled upon these errors too and I tested on Docker-based Alpine Linux x86_64: it works well on the develop branch now (V0.6.2rc5 - bc22aa8).

Test information, if needed:

  • In a container created from the official Docker alpine:3.9 image, I installed Build base, Python 2.7.15-r3 and other dependencies: nuitka --standalone --python-flag=no_site --python-flag=no_warnings --show-progress prog.py succeeds.
    prog.py imports various modules, such as Cryptography, Paramiko and stuff.
  • And then, with the same image, in another container, without the dependencies: /prog.dist/prog works well.

Thank you, waiting for the official release now!

Jeritiana

@puresilk

This comment has been minimized.

Copy link
Author

puresilk commented Feb 15, 2019

Hi,

from my side I can also report now that it seems to work! :-)
I'm deploying on Alpine without Python, armhf / Raspberry Pi as target. Tested with both ARMv6 and ARMv7 Pi's.

Hint to packagers: libpython will still need to be installed into /usr/lib/.. by your package, otherwise the package will automatically depend on python and pull it during installation. If you install libpython, the package will probably conflict with python (as both provide the libpython). For me currently this is not an issue, as I deploy without python.

Max

@puresilk

This comment has been minimized.

Copy link
Author

puresilk commented Feb 15, 2019

I am therefore closing the issue - hope this is OK with you, Kay? And thank you very much for accepting the patch, once again :-)

@puresilk puresilk closed this Feb 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment