Error: Could not mmap file: vmlinux
kernel, linux, mmap
Solution
I had the same issue when compiling kernel in virtual box shared folder. Error comes from `mmap_file()` function in source file `scripts/sortextable.c`. Moreover, all mmap functions failed with errno EINVAL within shared folder.
I fixed it with copying linux sources into non shared folder like /home/Name/linux and compiled there.
Problem
In a newly installed virtual machine I get this error when compiling the kernel for the x86 architecture: ``` $ Could not mmap file: vmlinux $ make: *** [vmlinux] Error 1 ``` It is the first time I see it. I have increased the size of `/proc/sys/kernel/shmmax` to 128MB, but it does not solve the issue. Any ideas? Thanks! :)