First off, thanks for the fantastic tool!
It'd be mildly convenient if there were published binaries for musl in addition to the existing glibc one. Would you consider doing so?
Background: we run JVMs (Azul Zulu) out of Docker images based on Alpine (which ships with musl). Currently, when we want to use the profiler, we need to grab the source, install some packages (g++, linux-headers, and make), and compile it. That's all perfectly workable, but it'd be nice if we only needed to install the runtime dependencies (libstdc++ and bash) and use a binary.
In case it's helpful for you, I put together a simple dockerfile to build x86 musl binaries:
FROM alpine:3.9
RUN mkdir -p /usr/local/zulu \
&& wget https://cdn.azul.com/zulu/bin/zulu11.33.15-ca-jdk11.0.4-linux_musl_x64.tar.gz -O - \
| tar -xz -f - -C /usr/local/zulu
ENV JAVA_HOME=/usr/local/zulu/zulu11.33.15-ca-jdk11.0.4-linux_musl_x64
ENV PATH $PATH:$JAVA_HOME/bin
RUN apk add g++ linux-headers make
RUN mkdir /async-profiler
WORKDIR /async-profiler
COPY Makefile ./
COPY src src/
RUN make
With that in the project dir as, say, alpine.Dockerfile, building with docker build -f alpine.Dockerfile . will produce an image id at the end (or use tags, etc). You can then pull out the build products with:
mkdir x86-musl
for f in jattach libasyncProfiler.so; do
docker run --rm [the image id above] cat /async-profiler/build/$f > x86-musl/$f
done
Thanks!
Yes, I think I can provide musl builds starting from the next release.
Excellent, thanks. Feel free to close this if you like.
I added async-profiler to testing repository of Alpine Linux.
Added musl build in 1.6 Early Access release:
https://github.com/jvm-profiling-tools/async-profiler/releases/tag/v1.6-ea
Just updated our internal tooling to use the 1.6 musl builds; thanks again!
@jchipmunk btw it looks like that alpine build only lists bash as a dependency but AFAICT it also needs libstdc++. Did it work for you with just bash?
@marshallpierce
This shouldn't be needed since abuild tool pulls in build-base automatically which depends on gcc.