-
Notifications
You must be signed in to change notification settings - Fork 17
Fails to build in Alpine 3.9 #22
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
Comments
After #23 is integrated and a new set of wheels is generated, it may be possible to install the available binary wheels.
Most likely, the following should be updated into the upstream project: |
@jcfr thanks! I am interested in getting this working, and I am happy to help. The motivation is that LFortran's Python package depends on Ninja and so I want things to just #23 is merged. I am new to Python wheels --- when reading the documentation I was left with the impression that binary wheels for linux can only be made for the scikit-build/cmake-python-distributions#69 (comment) But then it fails, as described in the comment, because When you said
Can you be more specific? Are those My understanding was that on Alpine, How can I help to resolve this? |
Here is how to reproduce this error:
Note: I get exactly the same error if I install the latest version by |
I debugged the issue. The problem is that this line should be compiled on Alpine: But instead this line gets compiled: and fails. To fix it, we have to define some preprocessor directives that the code expects, e.g., we can define
Now it works. How should this be fixed so that one does not have to execute |
Co-authored-by: Ondřej Čertík <[email protected]>
Co-authored-by: Ondřej Čertík <[email protected]>
support for building on Alpine
We could change this line with the following:
Or more complete solution would be:
... and I then realized submitting a PR would be as easy ... see #25 Let me know if you prefer not to be added as co-author. manylinux and musl
I was incorrect. I don't think they are. To answer that question, could you run the following command in your python environment:
This should list all supported tag on your platform. As you reported, manylinux1 and manylinux2010 require glibc, and since musl and glibc does not seem to be ABI compatible, package have to explicitly compile for Alpine. What happen if you running |
Co-authored-by: Ondřej Čertík <[email protected]>
You could test doing:
See https://pip.pypa.io/en/stable/reference/pip_install/#vcs-support |
Co-authored-by: Ondřej Čertík <[email protected]>
Yes,
|
That worked!! |
Note, I had to do this:
You have to install The other issue is that you have to install cmake in order to install ninja, and you need ninja to install cmake, so it's a chicken and an egg problem. So I install cmake using |
Support building on Alpine Linux. See #22
automatic install of scikit-build
This PR should take care of this: #26 Could you test ?
a simple approach for distributing Alpine wheel
Since it only list Waiting pypi officially host Alpine wheel, here is an idea: Release assets of a particular github project could be used to host generated binary wheels. Such wheels could be installed doing:
This means that after uploading wheels built for Alpine 3.9 and upload them as GitHub release assets into a release named 3.9, you wouldn't have to build the package from source ... https://github.com/scikit-build/alpine-python-wheels |
Ps: Headed on a 🏃♂️ , will be back shortly. Then, we will:
|
@jcfr as far as I understand, the So my Dockerfile would have to look like this (just for ninja to build), including the fix for #27 FROM alpine:3.10
# install python3 (incl. pip3)
RUN apk add --no-cache --update python3
# install ninja dependency manually, see bug #27
RUN pip3 install 'scikit-build==0.10.0'
# add build time dependencies
RUN apk add --no-cache python3-dev cmake make g++
# help ninja build itself
ENV CXXFLAGS="-D_BSD_SOURCE"
# build ninja
RUN pip3 install ninja |
Thanks for the follow up.
For reference, find below the error reported if Ideally, the ninja sources should be fixed. If for some reason this is not possible, an other option could be to update ninja-python-distributions/CMakeLists.txt Error:
|
@jcfr is there a reason that all of
have been deleted? Is there a working solution to this issue? |
I think that due to the lack of manpower to maintain the build of Alpine wheels, I removed the branch and repo I created. Honestly I don't recall the details, and I should have add a note here. All of that said, is it something you would like to help move forward ? |
Fixed in 1.10.0.post3 Wheel for musllinux will be available once all tooling around PEP 656 is available. For now, the following works on alpine:3.9:
|
Uh oh!
There was an error while loading. Please reload this page.
Here is the error:
I can provide the exact steps to reproduce. This looks like a bug, as things should compile. I think this is related to Alpine using musl instead of glibc.
The text was updated successfully, but these errors were encountered: