android-rpi / device_arpi_rpi4

Device build-config for Raspberry Pi 4
216 stars 87 forks source link

Android 12 Build kernel fatal error: 'sys/types.h' file not found ??? #96

Open Sera5 opened 2 years ago

Sera5 commented 2 years ago

#

sera@sera-System-Product-Name:~/holo_kernel$ find /usr/include -name types.h /usr/include/rpc/types.h /usr/include/x86_64-linux-gnu/asm/types.h /usr/include/x86_64-linux-gnu/bits/types.h /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/linux/iio/types.h /usr/include/linux/types.h /usr/include/linux/sched/types.h /usr/include/asm-generic/types.h /usr/include/sys/types.h

ElectroBoy404NotFound commented 2 years ago

it is working for me, try to reclone/redownload the repo

EinarArnason commented 2 years ago

I have this problem as well out of the box. Also when I try to build rpi aosp out of the box I get the error below. Seems something has changed in environment in newer distros.

`../src/gallium/auxiliary/hud/hud_sensors_temp.c:47:10: fatal error: 'sensors/sensors.h' file not found

include <sensors/sensors.h>

     ^~~~~~~~~~~~~~~~~~~`
ElectroBoy404NotFound commented 2 years ago

I have this problem as well out of the box. Also when I try to build rpi aosp out of the box I get the error below. Seems something has changed in environment in newer distros.

../src/gallium/auxiliary/hud/hud_sensors_temp.c:47:10: fatal error: 'sensors/sensors.h' file not found #include <sensors/sensors.h> ^~~~~~~~~~~~~~~~~~~

I guess something is wrong with your build environment, i think i was able to build this as i already had a build system setup that was working

EinarArnason commented 2 years ago

I'm curious to know what it might be. Vanilla aosp builds successfully and these header files exist. So this is something specific.

EinarArnason commented 2 years ago

I have lmsensors installed and explicitly disabling lmsensors in meson build in the mesa3d project solved that issue. About the kernel project, I setup common kernel source first and added rpi specific projects as local manifests and the build completes.

MaJiu commented 2 years ago
  • set +x
  • cd common
  • make LLVM=1 LLVM_IAS=1 DEPMOD=depmod DTC=dtc O=/home/sera/holo_kernel/out/arpi-5.10/common arpi_defconfig make[1]: Verzeichnis „/home/sera/holo_kernel/out/arpi-5.10/common“ wird betreten GEN Makefile HOSTCC scripts/basic/fixdep /home/sera/holo_kernel/common/scripts/basic/fixdep.c:92:10: fatal error: 'sys/types.h' file not found

    include <sys/types.h>

    ^~~~~ 1 error generated. make[2]: [scripts/Makefile.host:95: scripts/basic/fixdep] Fehler 1 make[1]: [/home/sera/holo_kernel/common/Makefile:550: scripts_basic] Fehler 2 make[1]: Verzeichnis „/home/sera/holo_kernel/out/arpi-5.10/common“ wird verlassen make: *** [Makefile:185: __sub-make] Error 2

sera@sera-System-Product-Name:~/holo_kernel$ find /usr/include -name types.h /usr/include/rpc/types.h /usr/include/x86_64-linux-gnu/asm/types.h /usr/include/x86_64-linux-gnu/bits/types.h /usr/include/x86_64-linux-gnu/sys/types.h /usr/include/linux/iio/types.h /usr/include/linux/types.h /usr/include/linux/sched/types.h /usr/include/asm-generic/types.h /usr/include/sys/types.h

Hi, Sera5. Did you solve this problem? I had the same problem as you, but I solved it now. You can try my kernel manifest(https://github.com/MaJiu/kernel_manifest), I made some changes. (ref : https://android.googlesource.com/kernel/manifest/+/1780a51cda4a6819a558d047b903476c8bd977b5, https://android.googlesource.com/kernel/manifest/+/b25f5e4631790b1c3cdc1b1ee2e23f519eabe37e).

I guess it's because the branch has changed.

fix superproject definition: include revision

repo changed the default handling for superproject. It no longer considers the containing branch name, but rather the default revision. Mitigate that by explicitly setting the revision in the superproject tag.