aws / aws-lambda-python-runtime-interface-client

Apache License 2.0
258 stars 73 forks source link

[Question] Does awslambdaric support python:3.8-alpine3.15 ? #65

Closed glen-uc closed 2 years ago

glen-uc commented 2 years ago

While installing awslambdaric on python:3.8-alpine3.15 we are getting the following error

   config.status: error: in `/tmp/pip-install-rlofbi4w/awslambdaric_552fa8f7237d4b2aa1c432a6c8c99303/deps/curl-7.77.0':
    config.status: error: Something went wrong bootstrapping makefile fragments
        for automatic dependency tracking.  If GNU make was not used, consider
        re-running the configure script with MAKE="gmake" (or whatever is
        necessary).  You can also try re-running configure with the
        '--disable-dependency-tracking' option to at least be able to build
        the package (albeit without support for automatic dependency tracking).
    See `config.log' for more details
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-rlofbi4w/awslambdaric_552fa8f7237d4b2aa1c432a6c8c99303/setup.py", line 94, in <module>
        ext_modules=get_runtime_client_extension(),
      File "/tmp/pip-install-rlofbi4w/awslambdaric_552fa8f7237d4b2aa1c432a6c8c99303/setup.py", line 45, in get_runtime_client_extension
        extra_link_args=get_curl_extra_linker_flags(),
      File "/tmp/pip-install-rlofbi4w/awslambdaric_552fa8f7237d4b2aa1c432a6c8c99303/setup.py", line 18, in get_curl_extra_linker_flags
        check_call(["./scripts/preinstall.sh"])
      File "/usr/local/lib/python3.8/subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['./scripts/preinstall.sh']' returned non-zero exit status 1.

Here is the Dockerfile on how we are installing awslambdaric

ARG FUNCTION_DIR="/function"

FROM python:3.8-alpine3.15 as python-alpine
RUN apk add --no-cache \
    libstdc++ \
    libpq \
    curl

FROM python-alpine AS build-image
ARG FUNCTION_DIR
RUN apk update
RUN pip install --no-cache-dir -U pip
# Basic Necessary packages for build
RUN apk --no-cache add --virtual build-deps build-base libtool autoconf automake musl-dev libexecinfo-dev make cmake gcc
RUN pip install awslambdaric==1.1.1

is awslambdaric supported on python:3.8-alpine3.15 ?

glen-uc commented 2 years ago

Closing this issue as it was not related to awslambdaric

The problem was with alpine 3.15 and the version of docker we were using to build the image, upgrading the docker solved the issue for us

More on this : https://github.com/alpinelinux/docker-alpine/issues/182