I'm trying to implement a custom system call in Ubuntu 20.04.
One of the steps is this command
root#well:/usr/src/linux-5.16.15# sudo make modules_install install
But it gives this error:
arch/x86/Makefile:142: CONFIG_X86_X32 enabled but no binutils support
ln: target '/source' is not a directory
make[1]: *** [Makefile:1477: __modinst_pre] Error 1
make: *** [Makefile:350: __build_one_by_one] Error 2
What should I do to resolve it?
I've been at this for days and any help would be seriously appreciated!
From the definition of CONFIG_X86_X32 option:
you will need a recent binutils (2.22 or later) with elf32_x86_x64 support enabled to compile a kernel with this option set.
This definition can be found at arch/x86/Kconfig file in kernel source code (https://elixir.bootlin.com/linux/v5.16.15/source/arch/x86/Kconfig#L2836).
So in order to solve this problem, you can either disable this option or select a distro which supports high version binutils to compile the kernel.
Related
I am trying to compile the Linux kernel and I am getting the error
CONFIG_x86_x32 enabled but no binutils support kernel compilation error
I have tried to change to the value of CONFIG_x86_x32 to "n" in the .config and the error persisted. After which I tried to sudo make clean and I got more errors, I hade to delete the entire virtual machine.
Unfortunately, as I have already mentioned I have deleted the files and cannot show the error, what should I have done?
it would be great if someone could help
'EDIT'
Now i have recompiled and this is what I'm getting
arch/x86/Makefile:155: CONFIG_X86_X32 enabled but no binutils support
Makefile:969: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
CHK include/config/kernel.release
CONFIG_CC_STACKPROTECTOR_AUTO: Compiler does not support any known stack-protector
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CC arch/x86/purgatory/purgatory.o
/bin/sh: 1: gcc: not found
make[1]: *** [scripts/Makefile.build:313: arch/x86/purgatory/purgatory.o] Error 127
make: *** [arch/x86/Makefile:263: archprepare] Error 2
now what does it really mean and what am is supposed to do to fix it
Thanks
I’m big enthusiast of Manjaro since 2015 but today I got a problem that I couldn’t resolve on my own. After big updates done few days ago (by update manager) I have a problem with compiling Kernel Drivers on kernel 4.15.18-1. After call make I got error:
make -C /usr/lib/modules/4.15.18-1-MANJARO/build M=/run/media/mati/common/hello_world modules
make[1]: Wejście do katalogu '/usr/lib/modules/4.15.18-1-MANJARO/build'
**Makefile:974: *** "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel". Stop.**
make[1]: Opuszczenie katalogu '/usr/lib/modules/4.15.18-1-MANJARO/build'
make: *** [Makefile:4: all] Błąd 2
The problem is that I cannot install mentioned libraries and command: pacman -Q libelf
returns
libelf 0.170-1
i have no idea what happend, I tried another kernels (I have few versions installed) but each has problems (e.g. the newest, experimental 4.17 has problem with asm goto of gcc compiler). I started learning Linux Kernel Drivers programming but now I can’t learn because of these compilation problems … anyone can help me ?
(Hope my english is understanable).
Greetings !
I got this error while setting up VirtualBox in my Fedora OS 29, I issued the following command and this issue got resolved.
sudo dnf install elfutils-libelf-devel
Are you able to install these packages on your system?
elfutils
elfutils-libelf-devel
libelf-dev
libelf-devel
May require dependencies such as: zlib-devel
For me I had to install elfutils-devel first then install eflutils and eflutils-libelf-devel. libelf-dev and libelf-devel could not be found but when I ran /sbin/vboxconfig again this time it did not error out. I ran the check, "systemctl status vboxdrv" and this time it showed Active: as Active (exited) and I was able to spin up the VM.
I have a problem by compiling a driver (WLAN-dongle Edimax ac600).
I´m using an Archlinux on my raspberry-pi and want to install my dongle for 5Ghz. During comiling the driver I get this message. I tried to install the linux-headers without success. (in other threads it will be a solution)
Here is my output of make:
[root#raspberry_pi_1 rtl8812AU]# make make ARCH=arm CROSS_COMPILE= -C
/lib/modules/4.9.43-1-ARCH/build M=/root/rtl8812AU modules make[1]:
*** /lib/modules/4.9.43-1-ARCH/build: No such file or directory. Stop. make: *** [Makefile:1576: modules] Error 2
I found out that my pi has a two-arch...-directories:
4.9.43-1-ARCH/
4.9.51-1-ARCH/
Only the second one has the build directory...
How can I fix the problem?!
thanks a lot,
a Linux noob...
[Reputation is too low to post comment]
Use uname -r to make sure which version of the kernel you use.
If it's 4.9.43 : you have newer version of the kernel and this confuse your installer. You should reboot on the 51 one
If it's 4.9.51 : You messed up your installation step and are trying to compile for an old target. You should review the compilation process and change every mention of the 4.9.43 to 4.9.51 since it's the version you use.
If you upgrade your kernel, you may have to rebuild the thing again (You may like to have script in the future ;) ) with the new kernel version.
I am encountering a problem while trying to setup a cross-compiler for an old linux kernel.
cp -dpRf package/config/buildroot-config /tmp/buildroot/buildroot-2009.02/project_build_mips/uclibc/buildroot-config
(cd /tmp/buildroot/buildroot-2009.02/toolchain_build_mips/linux-2.6.15; \
/usr/bin/make -j1 ARCH=mips \
HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" \
HOSTCXX="/usr/bin/g++" \
INSTALL_HDR_PATH=/tmp/buildroot/buildroot-2009.02/toolchain_build_mips/linux headers_install; \
)
make[1]: Entering directory `/tmp/buildroot/buildroot-2009.02/toolchain_build_mips/linux-2.6.15'
Makefile:486: .config: No such file or directory
make[1]: *** No rule to make target `headers_install'. Stop.
make[1]: Leaving directory `/tmp/buildroot/buildroot-2009.02/toolchain_build_mips/linux-2.6.15'
make: *** [/tmp/buildroot/buildroot-2009.02/toolchain_build_mips/linux/.configured] Error 2
notice the make[1]: *** No rule to make target 'headers_install'. Stop. line.
I made a search on stackoverflow and came across this thread:
Setup buildroot for old kernels.
The guy faced the same problem as me.
The answer, suggested using an old version of buildroot. Therefore I used buildroot-2009.02 which is the oldest version of buildroot, but still got the same result.
Please don't advise me to upgrade my kernel to a newer version, I must use particularly this version.
I would love to get explanation about what it says and maybe someone could help me fix it.
Thanks in advance.
The error you show doesn't seem to be related to building the kernel, but rather it seems to be during the toolchain (= cross-compiler) build. The toolchain needs to install the kernel headers, which are used by the C library to create system calls. To do this, buildroot uses the 'headers_install' target of the kernel.
Unfortunately, this target was only introduced in Linux 2.6.18. So with your kernel version, you cannot use buildroot to build the cross compiler.
I also don't know how you're supposed to do build a cross-compiler for such an old kernel. You can try to use the original 'crosstool' project (not crosstool-NG, that is also too modern).
I am making an linux system following the procedure in lfs. But while i was following the fifth step(i.e. the one before make) on this page, i get an error at the last.
configure: error: linker with -z relro support required
Now after this if i call make i get an error
make: *** No targets specified and no makefile found. Stop.
I am running this on a ubuntu 12.04 machine.
How to fix this error?
Do the following:-
sudo apt-get install gawk
and then retry. This worked for me.