Kernel 'build' directory in the store is a broken symbolic link

  • Done
  • quality assurance status badge
Details
6 participants
  • Danny Milosavljevic
  • Sarah Morgensen
  • Ludovic Courtès
  • Mark H Weaver
  • Nils Gillmann
  • pkill9
Owner
unassigned
Submitted by
pkill9
Severity
normal

Debbugs page

pkill9 wrote 7 years ago
(name . bug-guix)(address . bug-guix@gnu.org)
E1fenJF-0006Hr-S2@rmmprod06.runbox
/run/booted-system/kernel/lib/modules/<kernel version>/build is a broken symbolic link.
Nils Gillmann wrote 7 years ago
(address . pkill9@runbox.com)(name . Mark H Weaver)(address . mhw@netris.org)(address . 32167@debbugs.gnu.org)
20180715213253.sxpozqmex6mpwgu4@abyayala
pkill9@runbox.com transcribed 94 bytes:
Toggle quote (2 lines)
> /run/booted-system/kernel/lib/modules/<kernel version>/build is a broken symbolic link.

Yep. This is not a bug until it comes to what you are possibly trying to attempt,
build a software which relies on your *current* kernel sources.

For a solution I can point to the Nix package for linux, where they deal with this
within the kernel package, for firmware and more. Because I'm short on time these
days I haven't sent a patch yet but I can confirm the issues you probably ran into
as I had them many months back already.

Mark, you are mostly responsible for the linux module in Guix.

Besides my own notes, this was relevant:
pkill9 wrote 7 years ago
(name . 32167)(address . 32167@debbugs.gnu.org)
E1ff7iJ-0002Jl-P1@rmmprod06.runbox
It would be good to keep the build directory though, since it's expected to exist, and it's easier to just download a module's source and compile it and test it.
Danny Milosavljevic wrote 7 years ago
(address . pkill9@runbox.com)(name . Mark H Weaver)(address . mhw@netris.org)(name . 32167)(address . 32167@debbugs.gnu.org)
20180716201500.3d1f13ae@scratchpost.org
On Mon, 16 Jul 2018 18:55:11 +0100 (BST)
<pkill9@runbox.com> wrote:

Toggle quote (2 lines)
> It would be good to keep the build directory though, since it's expected to exist, and it's easier to just download a module's source and compile it and test it.

I agree.

/run/booted-system/kernel/lib/modules/4.17.3-gnu is in the store anyway so it will be seen by the GC.

The fix would be in linux-libre.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAltM4KQACgkQ5xo1VCww
uqU3Wwf/eFqQCY3XMuoSKbJOFxAPKnLmrt9ULELN7F9gRoa6ZlFJkWMnNyPeN5Xq
vAfBg65Jlhmuib4UtXn35cuw/wuGyNaG7CApLFnzIWFp3jjm6GH/tMaKD0/nlD10
KgG+FxGvg6TpHQ70RDyDQ9ZaXw5TyafzYpFrK0vk7fACkgHLdixt5CvRJ/9W/Ja3
jvwD5r2whss/pdOQa+rzkCzSfY7sBmyzfgCN0d91N1bOCkrcxSgimtZu3Garf3ro
iu8KBf6Bzml1Z3NUytuZyrabe2iq3FBnrHtpqaff9OVchaT4CWxaRNH/xwZViPN5
wHkt+4FQTEePihjrY3t2N/nYnDUGWw==
=Q8qQ
-----END PGP SIGNATURE-----


Mark H Weaver wrote 7 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 32167@debbugs.gnu.org)(address . pkill9@runbox.com)
87r2k2u9bl.fsf@netris.org
Danny Milosavljevic <dannym@scratchpost.org> writes:

Toggle quote (14 lines)
> On Mon, 16 Jul 2018 18:55:11 +0100 (BST)
> <pkill9@runbox.com> wrote:
>
>> It would be good to keep the build directory though, since it's
>> expected to exist, and it's easier to just download a module's
>> source and compile it and test it.
>
> I agree.
>
> /run/booted-system/kernel/lib/modules/4.17.3-gnu is in the store
> anyway so it will be seen by the GC.
>
> The fix would be in linux-libre.

If we were to preserve the kernel build directory as a store item, and
keep a link from the modules directory to the build directory, that
would greatly increase the size of the most minimal system that users
could build.

The unpacked linux-libre-4.17 source directory is 929 megabytes, and
that's before building it. So, keeping the build directory would surely
increase the closure size of the most minimal system by more than a
gigabyte. I don't think it's okay to force all Guix users to pay that
price. Some users will need to build minimal systems.

I'd like to hear more specifics about what the original poster is trying
to accomplish here. It's possible that they simply noticed the broken
links and wanted to let us know. In that case, it's probably best to
simply delete those broken symlinks.

If the intent here is to allow support for out-of-tree kernel modules,
then fixing these symlinks would not solve the problem, and it's not
clear to me that fixing them would be part of a proper solution on
GuixSD. GuixSD is not a system where you can simply compile a kernel
module manually and install it, because our module directory is
immutable. If the goal is to support building out-of-tree kernel
modules, that's a separate discussion that deserves its own "wishlist"
bug report, I think.

Thoughts?

Mark
pkill9 wrote 7 years ago
(name . Mark H Weaver)(address . mhw@netris.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(name . 32167)(address . 32167@debbugs.gnu.org)(name . pkill9)(address . pkill9@runbox.com)
E1ffCdB-0002Wh-Fd@rmmprod06.runbox
Yes I agree with you, since it is a lot of space then it's probably best to just delete the symlink.

The reasoning behind my suggestion of keeping it is mostly for convenience in compiling/testing an external kernel module, i.e. just downloading the source and then compiling it with the currently running kernel, and then loading it to test it.

Come to think of it, could the build directory be put in another output of the linux-libre package?

On Mon, 16 Jul 2018 18:03:58 -0400, Mark H Weaver <mhw@netris.org> wrote:

Toggle quote (44 lines)
> Danny Milosavljevic <dannym@scratchpost.org> writes:
>
> > On Mon, 16 Jul 2018 18:55:11 +0100 (BST)
> > <pkill9@runbox.com> wrote:
> >
> >> It would be good to keep the build directory though, since it's
> >> expected to exist, and it's easier to just download a module's
> >> source and compile it and test it.
> >
> > I agree.
> >
> > /run/booted-system/kernel/lib/modules/4.17.3-gnu is in the store
> > anyway so it will be seen by the GC.
> >
> > The fix would be in linux-libre.
>
> If we were to preserve the kernel build directory as a store item, and
> keep a link from the modules directory to the build directory, that
> would greatly increase the size of the most minimal system that users
> could build.
>
> The unpacked linux-libre-4.17 source directory is 929 megabytes, and
> that's before building it. So, keeping the build directory would surely
> increase the closure size of the most minimal system by more than a
> gigabyte. I don't think it's okay to force all Guix users to pay that
> price. Some users will need to build minimal systems.
>
> I'd like to hear more specifics about what the original poster is trying
> to accomplish here. It's possible that they simply noticed the broken
> links and wanted to let us know. In that case, it's probably best to
> simply delete those broken symlinks.
>
> If the intent here is to allow support for out-of-tree kernel modules,
> then fixing these symlinks would not solve the problem, and it's not
> clear to me that fixing them would be part of a proper solution on
> GuixSD. GuixSD is not a system where you can simply compile a kernel
> module manually and install it, because our module directory is
> immutable. If the goal is to support building out-of-tree kernel
> modules, that's a separate discussion that deserves its own "wishlist"
> bug report, I think.
>
> Thoughts?
>
> Mark
Ludovic Courtès wrote 7 years ago
(name . Mark H Weaver)(address . mhw@netris.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 32167@debbugs.gnu.org)(address . pkill9@runbox.com)
87k1pmrtrq.fsf@gnu.org
Hi,

Mark H Weaver <mhw@netris.org> skribis:

Toggle quote (21 lines)
> Danny Milosavljevic <dannym@scratchpost.org> writes:
>
>> On Mon, 16 Jul 2018 18:55:11 +0100 (BST)
>> <pkill9@runbox.com> wrote:
>>
>>> It would be good to keep the build directory though, since it's
>>> expected to exist, and it's easier to just download a module's
>>> source and compile it and test it.
>>
>> I agree.
>>
>> /run/booted-system/kernel/lib/modules/4.17.3-gnu is in the store
>> anyway so it will be seen by the GC.
>>
>> The fix would be in linux-libre.
>
> If we were to preserve the kernel build directory as a store item, and
> keep a link from the modules directory to the build directory, that
> would greatly increase the size of the most minimal system that users
> could build.

Yeah, we shouldn’t do that IMO.

Toggle quote (9 lines)
> If the intent here is to allow support for out-of-tree kernel modules,
> then fixing these symlinks would not solve the problem, and it's not
> clear to me that fixing them would be part of a proper solution on
> GuixSD. GuixSD is not a system where you can simply compile a kernel
> module manually and install it, because our module directory is
> immutable. If the goal is to support building out-of-tree kernel
> modules, that's a separate discussion that deserves its own "wishlist"
> bug report, I think.

I agree.

Ludo’.
Sarah Morgensen wrote 3 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . Mark H Weaver)(address . mhw@netris.org)(address . 32167-done@debbugs.gnu.org)(address . pkill9@runbox.com)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
86v92pwk84.fsf@mgsn.dev
Hi all,

ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (40 lines)
> Hi,
>
> Mark H Weaver <mhw@netris.org> skribis:
>
>> Danny Milosavljevic <dannym@scratchpost.org> writes:
>>
>>> On Mon, 16 Jul 2018 18:55:11 +0100 (BST)
>>> <pkill9@runbox.com> wrote:
>>>
>>>> It would be good to keep the build directory though, since it's
>>>> expected to exist, and it's easier to just download a module's
>>>> source and compile it and test it.
>>>
>>> I agree.
>>>
>>> /run/booted-system/kernel/lib/modules/4.17.3-gnu is in the store
>>> anyway so it will be seen by the GC.
>>>
>>> The fix would be in linux-libre.
>>
>> If we were to preserve the kernel build directory as a store item, and
>> keep a link from the modules directory to the build directory, that
>> would greatly increase the size of the most minimal system that users
>> could build.
>
> Yeah, we shouldn’t do that IMO.
>
>> If the intent here is to allow support for out-of-tree kernel modules,
>> then fixing these symlinks would not solve the problem, and it's not
>> clear to me that fixing them would be part of a proper solution on
>> GuixSD. GuixSD is not a system where you can simply compile a kernel
>> module manually and install it, because our module directory is
>> immutable. If the goal is to support building out-of-tree kernel
>> modules, that's a separate discussion that deserves its own "wishlist"
>> bug report, I think.
>
> I agree.
>
> Ludo’.

I am closing this old bug since the broken 'build' symlink no longer
exists (nor do any other broken symlinks, as far as I can tell).

As for building out-of-tree kernel modules, we now have
linux-module-build-system, which uses `make-linux-module-builder', which
builds the 'build' directory straight from the linux source with `make
modules_prepare'. There are some improvements to be had there, for
sure, but like mentioned above, that deserves its own wishlist item.

--
Sarah
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 32167@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 32167
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help