LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 08-18-2023, 05:58 PM   #1
AvidKotlinDenier
LQ Newbie
 
Registered: Aug 2023
Posts: 1

Rep: Reputation: 0
Kernel compilation fails when removing source and build directory. 6.4.y


How do I fix this compilation error?
-----
rm: cannot remove: .../modules/6.4.11-1/source: No such file or directory
rm: cannot remove: .../modules/6.4.11-1/build: No such file or directory
==> ERROR: A failure occured in package_linux().
Aborting...
Press enter to exit
-----

This compilation error happenes when I tried to compile the 6.4.11-1 Linux Kernel on an arch(based) distribution.

Some things to note:
- The path is correct (I typed a shorter version on this post),
I am using a kernel PKGBUILD from CachyOS. I know this issue is unrelated to CachyOS, because I tried using the TKG install build on normal arch, which resulted in the same error. I have also tested it with EndeavourOS.
- A few days ago I was able to compile kernel 6.4.10-273 just fine, using the basically the same kernel configuration. (I have attempted to specifically select this kernel version, which now displays the same error)


Things I have tried:
- Clean install of Arch: (EndeavourOS, CachyOS, archlinux install script, manual install of arch), results in the same error being displayed after compilation.
- Setting rm -f instead of rm in the script to ignore nonexistent directories / files. (Still fails because module symvers is not found)
- Compiling with the standard CPU scheduler
- Compiling without any patches
- Compiling using the default kernel settings
- Completely wiping every disk in my system and reinstalling linux.
- Disabling XMP memory profile and disabling my CPU overclock.
- Compile with march=generic
- Attempt compilation using TKG glitch build script, and CachyOS kernel PKGBUILD script, both display this error.
- Compiling with everything disabled in menuconfig
- Disabling ccache (I only found one instance of another person having this issue, which they resolved by doing so) did not work.

I have no clue how I can solve this issue, or what caused it to happen in the first place. No hardware changes or changes to bios settings were made, compilation worked fine a few days prior. I am new to Linux so I would greatly appreciate it if someone could help me out here.
 
Old 08-22-2023, 09:18 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,325

Rep: Reputation: 2330Reputation: 2330Reputation: 2330Reputation: 2330Reputation: 2330Reputation: 2330Reputation: 2330Reputation: 2330Reputation: 2330Reputation: 2330Reputation: 2330
Greetings, AvidKotlinDenier & welcome to LQ.

They are both symlinks to the kernel top source dir. They have obviously been deleted. Probably the correct thing to do is type these lines in a terminal
Code:
sudo ln -s /usr/src/linux-6.4.11-1 /lib/modules/6.4.11-1/build
sudo ln -s /usr/src/linux-6.4.11-1 /lib/modules/6.4.11-1/source
which replaces them, and try again. If the actual source dir in /usr/src is gone, I think you'd go down in flames before that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Deleting the source directory and build directory after compiling each package ganiz Linux From Scratch 5 01-11-2018 02:02 AM
Removing source files from a public directory after compilation vtucf Linux - Newbie 1 03-31-2012 08:43 PM
Which is the kernel build directory? I Can't find kernel build files crabsody Debian 7 01-09-2007 04:48 AM
10.1 install kernel and kernel-source different - build fails Feebles Mandriva 2 06-10-2005 06:58 PM
where is linux source build directory/kernel source tree? webazoid Linux - Software 2 07-01-2004 08:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 12:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration