Commit e5e0345
committed
fix(ci/edriver): link against zstd-static on Alpine instead of vendored-libelf
Alpine 3.20 libelf-static IS compiled WITH zstd support, so linking
system libelf.a introduces ZSTD_* symbol references.
Root cause of the new error:
- host == target on Alpine (both x86_64-unknown-linux-musl)
- Cargo resolver=2 only separates features when host != target; when
they match, libbpf-sys features are unified between [dependencies]
and [build-dependencies]
- static-libelf (from libbpf-rs/static) bleeds into the build-script
compilation, causing the build.rs to emit cargo:rustc-link-lib=elf
against the system libelf.a (which has ZSTD refs)
Fix: install zstd-static on Alpine and add '-l static=zstd' to RUSTFLAGS
so the linker can resolve ZSTD_* from /usr/lib/libzstd.a.
vendored-libelf is not used on Alpine to avoid the elfutils configure
argp/fts failure chain on musl.
Changes:
- matrix: add rustflags field per arch (x86_64 gets -lzstd, aarch64 doesn't)
- Alpine apk: add zstd-dev zstd-static
- Build/Test env: RUSTFLAGS uses matrix.rustflags
- Cache key bumped to v51 parent 8473e1a commit e5e0345
1 file changed
Lines changed: 13 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
| 41 | + | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
| |||
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| 56 | + | |
51 | 57 | | |
| 58 | + | |
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
| |||
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
| 72 | + | |
65 | 73 | | |
66 | 74 | | |
67 | 75 | | |
| |||
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
101 | | - | |
102 | | - | |
| 109 | + | |
| 110 | + | |
103 | 111 | | |
104 | 112 | | |
105 | 113 | | |
| |||
122 | 130 | | |
123 | 131 | | |
124 | 132 | | |
125 | | - | |
| 133 | + | |
126 | 134 | | |
127 | 135 | | |
128 | 136 | | |
| |||
138 | 146 | | |
139 | 147 | | |
140 | 148 | | |
141 | | - | |
| 149 | + | |
142 | 150 | | |
0 commit comments