make menuconfig and make j$(nproc) throwing errors

Aruna Hewapathirane aruna.hewapathirane at gmail.com
Thu Feb 24 05:40:33 EST 2022


On Thu, Feb 24, 2022 at 1:46 AM Greg KH <greg at kroah.com> wrote:
>
> On Wed, Feb 23, 2022 at 10:58:45PM -0500, Aruna Hewapathirane wrote:
> > And I tried to build without make menuconfig and make is telling me I
> > need 'bison' ? Why do I need bison ? Since when
> > did we need bison ? See below for details.
> >
> > aruna at debian:/media/aruna/linux-next/home/linux-5.16.10$ make -j$(nproc)
> >   DESCEND objtool
> >   HOSTCC  scripts/asn1_compiler
> >   YACC    scripts/genksyms/parse.tab.[ch]
> > /bin/sh: 1: bison: not found
>
> You need bison to build the kernel, sorry, please install it.
Oh my, you actually went through that mess ? I will do so thank you.
>
> > make[2]: *** [scripts/genksyms/Makefile:21:
> > scripts/genksyms/parse.tab.c] Error 127
> > make[1]: *** [scripts/Makefile.build:549: scripts/genksyms] Error 2
> > make[1]: *** Waiting for unfinished jobs....
> > <stdin>:1:10: fatal error: libelf.h: No such file or directory
>
> You also need libelf.
I will install libelf-dev as well thanks.

Greg, now make complains it requires 'flex' ?

aruna at debian:/media/aruna/linux-next/home/linux-5.16.10$ make -j$(nproc)
  DESCEND objtool
  HOSTCC  scripts/genksyms/parse.tab.o
  LEX     scripts/genksyms/lex.lex.c
/bin/sh: 1: flex: not found
make[2]: *** [scripts/Makefile.host:9: scripts/genksyms/lex.lex.c] Error 127
make[2]: *** Waiting for unfinished jobs....
  HOSTCC  scripts/extract-cert
make[1]: *** [scripts/Makefile.build:549: scripts/genksyms] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1181: scripts] Error 2

In the early days we used to sudo apt-get install build-essential and be
done with it.
I guess a lot has changed since then. Maybe someone should update the 'what
tools
do I need' section in https://kernelnewbies.org/KernelBuild ?

Does anyone have a fix for make menuconfig error below please ?
aruna at debian:/media/aruna/linux-next/home/linux-5.16.10$ make menuconfig
  HOSTLD  scripts/kconfig/mconf
/usr/bin/ld: scripts/kconfig/confdata.o: relocation R_X86_64_32 against
`.rodata.str1.1' can not be used when making a PIE object; recompile with
-fPIE

At some point am going to need menuconfig to work again so anyone else ever
had this problem ? If you did 'how' did you resolve ?

Thanks - Aruna

>
> thanks,
>
> greg k-h
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20220224/b68515ec/attachment-0001.html>


More information about the Kernelnewbies mailing list