Skip to content

Error : libexecinfo-dev package not found #128

Closed

Description

@AyushSeth1

The latest version awslambdaric 2.08 is still attempting to use a package libexecinfo-dev which no longer exists on Alpine Linux. Alpine Linux team and upstream opensource teams have eliminated libexecinfo-dev from the system. Any software still attempting to use the library must be updated.

awslambdaric documentation still says that it depends on libexecinfo-dev -- from this it is clear that awslambdaric team does not test their software on Alpine Linux.

Our Builds are failing because of the above issue in awslambdaric.
Pls give us a fix for this.

Activity

  1. AyushSeth1 commented on Nov 21, 2023

    @AyushSeth1
    Author
    image-20230801-171339 image-20231116-055626 image-20231116-055718
  2. godcrampy commented on Jul 23, 2025

    @godcrampy

    Confirmed this exists even on 3.1.1. This is coming from the aws-lambda-cpp/backtrace.h. Doesn't seem to be required for invoke path.

    Adding this as a bug. Fix would be either disabling backtrace (-Dno_backtrace) or remove backward.cpp entirely for alpine builds.

  3. jantmanAtCox commented on Aug 20, 2025

    @jantmanAtCox

    Is there any update on a fix for this? awslambdaric says that it officially supports Alpine Linux, but it requires libexecinfo-dev which was dropped in Alpine 3.17 almost three years ago, and the last version of Alpine that included this package went EOL in May 2024. In addition, this Alpine bug says that the package didn't even work in the first place.

    This is becoming a problem because the last non-RC build of the official Python Docker image using Alpine 3.16 was 3.11.3-alpine3.16 which is getting quite old now and is already in security-only update mode, and will be EOL in two years.

  4. patricktree commented on Aug 22, 2025

    @patricktree

    The following solved the issue for us @hokify:

    # WORKAROUND: Create dummy backtrace implementation for aws-lambda-ric compilation (AI-generated solution)
    # 
    # aws-lambda-ric@3.3.0 requires backtrace functionality during compilation, but Alpine Linux
    # doesn't include libexecinfo. This creates minimal dummy implementations to satisfy cmake.
    RUN mkdir -p /usr/include && \
        echo '#ifndef _EXECINFO_H_' > /usr/include/execinfo.h && \
        echo '#define _EXECINFO_H_' >> /usr/include/execinfo.h && \
        echo 'int backtrace(void **buffer, int size) { return 0; }' >> /usr/include/execinfo.h && \
        echo 'char **backtrace_symbols(void *const *buffer, int size) { return NULL; }' >> /usr/include/execinfo.h && \
        echo '#endif' >> /usr/include/execinfo.h && \
        echo 'int backtrace(void **buffer, int size) { return 0; }' > /tmp/libexecinfo.c && \
        echo 'char **backtrace_symbols(void *const *buffer, int size) { return ((void *)0); }' >> /tmp/libexecinfo.c && \
        gcc -shared -o /usr/lib/libexecinfo.so /tmp/libexecinfo.c
    
    # install dependencies (with backtrace library configuration)
    RUN Backtrace_LIBRARY=/usr/lib/libexecinfo.so Backtrace_INCLUDE_DIR=/usr/include CI=true pnpm install --prod --frozen-lockfile
  5. jantmanAtCox commented on Aug 22, 2025

    @jantmanAtCox

    @pkerschbaum This is the repository for the Python version of awslambdaric. Unless I'm wrong, it appears that the above code snippet includes installation via pnpm, which would lead me to believe that it's relevant to https://github.com/aws/aws-lambda-nodejs-runtime-interface-client instead of this repository?

  6. patricktree commented on Aug 27, 2025

    @patricktree

    @jantmanAtCox ups you are right! Still, the underlying cause does appear to be the same across both cases, so it might be worth exploring the dummy backtrace implementation approach I posted above for Python as well.

  7. ilons commented on Jan 13, 2026

    @ilons

    As mentioned before, a workaround is to install libexecinfo-dev from a previous release of alpine linux:

    docker run --rm -it --entrypoint ash python:3.13.11-alpine3.23
    # Install requirements and awslambdaric:
    apk add --no-cache autoconf automake build-base cmake curl libcurl libtool make
    apk add --update --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/ libexecinfo-dev
    pip install awslambdaric
    # Then to test:
    echo -e "def handler(*a, **kw):\n    return {}" > lambda.py
    wget https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie -O /usr/local/bin/aws-lambda-rie
    chmod +x /usr/local/bin/aws-lambda-rie
    /usr/local/bin/aws-lambda-rie /usr/local/bin/python -m awslambdaric lambda.handler &
    curl -XPOST "http://localhost:8080/2015-03-31/functions/function/invocations" -d '{}'
    

    However, this is hacky and not sustainable, and the requirement on it in this package really should be removed instead, as the claim is that alpine linux is supported 👎

  8. jantmanAtCox commented on Jun 3, 2026

    @jantmanAtCox

    Is there any update on this? Versions of Alpine Linux that are usable with awslambdaric are now very old, end-of-life, and contain significant security vulnerabilities.

  9. M-Elsaeed commented on Jun 26, 2026

    @M-Elsaeed
    Contributor

    Fixed, the following now works, no need for libexecinfo-dev starting v4.0.1

    FROM python:alpine
    
    # ARG FUNCTION_DIR
    
    # Install aws-lambda-cpp build dependencies
    RUN apk update && \
      apk add \
      g++ \
      make \
      cmake \
      autoconf \
      automake \
      libtool
    
    # Copy function code
    # RUN mkdir -p ${FUNCTION_DIR}
    # COPY app/* ${FUNCTION_DIR}
    
    # Install the function's dependencies
    RUN pip install \
        # --target ${FUNCTION_DIR} \
            awslambdaric
    
  10. jantmanAtCox commented on Jun 26, 2026

    @jantmanAtCox

    @M-Elsaeed thank you SO, SO, SO MUCH!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions