It seems like lvm2 prefers system libs over its own code from build dir, which results in the above build error. Step to reproduce: have device-mapper installed and install lvm2 (portage does first install lvm2 before removing device-mapper during soft-blocker-resolution) workaround: uninstall device-mapper before installing lvm2
tommy: please include the actual compile error output? (just attach your log if you have it).
I've updated the deps, but I still want the compile-fail logs
Created attachment 204513 [details] build.log I created a showcase for the problem. Since i have a multilib-portage, i installed device-mapper only 64bit, but tried to install lvm2 for both 32bit and 64bit. So the 32bit phase should run fine while the 64bit phase should fail. And as you can see in the build log, this is exactly what happens.
tommy: your CFLAGS are borked. From the log you gave, your CFLAGS is set to: -march=nocona -O2 -pipe -m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib You're adding a library path yourself, and this is being used BEFORE the additional library paths -L../libdm, so the paths you specify are being used as a source. Here's a snippet of your compile output set -e; \ FILE=`echo datastruct/bitset.d | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \ DEPS=`echo ../make.tmpl ../VERSION Makefile ../include/.symlinks_created | sed -e 's/\\//\\\\\\//g'`; \ x86_64-pc-linux-gnu-gcc -MM -Iioctl -I. -I. -I../include -DDM_DEVICE_UID=0 -DDM_DEVICE_GID=0 -DDM_DEVICE_MODE=0600 -DHAVE_CONFIG_H -DDM_IOCTLS -march=nocona -O2 -pipe -m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib -march=nocona -O2 -pipe -m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -O2 datastruct/bitset.c | \ sed "s/\(.*\)\.o[ :]*/$FILE.o $FILE.d $FILE.pot: $DEPS /g" > datastruct/bitset.d; \ [ -s datastruct/bitset.d ] || rm -f datastruct/bitset.d here's the same compile output on mine: set -e; \ FILE=`echo datastruct/bitset.d | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \ DEPS=`echo ../make.tmpl ../VERSION Makefile ../include/.symlinks_created | sed -e 's/\\//\\\\\\//g'`; \ x86_64-pc-linux-gnu-gcc -MM -Iioctl -I. -I. -I../include -DDM_DEVICE_UID=0 -DDM_DEVICE_GID=0 -DDM_DEVICE_MODE=0600 -DHAVE_CONFIG_H -DDM_IOCTLS -march=nocona -O2 -pipe -g -march=nocona -O2 -pipe -g -fPIC -Wall -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wmissing-noreturn -Wformat-security -O2 datastruct/bitset.c | \ sed "s/\(.*\)\.o[ :]*/$FILE.o $FILE.d $FILE.pot: $DEPS /g" > datastruct/bitset.d; \ [ -s datastruct/bitset.d ] || rm -f datastruct/bitset.d My CFLAGS are: -march=nocona -O2 -pipe -g