proot-me / proot

chroot, mount --bind, and binfmt_misc without privilege/setup for Linux
https://proot-me.github.io
GNU General Public License v2.0
1.96k stars 369 forks source link

Compile from master fails with missing `linux/ashmem.h` #346

Closed ruanformigoni closed 1 year ago

ruanformigoni commented 1 year ago

Expected Behavior

Compile the program and generate the binary.

Actual Behavior

./extension/ashmem_memfd/ashmem_memfd.c:5:10: fatal error: linux/ashmem.h: No such file or directory
    5 | #include <linux/ashmem.h> /* ASHMEM_GET_SIZE,  */
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
make: *** [GNUmakefile:193: extension/ashmem_memfd/ashmem_memfd.o] Error 1
make: Leaving directory '/home/ruan/Repositories/proot/src'

Steps to Reproduce the Problem

  1. Clone from master
  2. Install dependencies
  3. Compile with README.md instructions
oxr463 commented 1 year ago

Interesting. What distribution version? Kernel version?

ruanformigoni commented 1 year ago

The distribution is arch, with kernel 6.1.10-arch1-1. I also tried it in ubuntu focal and got the same result.

ruanformigoni commented 1 year ago

Just figured it out that the issue was introduced by the latest commit, git reset --hard HEAD^ before compiling fixes it.

ruanformigoni commented 1 year ago

My mistake this was not the solution, I don't know what happened but after a re-clone it now always works.

oxr463 commented 1 year ago

Great! Glad you were able to resolve the issue.