[linux-lvm] Problems with linking lvm statically with musl

KARBOWSKI Piotr piotr.karbowski at gmail.com
Sun Dec 24 14:36:02 UTC 2017


I am facing some problems with linking LVM2.2.02.177 statically with 
musl, using Alpine Linux as a sysroot/chroot.

I needed to apply two patches:

It would be nice if you guys could upsptream it.

I've noticed that I am unable to link tools/dmsetup, as with 
LDFLAGs='-static' CFLAGS='-static' it's unable to find libdevmapper.a. 
It passes multiple -L directories, one of them is ../libdm, however, the 
libdevmapper is under ../libdm/ioctl directory, adding another -L or 
symlinking libdevmapper.a -> ioctl/libdevmapper.a does the trick

Is the ioctl location intentional or it's like that by bug?

-- Piotr.

More information about the linux-lvm mailing list