awslabs / awslabs/aws-lambda-cpp

Compilation fails on latest Alpine Linux (missing execinfo.h)

未關閉
#124 14 則留言 7 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
465
分支
98
平均合併
12 小時 47 分鐘
30 天內合併 PR
3

描述

Reproducing the build instructions in the README with the following Dockerfile

```Dockerfile
FROM alpine:3.14

RUN apk add git g++ make cmake unzip libtool curl-dev automake

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
```

and running

```bash
docker build -t aws-lambda-cpp .
```

I get

```
#6 0.266 Cloning into 'aws-lambda-cpp'...
#6 1.134 -- The CXX compiler identification is GNU 10.3.1
#6 1.148 -- Detecting CXX compiler ABI info
#6 1.220 -- Detecting CXX compiler ABI info - done
#6 1.236 -- Check for working CXX compiler: /usr/bin/c++ - skipped
#6 1.237 -- Detecting CXX compile features
#6 1.238 -- Detecting CXX compile features - done
#6 1.460 -- Found CURL: /usr/lib/libcurl.so (found version "7.77.0")
#6 1.470 -- Configuring done
#6 1.474 -- Generating done
#6 1.475 -- Build files have been written to: /aws-lambda-cpp/build
#6 1.500 [ 20%] Building CXX object CMakeFiles/aws-lambda-runtime.dir/src/logging.cpp.o
#6 1.630 [ 40%] Building CXX object CMakeFiles/aws-lambda-runtime.dir/src/runtime.cpp.o
#6 2.250 [ 60%] Building CXX object CMakeFiles/aws-lambda-runtime.dir/src/backward.cpp.o
#6 2.340 In file included from /aws-lambda-cpp/src/backward.cpp:26:
#6 2.340 /aws-lambda-cpp/src/backward.h:245:18: fatal error: execinfo.h: No such file or directory
#6 2.340 245 | # include
#6 2.340 | ^~~~~~~~~~~~
#6 2.341 compilation terminated.
#6 2.344 make[2]: *** [CMakeFiles/aws-lambda-runtime.dir/build.make:104: CMakeFiles/aws-lambda-runtime.dir/src/backward.cpp.o] Error 1
#6 2.344 make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/aws-lambda-runtime.dir/all] Error 2
#6 2.344 make: *** [Makefile:136: all] Error 2
```

What's missing?

貢獻指南

開啟貢獻指南

研究方向

先查看 README 中的建置說明和提供的 Dockerfile,然後檢查 execinfo.h include 附近的 src/backward.cpp 和 src/backward.h。使用 Alpine 映像重現失敗,並檢查所需的建置相依性或平台條件;當文件中所述的 Docker 建置成功完成時,即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cmake, cpp, docker, linux
領域
build-system, operating-systems
Issue 類型
缺陷
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。