Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
genkernel fails to find -ldevmapper
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
vwegert
n00b
n00b


Joined: 12 Mar 2005
Posts: 21
Location: Germany

PostPosted: Mon Jul 09, 2018 7:10 pm    Post subject: genkernel fails to find -ldevmapper Reply with quote

Hello,

my "usual" kernel update procedure that has reliably worked for the past years suddenly failed with the following error messages from genkernel:

Code:
...
gcc -o dmraid dmraid.o commands.o toollib.o -Wl,--no-as-needed -static -L../lib -ldmraid -ldevmapper -lm -lrt -lpthread
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -ldevmapper
collect2: error: ld returned 1 exit status


As far as I understand, the devmapper library comes with the lvm2 package, and that is definitely installed. I re-merged it just to be safe, but that did not help. What might be going (wr)on(g) here?

Thanks
Volker
Back to top
View user's profile Send private message
orionbelt
Apprentice
Apprentice


Joined: 05 Apr 2006
Posts: 166
Location: Brussels, Belgium

PostPosted: Thu Jul 12, 2018 8:43 pm    Post subject: Reply with quote

I am having the exact same problem. It happens when invoking genkernel like this:

Code:
genkernel --dmraid --mdadm --mdadm-config=/etc/mdadm.conf --menuconfig --save-config --install --mountboot --bootloader=grub2 all


kernel-genkernel-x86_64-4.14.52-gentoo and System.map-genkernel-x86_64-4.14.52-gentoo are created successfully, and the bug occurs when genkernel wants to add dmraid support:

Code:
* DMRAID: Adding support (compiling binaries)...
* lvm: >> Patching ...
* lvm: >> Applying patches...
patching file configure.in
Hunk #1 succeeded at 32 (offset 1 line).
Hunk #2 succeeded at 2129 (offset 119 lines).
patching file daemons/dmeventd/Makefile.in
Hunk #1 succeeded at 66 (offset -1 lines).
patching file make.tmpl.in
Hunk #1 succeeded at 58 (offset 9 lines).
patching file tools/Makefile.in
Hunk #1 succeeded at 133 (offset 4 lines).
Hunk #2 succeeded at 160 (offset 14 lines).
*           - lvm2-2.02.139-dynamic-static-ldflags.patch
* lvm: >> Autoconf ...
* lvm: >> Configuring...
* lvm: >> Compiling...
* lvm: >> Installing to DESTDIR...
*       >> Copying to bincache...
* dmraid: >> No patches found in /usr/share/genkernel/patches/dmraid/1.0.0.rc16-3 ...
* dmraid: >> Configuring...
* dmraid: >> Compiling...
* ERROR: Failed to compile the "" target...


The devmapper library is installed, and the library path seems quite standard:

Code:
# equery f lvm2 | grep devmapper.so
/lib64/libdevmapper.so.1.02
/usr/lib64/libdevmapper.so

# ls -l /lib64/libdevmapper.so.1.02 /usr/lib64/libdevmapper.so
-r-xr-xr-x 1 root root 373992 Jul 12 15:45 /lib64/libdevmapper.so.1.02
lrwxrwxrwx 1 root root     32 Jul 12 15:45 /usr/lib64/libdevmapper.so -> ../../lib64/libdevmapper.so.1.02


Also, when the fix is found, is there a way to make genkernel compile just the dmraid part instead of waiting 50 minutes to recompile everything on my aging system?
Back to top
View user's profile Send private message
orionbelt
Apprentice
Apprentice


Joined: 05 Apr 2006
Posts: 166
Location: Brussels, Belgium

PostPosted: Tue Jul 17, 2018 10:19 am    Post subject: Reply with quote

There is apparently a quite old bug report for this.
Back to top
View user's profile Send private message
idefix6
n00b
n00b


Joined: 18 Aug 2005
Posts: 6

PostPosted: Tue Jan 29, 2019 6:45 pm    Post subject: Reply with quote

I had the same problem. Remove
Code:
--dmraid
that fixed it for me.
_________________
Matthias
Back to top
View user's profile Send private message
orionbelt
Apprentice
Apprentice


Joined: 05 Apr 2006
Posts: 166
Location: Brussels, Belgium

PostPosted: Thu Jan 31, 2019 5:36 am    Post subject: Reply with quote

idefix6 wrote:
I had the same problem. Remove
Code:
--dmraid
that fixed it for me.

Do you have a RAID system? Does it still boot? :)
Back to top
View user's profile Send private message
HePeR
n00b
n00b


Joined: 04 Oct 2002
Posts: 39

PostPosted: Fri May 10, 2019 3:47 pm    Post subject: Reply with quote

For those who care:
Bug has been fixed by commit on GitHub somewhere in march 2019.
Installing genkernel-9999 solved the compile error.

For some reason dmraids devicenames changes with the new version.... A bit of a pain but better then nothing
Back to top
View user's profile Send private message
orionbelt
Apprentice
Apprentice


Joined: 05 Apr 2006
Posts: 166
Location: Brussels, Belgium

PostPosted: Mon May 27, 2019 12:49 am    Post subject: Reply with quote

May I also point out, for those who may not be aware of it, that most people probably do not need "--dmraid" these days.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum