Should llvm9-dev have a dependency?
Consider a simple Dockerfile:
FROM alpine:edge RUN apk --no-cache add --virtual llvm9-dev \ && find / -name *llvm* \ && ls /usr/lib/llvm9/bin/llvm-config
This will fail, and if you check the logs you'll see that it's not just llvm-config that's missing --- llvm9-dev doesn't install any files at all. Going by https://pkgs.alpinelinux.org/contents?branch=edge&name=llvm9-dev&arch=x86_64&repo=main , not to mention all the files the
find turns up in the Dockerfile below, we would expect to see quite a few files appear when we apk add llvm9-dev.
Of course, with build-base it works fine:
FROM alpine:edge RUN apk --no-cache add --virtual build-base llvm9-dev \ && find / -name *llvm* \ && ls /usr/lib/llvm9/bin/llvm-config
Maybe it doesn't make a ton of sense to apk add llvm9-dev without build-base, but supposing that someone does, what is the least bad thing to do? Installing whatever dependency is needed for the package to actually do something might be preferable.
(Demonstration Dockerfiles can be seen at https://github.com/dHannasch/alpine-llvm-dockerfile and https://hub.docker.com/r/dahanna/alpine-llvm-test .)
(I'm fixated on llvm9-dev since llvmlite does not support llvm10-dev yet https://github.com/numba/llvmlite/issues/507 , but presumably all the same issues apply to llvm10-dev.)