Issues about installing from source on WSL(windows subsystem for linux)

thanks very much for developing this applicaiton and sharing it for free. I have been using the software for >4months, and I really enjoyed it a lot. At the same time, I would also like to contribute to project in some way, so I try to install the souce code on my PC, but I run into some issues.

Does anyone by chance know if installing from source codes on WSL works as well?

I am following the tutorial to install the souce code on my WSL, I successfully followed through all the steps before “make build”. But when I run “make build”, it was not successful because of " Installing evdev (1.4.0): Failed".

The error is related with the following issues:

The ‘linux/input.h’ and ‘linux/input-event-codes.h’ include files
are missing. You will have to install the kernel header files in
order to continue:

    yum install kernel-headers-$(uname -r)
    apt-get install linux-headers-$(uname -r)
    emerge sys-kernel/linux-headers
    pacman -S kernel-headers

I tried these commands, but they doesn’t work. So i am curious to know if this is a general issue for all WSL(i.e. dose the installing also works on WSL) or just a issue for myself.

If anyone has installed the souce codes successfuly on WSL, please let me know. Thanks in advance!

Kind Regards,

Yes, basically neither WSL nor WSL2 have the linux header package available. This is discussed in several places on SO.
I’ve seen a possible solution here for WSL2 (archive).
I haven’t tried it though.

1 Like

thank you for the information! I didn’t try the method suggested in the link, but it indeed gave me a clue to find my solution.

I realized I firstly need to build an x86-64 WSL2 kernel by following the instructions from

  1. Install the build dependencies:
    $ sudo apt install build-essential flex bison libssl-dev libelf-dev
  2. Build the kernel using the WSL2 kernel configuration:
    $ make KCONFIG_CONFIG=Microsoft/config-wsl

Once the kernel was build, the installation worked successfully on my WSL2.

1 Like