On Wed, 2026-01-07 at 16:57 +0000, [email protected] wrote: > On Wednesday, January 7th, 2026 at 12:21 PM, Martin Wilck > <[email protected]> wrote: > > > > On Wed, 2026-01-07 at 12:09 +0000, Michal Rostecki wrote: > > > > > dm_get_multipath() is a static function, not a symbol that can be > > > exported. Clang is strict about not allowing undefined symbols in > > > linker > > > scripts and therefore its presence prevents clang from building > > > libmultipath. > > > > > > Fixes: https://github.com/opensvc/multipath-tools/issues/132 > > > Fixes: bf3a4ad ("libmultipath: simplify dm_get_maps()") > > > Signed-off-by: Michal Rostecki [email protected] > > > > > > Thanks! > > > > Reviewed-by: Martin Wilck [email protected] > > > > > > Yet I'm wondering which compiler version you use, or if you use any > > non-standard compilation options. Our CI compiles multipath-tools > > with > > MANY different versions of clang, but never encountered this > > problem. > > I'm glad you asked - after reading your email I tried using different > linkers and it looks like it's a linker error and it's thrown only by > lld. lld enabled --no-undefined-version as a default option.[0] > Choice > of a compiler (gcc, clang) shouldn't matter. > > I'm using clang 21.1.7 on Gentoo on musl-llvm profile, which uses > full > LLVM toolchain (clang + compiler-rt + libunwind + lld, also in 21.1.7 > version) system-wide, so that's why I've seen the error without > providing any additional flags. > > From what I see, no other linker enables that by default and I've > been > able to build the current master without errors with bfd and mold: > > $ make LDFLAGS="-fuse-ld=bfd" > $ make LDFLAGS="-fuse-ld=mold" > > One can reproduce the error on any system by specifying lld > explicitly: > > $ make LDFLAGS="-fuse-ld=lld" > > Or by passing --no-undefined-version (and making the warning fatal), > which throws an error wyth any linker: > > $ make LDFLAGS="-fuse-ld=mold -Wl,--no-undefined-version -Wl,--fatal- > warnings". > > I will send v2 with a more accurate commit message.
Not necessary. I've already applied your patch to my "queue" branch. I can add this additional information to the existing commit. This makes we wonder whether we could/should use lld in some of our CI runs (probably those where we use clang as compiler?). Currently the containers we use for the CI don't contain lld. Martin
