kciter / aws-ecr-action

This Action allows you to create Docker images and push into a ECR repository.
MIT License
146 stars 116 forks source link

Module build failed #20

Closed mdemri closed 3 years ago

mdemri commented 3 years ago
     building 'Cython.Plex.Scanners' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/tmp
    creating build/temp.linux-x86_64-2.7/tmp/pip-install-jjBTYm
    creating build/temp.linux-x86_64-2.7/tmp/pip-install-jjBTYm/Cython
    creating build/temp.linux-x86_64-2.7/tmp/pip-install-jjBTYm/Cython/Cython
    creating build/temp.linux-x86_64-2.7/tmp/pip-install-jjBTYm/Cython/Cython/Plex
    gcc -fno-strict-aliasing -Os -fomit-frame-pointer -g -DNDEBUG -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python2.7 -c /tmp/pip-install-jjBTYm/Cython/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-2.7/tmp/pip-install-jjBTYm/Cython/Cython/Plex/Scanners.o
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-jjBTYm/Cython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-E4EaLW/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-dgWVRE --compile" failed with error code 1 in /tmp/pip-install-jjBTYm/Cython/

----------------------------------------

Command "/usr/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-dgWVRE --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel Cython" failed with error code 1 in None The command '/bin/sh -c apk update && apk upgrade && apk add --no-cache --update python py-pip coreutils bash && rm -rf /var/cache/apk/* && pip install awscli && apk --purge -v del py-pip' returned a non-zero code: 1

geoffsoftledger commented 3 years ago

Also seeing this same issue today

trombini77 commented 3 years ago

I´m facing the same issue here.

  building 'Cython.Plex.Scanners' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/tmp
    creating build/temp.linux-x86_64-2.7/tmp/pip-install-yLt36n
    creating build/temp.linux-x86_64-2.7/tmp/pip-install-yLt36n/Cython
    creating build/temp.linux-x86_64-2.7/tmp/pip-install-yLt36n/Cython/Cython
    creating build/temp.linux-x86_64-2.7/tmp/pip-install-yLt36n/Cython/Cython/Plex
    gcc -fno-strict-aliasing -Os -fomit-frame-pointer -g -DNDEBUG -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python2.7 -c /tmp/pip-install-yLt36n/Cython/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-2.7/tmp/pip-install-yLt36n/Cython/Cython/Plex/Scanners.o
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-yLt36n/Cython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ui1Oyn/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-JyJ8i9 --compile" failed with error code 1 in /tmp/pip-install-yLt36n/Cython/

----------------------------------------

Command "/usr/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-JyJ8i9 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel Cython" failed with error code 1 in None The command '/bin/sh -c apk update && apk upgrade && apk add --no-cache --update python py-pip coreutils bash && rm -rf /var/cache/apk/* && pip install awscli && apk --purge -v del py-pip' returned a non-zero code: 1

Error: Docker build failed with exit code 1


What I see here that the base image doesn´t have gcc compiler installed and the script need it.. so crashed. I saw in code that the base image is https://hub.docker.com/_/docker?tab=tags&page=1&ordering=last_updated&name=19.03.4 Step 1/5 : FROM docker:19.03.4 and have more than one year this image so probably some step after before enable the right execution and not because some modification in the base image.

geoffsoftledger commented 3 years ago

Possibly related?: https://github.blog/changelog/2020-02-27-github-actions-breaking-change-python-2-being-removed-from-all-virtual-environments/ gh actions removing support for python2.7

shuynh commented 3 years ago

the latest version of the aws-cli introduced some new dependencies (like gcc) that this Dockerfile doesn't install. we got around this by pinning the aws-cli install to the last working version -- pip install awscli==1.18.95

trombini77 commented 3 years ago

awscli==1.18.95

I tried do build image locally with the change in Dockerfile from pip install awscli to pip install awscli==1.18.95 and it worked fine.

Now is only missing the repository owner fix it :)

alarinel commented 3 years ago

Same here

rryke commented 3 years ago

+1

kciter commented 3 years ago

Update Dockerfile https://github.com/kciter/aws-ecr-action/commit/7ea3f73762295bdbee44242a87de3831f64b4e8f

trombini77 commented 3 years ago

Will this revision have a new release version?

CWSites commented 3 years ago

Updating to kciter/aws-ecr-action@master resolved the problem for me. If possible to trigger a new version that would be much appreciated :)

jairoFernandez commented 3 years ago

Update Dockerfile 7ea3f73

Thank you @kciter

koslib commented 3 years ago

@kciter As the awscli brings in more functionality and security updates from version to version, I think it's wise to pin to a specific pyyaml version rather than awscli's. I've sent a PR about this too in case you agree with me https://github.com/kciter/aws-ecr-action/pull/21.

kciter commented 3 years ago

Here, new release https://github.com/kciter/aws-ecr-action/releases/tag/v3 😄