Forums

Skip to content

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

[SOLVED] Makefile fails while compiling linux-5.15.88-gentoo

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
17 posts • Page 1 of 1
Author
Message
EmDeeTee
n00b
n00b
Posts: 11
Joined: Fri Jan 20, 2023 10:14 am

[SOLVED] Makefile fails while compiling linux-5.15.88-gentoo

  • Quote

Post by EmDeeTee » Fri Jan 20, 2023 4:58 pm

Hi. I've downloaded the new stable gentoo-sources (5.15.88), created a symlink using eselect kernel, but when I try to `make` it shows me this:

Code: Select all

hell /usr/src/linux # make
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND objtool
  CHK     include/generated/compile.h
arch/x86/entry/vdso/Makefile:206: *** target pattern contains no '%'.  Stop.
make[2]: *** [scripts/Makefile.build:552: arch/x86/entry/vdso] Error 2
make[1]: *** [scripts/Makefile.build:552: arch/x86/entry] Error 2
make: *** [Makefile:1902: arch/x86] Error 2
Last edited by EmDeeTee on Sun Jan 22, 2023 9:27 am, edited 1 time in total.
Top
turtles
Veteran
Veteran
User avatar
Posts: 1713
Joined: Fri Dec 31, 2004 7:30 am

Re: Makefile fails while compiling linux-5.15.88-gentoo

  • Quote

Post by turtles » Sat Jan 21, 2023 5:37 am

EmDeeTee wrote:Hi. I've downloaded the new stable gentoo-sources (5.15.88), created a symlink using eselect kernel, but when I try to `make` it shows me this:

Code: Select all

hell /usr/src/linux # make
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND objtool
  CHK     include/generated/compile.h
arch/x86/entry/vdso/Makefile:206: *** target pattern contains no '%'.  Stop.
make[2]: *** [scripts/Makefile.build:552: arch/x86/entry/vdso] Error 2
make[1]: *** [scripts/Makefile.build:552: arch/x86/entry] Error 2
make: *** [Makefile:1902: arch/x86] Error 2
did you first run

Code: Select all

make menuconfig
and configure the kernel ?
Donate to Gentoo
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3529
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Sat Jan 21, 2023 6:26 am

Check with the wiki if you've missed something.

Best Regards,
Georgi
Top
luna80
Veteran
Veteran
User avatar
Posts: 1569
Joined: Sun Feb 01, 2004 7:51 am
Location: switzerland

  • Quote

Post by luna80 » Sat Jan 21, 2023 7:09 am

did you copy the .config of the old kernel in the new kernel directory?

and, if yes, did you do

Code: Select all

#make oldconfig
if yes, try

Code: Select all

#make clean
and after retry with make
*** !f j00 c4n r34D tH15 tH3N j00 n33D t0 l0g Off ***
Top
EmDeeTee
n00b
n00b
Posts: 11
Joined: Fri Jan 20, 2023 10:14 am

  • Quote

Post by EmDeeTee » Sat Jan 21, 2023 10:16 am

luna80 wrote:did you copy the .config of the old kernel in the new kernel directory?

and, if yes, did you do

Code: Select all

#make oldconfig
if yes, try

Code: Select all

#make clean
and after retry with make
Thank you for responding. Yes, I've followed the wiki, and yes I've tried doing `make oldconfig` and `make clean`, but every time I invoke make it shows that error

Could that be a problem in the Linux kernel makefile? There is no way, right?
Top
EmDeeTee
n00b
n00b
Posts: 11
Joined: Fri Jan 20, 2023 10:14 am

Re: Makefile fails while compiling linux-5.15.88-gentoo

  • Quote

Post by EmDeeTee » Sat Jan 21, 2023 10:18 am

turtles wrote:
EmDeeTee wrote:Hi. I've downloaded the new stable gentoo-sources (5.15.88), created a symlink using eselect kernel, but when I try to `make` it shows me this:

Code: Select all

hell /usr/src/linux # make
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  DESCEND objtool
  CHK     include/generated/compile.h
arch/x86/entry/vdso/Makefile:206: *** target pattern contains no '%'.  Stop.
make[2]: *** [scripts/Makefile.build:552: arch/x86/entry/vdso] Error 2
make[1]: *** [scripts/Makefile.build:552: arch/x86/entry] Error 2
make: *** [Makefile:1902: arch/x86] Error 2
did you first run

Code: Select all

make menuconfig
and configure the kernel ?
Yes, I've copied my old .config, ran `make oldconfig` and verified it with `make menuconfig`
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

Re: Makefile fails while compiling linux-5.15.88-gentoo

  • Quote

Post by Hu » Sat Jan 21, 2023 4:14 pm

EmDeeTee wrote:

Code: Select all

hell /usr/src/linux # make
arch/x86/entry/vdso/Makefile:206: *** target pattern contains no '%'.  Stop.
make[2]: *** [scripts/Makefile.build:552: arch/x86/entry/vdso] Error 2
What is the content of that line? What are the current values of any variables that line references? Some users may not have that specific source version installed, and so cannot check locally.
Top
EmDeeTee
n00b
n00b
Posts: 11
Joined: Fri Jan 20, 2023 10:14 am

Re: Makefile fails while compiling linux-5.15.88-gentoo

  • Quote

Post by EmDeeTee » Sat Jan 21, 2023 4:42 pm

Hu wrote:
EmDeeTee wrote:

Code: Select all

hell /usr/src/linux # make
arch/x86/entry/vdso/Makefile:206: *** target pattern contains no '%'.  Stop.
make[2]: *** [scripts/Makefile.build:552: arch/x86/entry/vdso] Error 2
What is the content of that line? What are the current values of any variables that line references? Some users may not have that specific source version installed, and so cannot check locally.
This is the line 206

Code: Select all

$(MODLIB)/vdso: FORCE

Code: Select all

$(MODLIB)/vdso: FORCE
        @mkdir -p $(MODLIB)/vdso

Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Jan 21, 2023 5:23 pm

That matches what I expect from the kernel sources, so no Gentoo patches have moved it. I also asked about the current values of those variables. What does MODLIB expand to?
Top
EmDeeTee
n00b
n00b
Posts: 11
Joined: Fri Jan 20, 2023 10:14 am

  • Quote

Post by EmDeeTee » Sat Jan 21, 2023 5:51 pm

Hu wrote:That matches what I expect from the kernel sources, so no Gentoo patches have moved it. I also asked about the current values of those variables. What does MODLIB expand to?
In the main Makefile I've found this:

Code: Select all

#
# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
# relocations required by build roots.  This is not defined in the
# makefile but the argument can be passed to make if needed.
#

MODLIB  = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
export MODLIB
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Jan 21, 2023 6:28 pm

That is the basic definition of MODLIB, before recursive expansion. To what string does MODLIB evaluate after expanding the contained variables, recursively? Answering that requires at least INSTALL_MOD_PATH and KERNELRELEASE, and may require more if either of those is itself a variable reference. Per the comment, INSTALL_MOD_PATH defaults to undefined, but if it is set in your process environment, that would take precedence over the default empty string.
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3529
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Sat Jan 21, 2023 6:45 pm

Are you sure you emerged gentoo-sources and not gentoo-kernel?

What does `equery list sys-kernel/*` say?
It might be good to also post what `eselect kernel list` say.

Best Regards,
Georgi
Top
turtles
Veteran
Veteran
User avatar
Posts: 1713
Joined: Fri Dec 31, 2004 7:30 am

  • Quote

Post by turtles » Sat Jan 21, 2023 10:47 pm

EmDeeTee I think what hu is asking is for you to edit the Makefile and add a info line right below the line

Code: Select all

export MODLIB

like so:

Code: Select all

export MODLIB
$(info "MODLIB $(MODLIB)")
Then when you run make it will print out the value of MODLIB
Like so
make
"MODLIB /lib/modules/5.16.14-gentoo"
CC arch/x86/kernel/asm-offsets.s
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
Donate to Gentoo
Top
sublogic
Guru
Guru
User avatar
Posts: 385
Joined: Mon Mar 21, 2022 3:02 am
Location: Pennsylvania, USA

  • Quote

Post by sublogic » Sun Jan 22, 2023 1:19 am

I'll chip in another idea.

Code: Select all

# make V=1
to increase verbosity, or even

Code: Select all

# script -c 'make V=1'
to capture the output in a "typescript" file. Maybe you'll get a more informative error message. Or maybe not, but it's easy enough to try.
Top
EmDeeTee
n00b
n00b
Posts: 11
Joined: Fri Jan 20, 2023 10:14 am

  • Quote

Post by EmDeeTee » Sun Jan 22, 2023 9:26 am

Thank you everybody so much for tips and suggestions on how I could fix my problem, but I managed to figure it out on my own.

Turns out, that I had a semicolon in General Setup -> Local Version.

This is what caused the Makefile to fail
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Jan 22, 2023 4:47 pm

scripts/setlocalversion will be run by Makefile to generate include/config/kernel.release, and will write the value of CONFIG_LOCALVERSION to that file, if set. In turn, Makefile will load the content of that file into the Make variable KERNELRELEASE, which becomes an input to the variable MODLIB. Putting a semicolon in CONFIG_LOCALVERSION allowed that to enter KERNELRELEASE, which confused Make when that was expanded raw. To fix this, the value loaded into KERNELRELEASE would need to be backslash-escaped, or the expansion of it could be escaped at expansion time. Either way, this may expose more bugs, since that would put a semicolon in a directory name, and some tools may not handle that well.
Top
turtles
Veteran
Veteran
User avatar
Posts: 1713
Joined: Fri Dec 31, 2004 7:30 am

  • Quote

Post by turtles » Tue Jan 24, 2023 3:19 am

Hu wrote:scripts/setlocalversion will be run by...../snip//.. and some tools may not handle that well.
Hu whenever you join a thread I yell "Hu is in the house!" at my screen.
Same with Neddy.
Donate to Gentoo
Top
Post Reply

17 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