FS#65725 - [mkinitcpio] cp: cannot stat '(builtin)': No such file or directory

Attached to Project: Arch Linux
Opened by Josip Ponjavic (metak) - Friday, 06 March 2020, 20:37 GMT
Last edited by Giancarlo Razzolini (grazzolini) - Friday, 17 July 2020, 14:09 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Giancarlo Razzolini (grazzolini)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 10
Private No

Details

Continuation of this issue: https://bugs.archlinux.org/task/65564

But this error message still appears with some other kernels for fallback image, like linux-clear from aur. (I'm the maintainer btw)

Kernels:
- linux-clear-5.5.8 error message
- linux-clear-current-5.6.0.rc4 error message
- linux-clear-lts2019-5.4.24 error message
- linux-clear-lts2018-4.19.108
- linux-clear-lts2017-4.14.172
- linux-clear-preempt-rt-5.4.22.13 error message

- kmod-27-1
- mkinitcpio-27-3

mkinitcpio output: https://pastebin.com/UQ46Cba2


This error also appears with linux-clear-bin package. https://aur.archlinux.org/packages/linux-clear-bin/

Must be something in clear linux kernel that's triggering this?
I asked Giancarlo Razzolini first on [mkinitcpio github page](https://github.com/archlinux/mkinitcpio/pull/17) and he suggested I open a new issue here.
This task depends upon

Closed by  Giancarlo Razzolini (grazzolini)
Friday, 17 July 2020, 14:09 GMT
Reason for closing:  Fixed
Additional comments about closing:  mkinitcpio-28-1 fixes this issue
Comment by Dave Reisner (falconindy) - Friday, 06 March 2020, 20:41 GMT
Your paste shows no errors?
Comment by Josip Ponjavic (metak) - Friday, 06 March 2020, 20:47 GMT
Hi falconindy. Sorry about that, here's the updated link. https://pastebin.com/BVakUVzY
Comment by Dave Reisner (falconindy) - Friday, 06 March 2020, 21:17 GMT
So what's the difference between the two pastes?
Comment by Josip Ponjavic (metak) - Friday, 06 March 2020, 21:24 GMT
The first paste was missing these two lines: (first and last)

cp: cannot stat '(builtin)': No such file or directory
==> Generating module dependencies
==> Creating lz4-compressed initcpio image: /boot/initramfs-linux-clear-fallback.img
==> WARNING: errors were encountered during the build. The image may not be complete.

As mentioned in that first bug report I linked at the top, it's a harmless message and the images are generated.
Comment by Doug Newgard (Scimmia) - Saturday, 07 March 2020, 03:40 GMT
what does `type -a mkinitcpio` give you?
Comment by Josip Ponjavic (metak) - Saturday, 07 March 2020, 09:01 GMT
Hi Scimmia. I get `mkinitcpio is /usr/bin/mkinitcpio`.
Comment by Michel Koss (MichelKoss1) - Saturday, 07 March 2020, 13:10 GMT
I have same issue with my own custom kernel so this isn't linux-clear exclusive problem.
Comment by Dave Reisner (falconindy) - Saturday, 07 March 2020, 15:39 GMT
> As mentioned in that first bug report I linked at the top, it's a harmless message and the images are generated.

I understand what the message is -- i was curious if this was a matter of differently invoking mkinitcpio or if your paste just neglected to include stderr (seems the latter).

One way to reproduce this is by taking the false branch here:

https://github.com/archlinux/mkinitcpio/blob/master/mkinitcpio#L502

Do your kernels include /lib/modules/$(uname -r)/modules.builtin ?
Comment by Josip Ponjavic (metak) - Saturday, 07 March 2020, 16:37 GMT
Yes, the first paste was incomplete and yes my kernels do include modules.builtin.

`linux-clear /usr/lib/modules/5.5.8-1-clear/modules.builtin`

If you want to check the built binaries here's my repo.
http://download.opensuse.org/repositories/home:/metakcahura:/kernel/Arch_Extra_standard/x86_64/
Comment by Dave Reisner (falconindy) - Saturday, 07 March 2020, 18:53 GMT
Thanks -- helpful to have the built kernel.

https://github.com/archlinux/mkinitcpio/pull/20 should prevent this from happening in the future.
Comment by Josip Ponjavic (metak) - Saturday, 07 March 2020, 19:11 GMT
Thanks falkonindy. I tried your fix and it works without problem. Thanks again.
Comment by Giancarlo Razzolini (grazzolini) - Tuesday, 10 March 2020, 13:37 GMT
I'll add a patch for this later this week to mkinitcpio
Comment by Eric Wang (enihcam) - Friday, 03 April 2020, 07:53 GMT
Any updates for patching mkinitcpio? the issue still exists.
Comment by Giancarlo Razzolini (grazzolini) - Friday, 03 April 2020, 12:53 GMT
I plan on making a new release next week, with this patch included.
Comment by Michel Koss (MichelKoss1) - Thursday, 16 April 2020, 12:57 GMT
@grazzolini did you mean next month? :)
Comment by Xuanrui Qi (xuanrui) - Tuesday, 21 April 2020, 12:31 GMT
This issue still exists.
Comment by Giancarlo Razzolini (grazzolini) - Tuesday, 21 April 2020, 14:04 GMT
I have been preparing a new mkinitcpio release, but I also want to address an issue with the existing alpm hooks. So, it's taking a bit longer to finish it, because of the testing required. If, for some reason this release cannot be prepared by the end of April, I'll patch the package with this patch and make the release after.
Comment by Chris (ChrisLane) - Wednesday, 22 April 2020, 16:59 GMT
Can confirm, even installing the latest from git (024119a987f720101bc1af723772d608e84e8e2d), this is still an issue on my pine64 aarch64.
https://gist.github.com/ChrisLane/4c370b56615ac297e3d8ffc138699dee
Comment by Dave Reisner (falconindy) - Wednesday, 22 April 2020, 19:39 GMT
You're not confirming anything because the relevant changes haven't been merged.

See: https://github.com/archlinux/mkinitcpio/pull/20
Comment by Giancarlo Razzolini (grazzolini) - Wednesday, 22 April 2020, 19:45 GMT
Not to mention, this bug *is not* present with the kernels that are on the Arch repository.
Comment by Chris (ChrisLane) - Saturday, 25 April 2020, 09:07 GMT
Sorry, I thought I'd seen the fix in the commit history already. Thanks for the link @falconindy
Comment by YamadaHayao (hayao) - Thursday, 30 April 2020, 14:01 GMT
I came here after seeing the following post.
https://bbs.archlinux32.org/viewtopic.php?id=2904

I got here because the build failed with the archiso of ArchLinux32.
Is this a problem with ArchLinux (64bit)? Or is it an ArchLinux32 issue?
And has this problem been fixed already?
I'm not good at English, so I can't really grasp the current situation.
Comment by Giancarlo Razzolini (grazzolini) - Friday, 01 May 2020, 17:00 GMT
No, this doesn't happen with any Arch kernel that's on the official repositories. I'm going to push this weekend a patched version of mkinitcpio.
Comment by YamadaHayao (hayao) - Saturday, 02 May 2020, 01:50 GMT
Thank you very much for your reply.
I'll wait till this weekend.
Comment by M. Greyson Christoforo (greyltc) - Wednesday, 24 June 2020, 14:20 GMT
> I'm going to push this weekend a patched version of mkinitcpio.
-- Friday, 01 May 2020, 19:00 GMT+2

I see this today. Should I expect to see this today?
Comment by Giancarlo Razzolini (grazzolini) - Wednesday, 24 June 2020, 17:20 GMT
I haven't got around to finish testing the other mkinitcpio patches. And, I didn't want to apply only this patch, specially since it's not an Arch bug. This patch is already applied upstream. A new mkinitcpio release just for this is overkill as well. Anyway, now that my package queue is somewhat cleared, I'll have some time for this.
Comment by Michel Koss (MichelKoss1) - Thursday, 25 June 2020, 12:23 GMT
@grazzololini current mkinitcpio package has applied patch[1] reverted upstream which causes an Arch bug[1]. The revert was done in the same PR as fix for this bug, I think dropping reverted patch and backporting fix for this ticket is reasonable if you don't want new mkinitcpio release.

[1] https://git.archlinux.org/svntogit/packages.git/tree/trunk/0002-mkinitcpio-fix-builtin.patch?h=packages/mkinitcpio
[2] hhttps://github.com/archlinux/mkinitcpio/pull/20#issuecomment-631095678
Comment by Joshua Rubin (joshuarubin) - Thursday, 16 July 2020, 02:57 GMT
I've fixed this bug on my own system with the attached patch. The issue was that, for the xanmod kernel I'm using, `modinfo -k 5.7.8-xanmod2-2-xanmod crc32c` returned the attached output with "filename: (builtin)". The patch just tests for the "(builtin)" value and ensures that it's not added to `_addedmodules`
Comment by Giancarlo Razzolini (grazzolini) - Thursday, 16 July 2020, 14:24 GMT
mkinitcpio-28 is on [testing]. Can the reporters confirm it fixes this bug?
Comment by Alice Huston (ahuston-0) - Thursday, 16 July 2020, 18:00 GMT
I tested mkinitcpio-28 with linux-xanmod, as I was having similar issues with that and it appears to have fixed it. Since the original complaint was with linux-clear I'll give it a shot now. Thanks for the patch!

Edit: I have now tested with linux-xanmod 5.7.9 and linux-clear 5.7.8 and it seems like the patch to mkinitcpio fixes both of them.

Loading...