Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #69381 > unrolled thread

Bug#981492: linux-source-5.10: Module-only builds failing since 39a8b293

Started by小太 <nospam@kota.moe>
First post2021-01-31 21:50 +0100
Last post2021-02-16 02:10 +0100
Articles 6 — 5 participants

Back to article view | Back to linux.debian.kernel


Contents

  Bug#981492: linux-source-5.10: Module-only builds failing since 39a8b293 小太 <nospam@kota.moe> - 2021-01-31 21:50 +0100
    Processed: Re: linux-source-5.10: Module-only builds failing  since 39a8b293 "Debian Bug Tracking System" <owner@bugs.debian.org> - 2021-02-15 03:00 +0100
    Bug#981492: linux-source-5.10: Module-only builds failing since 39a8b293 Ben Hutchings <ben@decadent.org.uk> - 2021-02-15 03:00 +0100
      Bug#981492: linux-source-5.10: Module-only builds failing since 39a8b293 ‍小太 <nospam@kota.moe> - 2021-02-15 12:50 +0100
    Bug#981492: linux-source-5.10: Module-only builds failing since 39a8b293 Robert Schlabbach <Robert.Schlabbach@gmx.net> - 2021-02-15 21:50 +0100
    Bug#981492: marked as done (linux-source-5.10: Module-only builds  failing since 39a8b293) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2021-02-16 02:10 +0100

#69381 — Bug#981492: linux-source-5.10: Module-only builds failing since 39a8b293

From小太 <nospam@kota.moe>
Date2021-01-31 21:50 +0100
SubjectBug#981492: linux-source-5.10: Module-only builds failing since 39a8b293
Message-ID<BDrPs-6bK-11@gated-at.bofh.it>
Package: linux-source-5.10
Version: 5.10.9-1
Severity: normal
Tags: ftbfs
X-Debbugs-Cc: nospam@kota.moe

Trying to build in-tree kernel modules without the rest of the kernel (with the
M=... make target) results in the build failing with "ld: cannot open linker
script file -o: No such file or directory"

Commands to reproduce (taken from a DKMS Makefile):
        tar xaf $(LINUX_SOURCE_TAR) --strip-components=1 -C linux-source
        cp /boot/config-$(KERNELRELEASE) linux-source/.config
        cp /usr/src/linux-headers-$(KERNELRELEASE)/Module.symvers linux-
source/Module.symvers
        $(MAKE) -C linux-source oldconfig
        $(MAKE) -C linux-source prepare
        $(MAKE) -C linux-source M=drivers/hwmon

This seems to be direct cause of a recent Debian patch:
https://salsa.debian.org/kernel-
team/linux/-/blob/master/debian/patches/debian/kbuild-look-for-module.lds-
under-arch-directory-too.patch (commit
39a8b293ff1881bca11dae1831885dd30581d023)

The patch tries to make the linker only use a specific linker script
(module.lds) if it exists, but ends up preventing the linker script from being
built from source (module.lds.S), and thus ends up never existing.



-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-1-amd64 (SMP w/8 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages linux-source-5.10 depends on:
ii  binutils  2.35.1-7
ii  xz-utils  5.2.5-1.0

Versions of packages linux-source-5.10 recommends:
ii  bc                    1.07.1-2+b2
ii  bison                 2:3.7.4+dfsg-1
ii  flex                  2.6.4-8
ii  gcc                   4:10.2.1-1
ii  libc6-dev [libc-dev]  2.31-9
ii  linux-config-5.10     5.10.9-1
ii  make                  4.3-4

Versions of packages linux-source-5.10 suggests:
ii  libncurses-dev [ncurses-dev]  6.2+20201114-2
ii  pkg-config                    0.29.2-1
pn  qtbase5-dev                   <none>

-- no debconf information

[toc] | [next] | [standalone]


#69537 — Processed: Re: linux-source-5.10: Module-only builds failing since 39a8b293

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2021-02-15 03:00 +0100
SubjectProcessed: Re: linux-source-5.10: Module-only builds failing since 39a8b293
Message-ID<BIBl8-F8-3@gated-at.bofh.it>
In reply to#69381
Processing control commands:

> tag -1 patch moreinfo
Bug #981492 [linux-source-5.10] linux-source-5.10: Module-only builds failing since 39a8b293
Added tag(s) moreinfo and patch.

-- 
981492: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=981492
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#69539

FromBen Hutchings <ben@decadent.org.uk>
Date2021-02-15 03:00 +0100
Message-ID<BIBl8-F8-5@gated-at.bofh.it>
In reply to#69381

[Multipart message — attachments visible in raw view] — view raw

Control: tag -1 patch moreinfo

Does this fix it?

Ben.

-- 
Ben Hutchings
73.46% of all statistics are made up.

[toc] | [prev] | [next] | [standalone]


#69542

From‍小太 <nospam@kota.moe>
Date2021-02-15 12:50 +0100
Message-ID<BIKy5-6bB-1@gated-at.bofh.it>
In reply to#69539

[Multipart message — attachments visible in raw view] — view raw

Apologies - I jumped to conclusions in my original bug report

After applying your patch and seeing it did not fix the issue, I did a bit
of investigation myself.
It turns out the problem wasn't in the linked commit, but actually part of
the upstream kernel:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.11&id=596b0474d3d9b1242eab713f84d8873f9887d980

The real problem isn't in the code however, but in my Makefile.
I didn't run the "modules_prepare" target before trying to build a module,
despite it being documented:
https://www.kernel.org/doc/Documentation/kbuild/modules.txt

Adding that target to my Makefile resolved the issue, without any changes
to the linux-source package.
So this bug is now invalid

On Mon, 15 Feb 2021 at 12:49, Ben Hutchings <ben@decadent.org.uk> wrote:

> Control: tag -1 patch moreinfo
>
> Does this fix it?
>
> Ben.
>
> --
> Ben Hutchings
> 73.46% of all statistics are made up.
>

[toc] | [prev] | [next] | [standalone]


#69547

FromRobert Schlabbach <Robert.Schlabbach@gmx.net>
Date2021-02-15 21:50 +0100
Message-ID<BISYF-2Qb-1@gated-at.bofh.it>
In reply to#69381
Hello 小太,

just to let you know that your bug report was useful anyway:

I ran into the same issue, and needed the same fix. In fact, my build script had
the "make modules_prepare" commented out, with a "# TODO: is this needed?" comment
above. Apparently, it wasn't needed until Linux 5.10.

So thank you very much for posting this bug and the solution, and including the
full error message in the description - that led me to this bug report, and saved
me hours of hunting down the issue.

Best Regards,
-Robert

On Mon, 15 Feb 2021 22:39:36 +1100 =?UTF-8?B?4oCN5bCP5aSq?= <nospam@kota.moe> wrote:
> Apologies - I jumped to conclusions in my original bug report
> 
> After applying your patch and seeing it did not fix the issue, I did a bit
> of investigation myself.
> It turns out the problem wasn't in the linked commit, but actually part of
> the upstream kernel:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.11&id=596b0474d3d9b1242eab713f84d8873f9887d980
> 
> The real problem isn't in the code however, but in my Makefile.
> I didn't run the "modules_prepare" target before trying to build a module,
> despite it being documented:
> https://www.kernel.org/doc/Documentation/kbuild/modules.txt
> 
> Adding that target to my Makefile resolved the issue, without any changes
> to the linux-source package.
> So this bug is now invalid

[toc] | [prev] | [next] | [standalone]


#69549 — Bug#981492: marked as done (linux-source-5.10: Module-only builds failing since 39a8b293)

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2021-02-16 02:10 +0100
SubjectBug#981492: marked as done (linux-source-5.10: Module-only builds failing since 39a8b293)
Message-ID<BIX2h-5ok-3@gated-at.bofh.it>
In reply to#69381

[Multipart message — attachments visible in raw view] — view raw

Your message dated Mon, 15 Feb 2021 22:37:08 +0100
with message-id <3f9f27cc275a7d6f894a19e1db57bf4046c858e4.camel@decadent.org.uk>
and subject line Re: linux-source-5.10: Module-only builds failing since 39a8b293
has caused the Debian Bug report #981492,
regarding linux-source-5.10: Module-only builds failing since 39a8b293
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
981492: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=981492
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web