Control: found -1 lvm2/2.02.95-8 -- The bug exists in the source since Wheezy.
From what I can tell, the targets dmsetup.static and lvm.static in tools/Makefile.in are the only ones that need to be modified. Depending on the source version the following fixes work: Wheezy: dmsetup.static and lvm.static require -lpcre -lpthread (in that exact order). Stretch: dmsetup.static requires only -lpcre. lvm.static requires $(PTHREAD_LIBS) and -lpcre in any order. Sid: dmsetup.static requires only -lpcre. lvm.static requires $(M_LIBS) $(PTHREAD_LIBS) and -lpcre in any order. If --disable-selinux is also give, Wheezy: source compiles fine Stretch: lvm.static requires $(PTHREAD_LIBS) Sid:lvm.static requires $(M_LIBS) $(PTHREAD_LIBS) in any order. So it looks like -lpcre should really be a part of the line SELINUX_LIBS="-lsepol" in configure. With Wheezy, ${PTHREAD_LIBS} is empty and configure never sets it without --enable-dmeventd or --with-clvmd but the libpthread dependency seems to be from functions in libpcre. This is the fix that works for all 3 versions: 1)Disable the requirement of --enable-dmeventd or --with-clvmd to set PTHREAD_LIBS in configure (only present in Wheezy) 2)Change to SELINUX_LIBS="-lsepol -lpcre" in configure 3) In tools/Makefile.in, change the stuff after -ldevmapper and $(LVMLIBS) to $(STATIC_LIBS) $(M_LIBS) $(PTHREAD_LIBS) $(LIBS), for dmsetup.static and lvm.static respectively Please do let me know if I am doing something wrong.