Created attachment 495294 [details] genkernel full log gcc -o dmraid.o -c -I -I. -I../include -I../lib -include ../include/config.h -I/var/tmp/genkernel/10299.23831.20912.930363/lvm/include -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 dmraid.c gcc -o commands.o -c -I -I. -I../include -I../lib -include ../include/config.h -I/var/tmp/genkernel/10299.23831.20912.930363/lvm/include -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 commands.c gcc -o toollib.o -c -I -I. -I../include -I../lib -include ../include/config.h -I/var/tmp/genkernel/10299.23831.20912.930363/lvm/include -O2 -fPIC -Wall -Wundef -Wcast-align -Wwrite-strings -Winline -O2 toollib.c gcc -o dmraid dmraid.o commands.o toollib.o -L/var/tmp/genkernel/10299.23831.20912.930363/lvm/lib -static -L../lib -ldmraid -ldevmapper /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info.part.4': (.text+0x1652): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_bases': (.text+0x16d7): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_table_bases': (.text+0x17ab): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__deregister_frame_info_bases': (.text+0x184e): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__deregister_frame_info_bases': (.text+0x18d6): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE': (.text+0x19b6): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE': (.text+0x1a06): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE': (.text+0x1af0): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info.part.4': (.text+0x1671): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_bases': (.text+0x16f6): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_table_bases': (.text+0x17ca): undefined reference to `pthread_mutex_unlock' /var/tmp/genkernel/10299.23831.20912.930363/lvm/lib/libdevmapper.a(libdm-string.o): In function `dm_size_to_string': libdm-string.c:(.text+0x1868): undefined reference to `nearbyintl' libdm-string.c:(.text+0x1885): undefined reference to `floorl' /var/tmp/genkernel/10299.23831.20912.930363/lvm/lib/libdevmapper.a(pool.o): In function `dm_pool_create': pool.c:(.text+0xe4): undefined reference to `pthread_mutex_lock' pool.c:(.text+0x103): undefined reference to `pthread_mutex_unlock' /var/tmp/genkernel/10299.23831.20912.930363/lvm/lib/libdevmapper.a(pool.o): In function `dm_pool_destroy': pool.c:(.text+0x19a): undefined reference to `pthread_mutex_lock' pool.c:(.text+0x1b2): undefined reference to `pthread_mutex_unlock' /var/tmp/genkernel/10299.23831.20912.930363/lvm/lib/libdevmapper.a(pool.o): In function `dm_pools_check_leaks': pool.c:(.text+0xdce): undefined reference to `pthread_mutex_lock' pool.c:(.text+0xdea): undefined reference to `pthread_mutex_unlock' pool.c:(.text+0xe99): undefined reference to `pthread_mutex_unlock' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:71: dmraid] Error 1 make[1]: Leaving directory '/var/tmp/genkernel/10299.23831.20912.930363/dmraid/1.0.0.rc16-3/dmraid/tools' make: *** [make.tmpl:120: tools] Error 2 * Gentoo Linux Genkernel; Version 3.5.2.1[0m * Running with options: all * Using genkernel.conf from /etc/genkernel.conf * Sourcing arch-specific config.sh from /usr/share/genkernel/arch/x86_64/config.sh .. * Sourcing arch-specific modules_load from /usr/share/genkernel/arch/x86_64/modules_load ..
Created attachment 495296 [details] emerge --info output
This is dmraid failing to link to the newer LVM.
Problem persists with sys-kernel/genkernel-3.5.2.3 for me.
Any update on this one?
I too am running into this. Interestingly the version of LVM that genkernel is trying to use, at least at the time of my last sync, is masked - so my actual userland divorced from the ramdisk builds everything just fine. Obviously it's missing links to pthread and and libm - though I'm not entirely sure if the "correct thing to do" is in this case to force these to link together. If I'm not mistaken, at one point LVM had stuff patched by statically linked in the genkernel ramdisk for probably a good reason.
When the system dmraid's compiled static against lvm2[-udev] it sets LIBS="-ldevmapper -lm -lrt -lpthread" based on the pkg-config --static output; it makes sense to me that this is what we would need to set when we build dmraid within genkernel as well, right now it's hard-coded to just LIBS="-ldevmapper"
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=10b971c5299a4e4303eab5b594a96636cd234c98 commit 10b971c5299a4e4303eab5b594a96636cd234c98 Author: Robin H. Johnson <robbat2@gentoo.org> AuthorDate: 2017-12-20 22:53:16 +0000 Commit: Robin H. Johnson <robbat2@gentoo.org> CommitDate: 2017-12-20 22:53:16 +0000 gen_compile: fix dmraid lvm linking This will hopefully fix dmraid linking against newer LVM. Bug: https://bugs.gentoo.org/631368 Suggested-by: Ian Stakenvicius <axs@gentoo.org> Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> gen_compile.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)}
@axs: thanks for that catch. Hopefully commit 10b971c captures that correctly. Can somebody with a dmraid system please test, and then we can close this bug out.
My bad, I should have subscribed to this bug. I am not in town right now but when I get back I can test a new genkernel initrd with this dmraid to see if it builds (and subsequently boots). I should be back before the new year.
*** Bug 584784 has been marked as a duplicate of this bug. ***
Released in 3.5.2.5 for testing.
This one solved, but a new one appeared: https://bugs.gentoo.org/644094