awslabs / aws-lambda-cpp

C++ implementation of the AWS Lambda runtime
Apache License 2.0
440 stars 89 forks source link

Compilation fails on latest Alpine Linux 3.18 #186

Open cjlpowers opened 1 year ago

cjlpowers commented 1 year ago

Seeing the same issue as https://github.com/awslabs/aws-lambda-cpp/issues/124 but with Alpine 3.18.

FROM alpine:3.18

RUN apk add --no-cache cmake make g++ git bash zip curl-dev zlib-dev elfutils-dev

RUN git clone https://github.com/awslabs/aws-lambda-cpp.git && \
cd aws-lambda-cpp && \
mkdir build && \
cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/lambda-install && \
make && make install

Results in

Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)

docker build .
Sending build context to Docker daemon  2.048kB
Step 1/3 : FROM alpine:3.18
 ---> 5e2b554c1c45
Step 2/3 : RUN apk add --no-cache cmake make g++ git bash zip curl-dev zlib-dev elfutils-dev
 ---> Using cache
 ---> ef8a2af84855
Step 3/3 : RUN git clone https://github.com/awslabs/aws-lambda-cpp.git && cd aws-lambda-cpp && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/lambda-install && make && make install
 ---> Running in 48db089782a6
Cloning into 'aws-lambda-cpp'...
-- The CXX compiler identification is GNU 12.2.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CURL: /usr/lib/libcurl.so (found version "8.1.2")  
-- Looking for backtrace
-- Looking for backtrace - not found
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake/Modules/FindBacktrace.cmake:90 (find_package_handle_standard_args)
  CMakeLists.txt:50 (find_package)

-- Configuring incomplete, errors occurred!
The command '/bin/sh -c git clone https://github.com/awslabs/aws-lambda-cpp.git && cd aws-lambda-cpp && mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/lambda-install && make && make install' returned a non-zero code: 1
BoyeMagnus commented 1 year ago

Same error here. And as aws-lambda-cpp is used for custom nodejs lambda runtimes, then AWS Lambda containers cannot run on alpine linux 3.18

cjlpowers commented 1 year ago

@BoyeMagnus Yes, I am seeing the same issue. That is what brought me here.

ejoebstl commented 1 year ago

Same error here. Would be amazing to see a fix, as this blocks us from upgrading our images.