-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux-msft-wsl-5.10.93.2 kernel fails to compile #8045
Comments
@tyhicks - is something missing from the readme? |
I don't think so as I'm having no problems on Ubuntu 20.04 LTS. @johnvranos are you patching the kernel or modifying the config? |
No, I am not modifying the configuration and I do not patch the kernel. I run: tar -xf WSL2-Linux-Kernel-linux-msft-wsl-5.10.93.2.tar.gz and then I run: make KCONFIG_CONFIG=Microsoft/config-wsl Then it asks one question: KCSAN: dynamic data race detector (KCSAN) [N/y/?] (NEW) where I press N Then it continues with the compilation, and after some time the compilation produces the error. |
I am trying to compile in Ubuntu 21.10, NOT in Ubuntu 20.04. Now I am trying to compile the previous version of the kernel, 5.10.81.1. I will let you know if it works. |
Could you run these commands and paste their results?
|
john@DESKTOP-3D1NDUV:/mnt/c/Users/John/Downloads/test$ sha1sum net/netfilter/Makefile |
It is my first time I compiled the Linux kernel, do you know what is the name of the WSL 2 kernel image? I can not find any file named vmlinuz, or bzimage, in the source code directories. Thank you a lot. |
I'm a bit stumped. I don't have any problem building linux-msft-wsl-5.10.93.2, using the same commands that you listed in this issue, inside of a 21.10 LXD container. Everything works fine here. |
You should have a vmlinux file sitting in the top-level source directory. |
I have Ubuntu 21.10 and Ubuntu MATE 21.10 as two virtual machines in Hyper-V, I will try to compile the latest WSL 2 kernel in the first one. |
The official Ubuntu 21.10 desktop release I have in Hyper-V, is of low quality, I get dependency errors when I try to do: sudo apt install build-essential flex bison dwarves libssl-dev libelf-dev I will do more tests tomorrow. |
Well, this is what I did today. My OS is Windows 11 Pro.
https://github.com/nullpo-head/wsl-distrod Distrod downloads and uses Linux distribution containers from linuxcontainers.org.
Manjaro is a rolling-release distribution, is based on Arch Linux, and has the latest available software in all categories. All of the above have the latest updates installed. In all WSL 2 distributions (cases 1. and 2.), I tried to compile WSL 2 kernel versions 5.10.81.1 and 5.10.93.2 (this is the most recent version). In all cases, compilation failed (including Ubuntu-20.04 from Microsoft Store), for both versions of the kernel. In the Manjaro MATE virtual machine (case 3.), I tried compiling the latest version of the kernel (version 5.10.93.2), and it succeeded. Manjaro's success: Ubuntus' failures: I got the new compiled kernel I wanted, from the Manjaro virtual machine. I do not know why the compilation fails in Ubuntu 20.04 and 21.10 WSL 2 instances. |
@johnvranos You are compiling the kernel in a |
You are right! I extracted to ~ (/home/john, in my case), and the compilation completed successfully, both in Ubuntu 21.10 (installed with Distrod), and Ubuntu-20.04 (installed from Microsoft Store). Also the compilation was a lot faster, it took many hours previously. So, I think the solution to this issue, is an additional instruction in the Build Instructions of https://github.com/microsoft/WSL2-Linux-Kernel, something like this:
|
I had the same build error re xt_HL.o target. I noticed the corresponding code file was xt_hl.c. So the default build rule failed. |
Version
Microsoft Windows [Version 10.0.22000.493]
WSL Version
Kernel Version
5.10.60.1-microsoft-standard-WSL2
Distro Version
Ubuntu 21.10, installed in WSL 2, with Distrod (https://github.com/nullpo-head/wsl-distrod).
Other Software
No response
Repro Steps
The steps described in https://github.com/microsoft/WSL2-Linux-Kernel:
Build Instructions
Instructions for building an x86_64 WSL2 kernel with an Ubuntu distribution are as follows:
Install the build dependencies:
$ sudo apt install build-essential flex bison dwarves libssl-dev libelf-dev
Build the kernel using the WSL2 kernel configuration:
$ make KCONFIG_CONFIG=Microsoft/config-wsl
Expected Behavior
The kernel compiles successfully.
Actual Behavior
The kernel fails to compile with error:
make[2]: *** No rule to make target 'net/netfilter/xt_HL.o', needed by 'net/netfilter/built-in.a'. Stop.
make[1]: *** [scripts/Makefile.build:497: net/netfilter] Error 2
make: *** [Makefile:1822: net] Error 2
Diagnostic Logs
The image shows what is the error message.
The text was updated successfully, but these errors were encountered: