Build from source for Alpine Linux needs some modifications.
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
First, I tried to build a docker container with bcc using Alpine linux image (tag: Latest).
But it showed some errors and seems it needs some updates.
Here's my Dockerfile
```
FROM alpine:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apk --no-cache update
RUN apk --no-cache add tar git build-base iperf \
linux-headers llvm15-dev llvm15-static \
clang-dev clang-static cmake python3 \
flex-dev bison luajit-dev elfutils-dev \
zlib-dev musl xz zip
RUN git clone https://github.com/iovisor/bcc.git
RUN sed -i 's/error.h/err.h/' bcc/examples/cpp/KModRetExample.cc | cat -n
RUN mkdir bcc/build
WORKDIR bcc/build
RUN cmake -DPYTHON_CMD=python3 .. # build python3 binding
RUN make
RUN make install
WORKDIR /
```
There are three things to do in order to make things work.
1. It needs extra packages such as xz, zip, and musl, which are not instructed in the INSTALL.MD.
2. The llvm10, which is instructed in INSTALL.MD is not supported. So I changed it to llvm15.
3. Alpine doesn't have error.h headerfile. So i switched 'error.h' from "bcc/usr/share/bcc/tools/execsnoop" up with 'err.h'.
These steps will solve things for now I guess.
Any comments?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with INSTALL.md and compare its package and LLVM instructions with the supplied Alpine Dockerfile. Review bcc/examples/cpp/KModRetExample.cc and the bcc/usr/share/bcc/tools/execsnoop reference for the header issue. Done means the documented Alpine dependencies and build steps are accurate and an Alpine build completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, docker, linux, python
- Domain
- build-system, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100