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
Related
My environment: python3.8, gcc12.2, cmake4.3. I want to compile and install the glibc library. When I finish compiling and installing, my yum has an error
The following is the error content:
CRITICAL:yum.cli:Config error: Error accessing file for config file:///etc/yum.conf
But I obviously have /etc/yum.conf, but I still get an error
I hope to know why and get a solution, thank you
I downloaded and compiled glibc, and the installation was successful, but there was an error message after installation
collect2: error: ld returned 1 exit status
Execution of gcc failed!
The script has found some problems with your installation!
Please read the FAQ and the README file and check the following:
- Did you change the gcc specs file (necessary after upgrading from
Linux libc5)?
- Are there any symbolic links of the form libXXX.so to old libraries?
Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,
libm.so should point to the newly installed glibc file - and there should be
only one such link (check e.g. /lib and /usr/lib)
You should restart this script from your build directory after you've
fixed all problems!
Btw. the script doesn't work if you're installing GNU libc not as your
primary library!
make[1]: *** [Makefile:111: install] Error 1
make[1]: Leaving directory '/opt/glibc-2.29'
make: *** [Makefile:12:install] 错误 2
But I found on the net that this error doesn't affect anything
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.
I'm working with a Linux driver that is building on v5.7.x kernels but not on the latest v5.8.x releases.
To summarise, most of the driver is pre-built and the kernel interface is built on the target. This involves a make -f Kbuild command.
Having checked all of the relevant kernel interface files for any changes that would affect us, normally the driver would just build as usual on a new kernel. However, this time we get the following error:
make[2]: *** [scripts/Makefile.modpost:111: /path/to/source/Module.symvers] Error 1
make[1]: *** [Makefile:1669: modules] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.8.0-1.el8.elrepo.x86_64'
make: *** [Kbuild:26: default] Error 2
This is from CentOS 8.1, but the same error has been seen on Ubuntu 20.04.
I am no expert on this so interpreting these errors is a bit difficult. I have tried building with the KBUILD_VERBOSE flag and it doesn't really provide any useful information, other than the build succeeding until this point.
On previous kernels the Module.symvers file would be created but empty. On 5.8 this file is not created at all presumably due to this error. As a result, the .ko file is not created.
Finally, if we drop in the source files rather than the pre-built .o files the build does succeed. These .o files are built with a very old version of GCC (4.4.7) but we have also tried building with a much newer version (8.3.1), the same version as the target machine.
I would appreciate suggestions for things to check. Let me know if any other details would help.
Edit:
I ran make on Makefile.modpost manually and got the following output:
sudo make -f ./scripts/Makefile.modpost
WARNING: Symbol version dump "vmlinux.symvers" is missing.
Modules may not have dependencies or modversions.
make -f /scripts/Makefile.modfinal
make[1]: Entering directory '/usr/src/linux-headers-5.8.0-050800-generic'
make[1]: /scripts/Makefile.modfinal: No such file or directory
make[1]: *** No rule to make target '/scripts/Makefile.modfinal'. Stop.
make[1]: Leaving directory '/usr/src/linux-headers-5.8.0-050800-generic'
make: *** [scripts/Makefile.modpost:117: __modpost] Error 2
I am answering my own question in case it helps anyone else with this problem. Although it has never been an issue in the past, we've always had a warning that the corresponding .o.cmd file was not present for our .o_shipped files. This appears to be important in kernel 5.8 onwards and my fix was to add a touch command to the Kbuild file (i.e. "touch .driver.o.cmd"). This does not remove the warning but it allows the driver to build as normal.
I am trying to create a custom kernel rpm. So I made use of "make rpm-pkg".
Everything was going fine until it hit this error.
..
..
INSTALL sound/usb/line6/snd-usb-toneport.ko
INSTALL sound/usb/line6/snd-usb-variax.ko
INSTALL sound/usb/misc/snd-ua101.ko
INSTALL sound/usb/snd-usb-audio.ko
INSTALL sound/usb/snd-usbmidi-lib.ko
scripts/Makefile.fwinst:43: *** mixed implicit and static pattern rules. Stop.
make[2]: *** [_modinst_post] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.jJi4sq (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.p88MqU (%install)
make[1]: *** [rpm-pkg] Error 1
make: *** [rpm-pkg] Error 2
I understand there is something wrong with Makefile declarations, but also wondering if anyone has hit this issue.
If you are using make version 3.81 or 3.82 then this is likely the known make "bug" discussed here.
Specifically a change to what make believes is a meaningful set of targets to specify in a single list changed in an incompatible way and the kernel had been using a set of targets that became invalid.
The fix, after some back and forth between the GNU Make maintainer and some concerned other developers, was to convert the fatal error into a warning (at least temporarily).
I was able to fix this. Apparently its an issue with the UTS_MACHINE not being right for arm64. It should be aarch64 so that the packaging scripts use it right. there's also small tweak in the script that generates the rpm spec file.
So 'make' is not an issue in this case.
I am trying to compile linux 3.5.2 kernel. I followed this tutorial
"http://blog.techveda.org/index.php/adding-system-calls-linux-kernel-3-5-x/"
and everything was going perfect.but when I tried to do build the kernel I get this error
here are the commands I used to build my kernel
sudo cp /boot/config-3.5.0-17-generic ./config
make oldconfig
sudo make -j8
the error when I do the make -j8 is:
ERROR: "__modver_version_show" [drivers/staging/rts5139/rts5139.ko] undefined!
WARNING: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
I really can't find what is the problem it looks like I have a problem with a driver but how could this happen and I am using my old configuration file that is already working. ??
I have met the same problem while compiling kernel 3.2, and solve it by "su -" to root and then recompile.
If you do not need this driver simply mod the config fiel like follows:
CONFIG_RTS5139=n