$ cd /usr/src/linux ; make emits the message: --------------------------------- scripts/kconfig/conf --silentoldconfig Kconfig Makefile:942: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop. --------------------------------- Notice that even if I unset CONFIG_UNWINDER_ORC, (this option is found under "kernel hacking") I received the above error too. I emerged virtual/libelf (in my case dev-libs/elfutils was installed) and the kernel was built. Bug 627778 says libelf is necessary to build nvidia driver, but I don't have an nvidia card, so it is a different report. Regards.
I bet you have the minimal USE in make.conf. This will bring in virtual/libelf for most people via the system package iproute2. I agree the dependency is necessary. Impact is minor as it will only impact those who set minimal in make.conf at this immediate time.
(A bit off-topic) Thanks. You're right, except a minor point: My iproute2 is a bit old, being 4.4.0, which is still in the portage tree. Its ebuild doesn't pull in libelf, unlike newer ones.
is this still a problem ?
you could solve it by installing virtual/libelf ? probably this is to deal with iproute2 not kernel.
(In reply to Alice Ferrazzi from comment #4) > you could solve it by installing virtual/libelf ? > > probably this is to deal with iproute2 not kernel. If someone is to set minimal USE in make.conf they negate pulling in virtual/libelf with that system package. The next depclean could remove it breaking kernel builds.
> you could solve it by installing virtual/libelf ? > > probably this is to deal with iproute2 not kernel. Anyway, assuming indirect dependency is bad. What happens when the situation with iproute2 changes? Please, be simple. Avoid hidden intention, and be clear to others. If you assume something, at least document it the ebuild. Still, my bug report is yet to be confirmed by others.
*** Bug 646426 has been marked as a duplicate of this bug. ***
(In reply to Teika kazura from comment #6) > Still, my bug report is yet to be confirmed by others. i confirm that building the kernel fails if you don't have virtual/libelf installed. i had to install it manually, and then the kernel compiled without problems. it's gentoo-sources-4.15.0 in my case. BTW, without installing virtual/libelf, app-emulation/virtualbox-modules also fails.
I was just hit by this. I do *NOT* have "minimal" set in make.conf. Nor anywhere else. libelf was unmerged yesterday on a depclean. Whatever package was pulling it in, it seems to have dropped it. Btw, if gentoo-sources would end up depending on libelf, it should probably depend on dev-libs/libelf, not the virtual. Unless you can build gentoo-sources on freebsd?
Same thing here. virtual/libelf and dev-libs/elfutils where unmerged by depclean. This was previously pulled by sys-apps/iproute2, but itβs now hidden behind the "elf" USE flag, not enabled by default. Anyway, kernel packages should depend directly on libelf, and not rely on second level dependencies on random system profile packages that can change anytime (just like we saw here).
Can confirm it on 4.15.1 also. Depclean removed libelf after upgrades to iproute2-4.15.0. No minimal USE flag set, on default/linux/amd64/17.0/desktop/gnome/systemd profile.
(In reply to Guillaume Castagnino from comment #10) > Anyway, kernel packages should depend directly on libelf, and not rely on > second level dependencies on random system profile packages that can change > anytime (just like we saw here). I agree completely and I can imagine everyone would agree with that. As a simple user, I would think that the obvious thing to do is simply add libelf as a dependency for the kernel. Am I missing something?
From f9b2693b32b7c7c7c561ae417cbd757624184327 Mon Sep 17 00:00:00 2001 From: Alice Ferrazzi <alicef@gentoo.org> Date: Thu, 18 Jan 2018 15:41:17 +0000 Subject: [PATCH] Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y New 4.14 kernel is using CONFIG_UNWINDER_ORC=y by default but having USE="minimal" is removing virtual/libelf, this is breaking the Kernel compilation. Closes: https://github.com/gentoo/gentoo/pull/6898