Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

kernel compilation failure with Error2 and nothing else

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
hujuice
Guru
Guru
User avatar
Posts: 354
Joined: Tue Oct 16, 2007 12:57 pm
Location: Nicosia, Cyprus

kernel compilation failure with Error2 and nothing else

  • Quote

Post by hujuice » Sat Mar 23, 2024 4:38 pm

I have an error with no explanation while building my gentoo-sources:

Code: Select all

...
  CC [M]  drivers/gpu/drm/i915/i915_hwmon.o
  LD [M]  drivers/gpu/drm/i915/i915.o
  AR      drivers/gpu/built-in.a
make[2]: *** [scripts/Makefile.build:480: drivers] Error 2
make[1]: *** [/usr/src/linux-6.6.21-gentoo/Makefile:1913: .] Error 2
make: *** [Makefile:234: __sub-make] Error 2
What to do?

I had the same error before, but after this:

Code: Select all

  AR      drivers/scsi/built-in.a
So I gave mrproper and clean, and now I have the same error after another driver.

Kernel: sys-kernel/gentoo-sources-6.6.21
Kernel .config: https://pastebin.com/1vLqUL4q

As a further note, I had to switch to new profiles during the installation (the stage file was old profile, I've found the new profile after sync).
I followed the instructions without problems.
Those who lack character must at least have a method.
Chi non ha carattere, deve pur avere un metodo.
Top
hujuice
Guru
Guru
User avatar
Posts: 354
Joined: Tue Oct 16, 2007 12:57 pm
Location: Nicosia, Cyprus

  • Quote

Post by hujuice » Sun Mar 24, 2024 11:16 am

After many failures, without changing the configuration, I realised that my CONFIG_EXTRA_FIRMWARE string was wrong (just a copy and paste mistake). After pasting the right string, the compilation was successful.
I don't arrive to understand why this mistake leads to that error with no messages.
Those who lack character must at least have a method.
Chi non ha carattere, deve pur avere un metodo.
Top
Hu
Administrator
Administrator
Posts: 24401
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Mar 24, 2024 3:17 pm

I seem to recall other users who had that mistake, who did get a message. Per Guidelines item #4, please show us the exact command you used to build the kernel, and the full output it produced, starting from the command and ending when your shell prompt appears again.
Top
hujuice
Guru
Guru
User avatar
Posts: 354
Joined: Tue Oct 16, 2007 12:57 pm
Location: Nicosia, Cyprus

  • Quote

Post by hujuice » Sun Mar 24, 2024 9:37 pm

Hu wrote:I seem to recall other users who had that mistake, who did get a message. Per Guidelines item #4, please show us the exact command you used to build the kernel, and the full output it produced, starting from the command and ending when your shell prompt appears again.
I normally don't redirect the output to be ready to share it. And I don't look at the output lines scrolling fast.
But we are lucky: I saved the wrong config and I can reproduce it.
You will see that the error is declared in the output, but the build process didn't stop for long.
The exact command was (this time with redirect):

Code: Select all

nice make -j11 &>/tmp/make.out
Not working config file: https://filebin.net/nx24u9iv0zsojhxu/no ... nel-config
make.out: https://filebin.net/nx24u9iv0zsojhxu/make.out
If you grep for "No rule to make target" you find the mistake. It's a thousand of lines before the end.

Once the mistake is corrected (and with this change only) make is successful.

Code: Select all

CONFIG_EXTRA_FIRMWARE="intel-ucode/06-9e-0a"
Those who lack character must at least have a method.
Chi non ha carattere, deve pur avere un metodo.
Top
Hu
Administrator
Administrator
Posts: 24401
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Mar 24, 2024 10:27 pm

Highly parallel make may allow a large volume of additional output after an error before the job finally stops. For this reason, we sometimes suggest that users reproduce the error with -j1, so that there is no parallelism and the job stops immediately on error, making the message easy to find. Saving the full output and reviewing it in a pager also works.
Top
hujuice
Guru
Guru
User avatar
Posts: 354
Joined: Tue Oct 16, 2007 12:57 pm
Location: Nicosia, Cyprus

  • Quote

Post by hujuice » Mon Mar 25, 2024 10:27 am

Hu wrote:Highly parallel make may allow a large volume of additional output after an error before the job finally stops. For this reason, we sometimes suggest that users reproduce the error with -j1, so that there is no parallelism and the job stops immediately on error, making the message easy to find. Saving the full output and reviewing it in a pager also works.
There's not so much to debug, in terms of errors.
The strange behaviour for me is the so long progression after the error. It's clearly related to parallelism, but when I read my output with less I see it is at 67% of the progress (3k lines or more). It's a lot!
What I did, first, was to scroll up, and there was nothing.
Those who lack character must at least have a method.
Chi non ha carattere, deve pur avere un metodo.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic