LLVM: debuginfod support not working
Package Information
- Package name: llvm17 / llvm19
- Package version: 17.0.6-r1 / 19.1.4-r0
- Alpine version: 3.20.6 / 3.21.3
- Alpine architecture: x86_64
Summary
Retrieval of debug information from a debuginfod server (e.g. via llvm-symbolizer
or llvm-debuginfod-find
) is not working at all. The tools never even attempt to contact the server. This seems to happen because LLVM in Alpine is compiled without libcurl, basically turning all HTTP requests into no-ops (see source).
I tried to build LLVM(17) with curl enabled in !80991 (closed) (see also here) and this fixes the issue. Would be great if such a fix could go in - it'd be happy to clean up and finalize the PR (and apply it to other LLVM versions/Alpine branches).
Steps to reproduce
Alpine 3.20
$ docker run -it alpine:3.20
$ apk add llvm17
# Based on https://sourceware.org/elfutils/Debuginfod.html
$ export DEBUGINFOD_URLS="https://debuginfod.elfutils.org/"
$ llvm-debuginfod-find --debuginfo 1ba84b92a0ae2a9fa2f1b8033a583c6eb223c204
Build ID 1ba84b92a0ae2a9fa2f1b8033a583c6eb223c204 could not be found
In comparison, when run on the host (Manjaro Linux), the server is contacted and debug information is downloaded.
$ llvm-debuginfod-find [...]
[...]/.cache/llvm-debuginfod/client/llvmcache-13340585769959270151
Things also work as expected when installing the packages generated by !80991 (closed), which enables libcurl:
cd /src/mr-80991/packages
apk add --allow-untrusted *.apk
/root/.cache/llvm-debuginfod/client/llvmcache-1100932731939984704
Alpine 3.21
docker run -it alpine:3.21
apk add llvm19
# Remaining steps identical to 3.20 repro above