-
Notifications
You must be signed in to change notification settings - Fork 470
Ninja fails to compile on alpine linux #3666
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
we will apply the patch linked, unfortunately we can not use system provided ninja since we have important patches. will ping @briangorman you later for testing (I don't have alpine linux) |
@briangorman can you confirm that it would be fixed in #3668? |
Facing the same issue while building with Docker using node:alpine |
@bobzhang I can confirm that the fix_3666 branch results in an executable ninja.exe in the lib folder, while master's install.js script fails to build ninja under alpine 3.10. Thanks for the quick fix! |
What is the latest version that contains this fix ? |
It is landed in master
… On Jul 10, 2019, at 3:14 PM, tejesh014 ***@***.***> wrote:
What is the latest version that contains this fix ?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub <#3666>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAFWMK2I5YHRKLO5KU6MEZDP6WD6DANCNFSM4H64PXRA>.
|
I tried the latest version (5.0.6) but that too did not work. Is it supposed to fix this issue? I was previously on v5.0.4. |
The fix does not go to a release yet, will let you know once it is released
… On Jul 10, 2019, at 4:14 PM, Ashutosh Sharma ***@***.***> wrote:
I tried the latest version (5.0.6) but that too did not work. Is it supposed to fix this issue? I was previously on v5.0.4.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub <#3666>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAFWMKYRS5KSX77SEJC3KJDP6WK5PANCNFSM4H64PXRA>.
|
I'm having a hard time with deployment because of this. Has anyone found any simple workarounds for this till this is released? Maybe downloading an earlier version of Ninja? |
Hi, sorry for such inconvenience, I will try to make a beta release this weekend or early next week
发自我的iPhone
…------------------ Original ------------------
From: Greg <[email protected]>
Date: Sat,Jul 20,2019 7:53 AM
To: BuckleScript/bucklescript <[email protected]>
Cc: Hongbo Zhang <[email protected]>, State change <[email protected]>
Subject: Re: [BuckleScript/bucklescript] Ninja fails to compile on alpine linux (#3666)
I'm having a hard time with deployment because of this. Has anyone found any simple workarounds for this till this is released? Maybe downloading an earlier version of Ninja?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi @GTDev87 , I published [email protected] in #3694 with a beta tag, hopefully it would unblock your work. Do make a test before in case some bugs leaked in the latest release. |
Hey @bobzhang, I put it in and it seems to build now Thanks a lot!! I'll tell you if I find any problems. |
@bobzhang would you mind porting the ninja fix to a beta release of the 6.x tree? |
@pm-mck certainly |
Is this issue resolved? I'm using node:alpine with bs-platform version 8.2.0, still facing the same issue. Error: Command failed: /app/node_modules/bs-platform/linux/ninja.exe -f release.ninja -v |
@tlonist-sang do you have a detailed log? it should build its own ninja for apline |
After installing everything needed to build ninja it started working. The guys above should add more details, because for me it works fine. Here is my Dockerfile for a nextjs application: FROM node:14.17.0-alpine
ENV NINJA_DEPS \
python3 \
g++ \
make
RUN apk add --update --no-cache --virtual .build-deps ${NINJA_DEPS} && \
ln -sf python3 /usr/bin/python
RUN mkdir -p /workspace/promo && chown 1000:1000 /workspace/promo
WORKDIR /workspace/promo
USER 1000
ENV NEXT_TELEMETRY_DISABLED=1
COPY package*.json ./
RUN npm ci
USER root
RUN apk del .build-deps \
&& rm -rf /var/cache/apk/* /tmp/*
USER 1000
COPY . .
ENV NODE_ENV=production
RUN npm run build
CMD ["npm", "run", "start"] The only negative thing is that it takes 7 minutes to build the ninja, so it becomes very said when docker's cache doesn't work. |
In some reason the image built by the config I've posted above has the 1.84GB size. I didn't really wanted to debug it, so I switched to the The updated version of Dockerfile: FROM node:14.17.0-slim
RUN mkdir -p /workspace/promo && chown 1000:1000 /workspace/promo
WORKDIR /workspace/promo
USER 1000
ENV NEXT_TELEMETRY_DISABLED=1
COPY package*.json ./
RUN npm ci
COPY . .
ENV NODE_ENV=production
RUN npm run build
CMD ["npm", "run", "start"] |
It seems ninja does compile on alpine Linux, but it requires more deps, e.g, make, python. |
Uh oh!
There was an error while loading. Please reload this page.
Alpine 3.8
Seems to be an upstream issue with ninja
ninja-build/ninja#1510
One possibility to "fix" this from bucklescript's side is to use the operating system supplied ninja if possible. This would also speed up builds.
https://pkgs.alpinelinux.org/packages?name=ninja&branch=v3.8
The text was updated successfully, but these errors were encountered: