-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Build error: 'for' loop initial declarations are only allowed in C99 or C11 mode #588
Comments
@theobat thanks so much for the hint. I was running into the same issues with the docker node:8 container which already provides g++ version 4.9. So instead I've updated g++ and gcc to version 5 using a custom docker container. Here's the content of my Dockerfile which made installing yoga-layout smooth as butter. # Use official node runtime as parent image
FROM node:8
# Install gcc-5 in order to support yoga-layout
RUN echo "deb http://ftp.us.debian.org/debian unstable main contrib non-free" > /etc/apt/sources.list.d/unstable.list &&\
apt-get update &&\
apt-get install --assume-yes -t unstable gcc-5 g++-5 &&\
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5 &&\
cc --version |
tried @weaintplastic 's suggestion on Ubuntu 16.04 but no dice |
It looks like this issue is stale. Please reopen if you see the same behavior on the latest version of Yoga. |
Report
Issues and Steps to Reproduce
Building
yoga-layout
fails when using a Node Docker container, with an error messageuse option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
fromerror: 'for' loop initial declarations are only allowed in C99 or C11 mode
.Steps to Reproduce:
node
image:docker pull node
docker run -it node sh
yoga-layout
in an interactive session:yarn add yoga-layout
This issue should also be present with a standard Debian install, as this is what the Node Docker container is using.
Environment details:
Expected Behavior
Describe what you expected would happen.
Should install
yoga-layout
without errors.Actual Behavior
Describe what actually happened.
Fails to install.
Full error log is here:
The text was updated successfully, but these errors were encountered: