mac-linux-kdk icon indicating copy to clipboard operation
mac-linux-kdk copied to clipboard

linux/version.h not found

Open hailmikhail opened this issue 1 year ago • 1 comments

See below for error condition.

Instead of shipping some linux headers within this repo, should the script ask for the linux header path? help a user download linux headers?

Enhancement example:

if ! [ -f "$MAC_LINUX_KDK_PATH"/env/include/version.h ] && ! [ -f "$MAC_LINUX_KDK_HEADERS"/linux/version.h ]
then
  echo "Error. Cannot find <linux/version.h>.

Please specify a path to linux headers in MAC_LINUX_KDK_HEADERS env. variable.

Warning. /usr/local/include may host conflicting headers.

Example. If version.h is at /usr/local/include/linux_headers/linux/version.h, do ...

    MAC_LINUX_KDK_HEADERS=/usr/local/include/linux_headers lkmake
"
  exit 1
fi

Failure condition:

$ git clone --single-branch --branch rpi-6.1.y --depth 1 https://github.com/sunfounder/linux.git
$ lkmake KERNEL=kernel8 ARCH=arm64 bcm2711_defconfig
$ lkmake KERNEL=kernel8 ARCH=arm64 -j20 Image.gz modules dtbs

...

  HOSTCC  drivers/accessibility/speakup/makemapdata.o
drivers/accessibility/speakup/makemapdata.c:13:10: fatal error: 'linux/version.h' file not found
#include <linux/version.h>
         ^~~~~~~~~~~~~~~~~
1 error generated.
make[4]: *** [scripts/Makefile.host:128: drivers/accessibility/speakup/makemapdata.o] Error 1
make[3]: *** [scripts/Makefile.build:500: drivers/accessibility/speakup] Error 2
make[2]: *** [scripts/Makefile.build:500: drivers/accessibility] Error 2

hailmikhail avatar Mar 27 '24 15:03 hailmikhail

Disabling speakup is sadly the only way to fix this currently, some of the host tools don't support non Linux-hosts. Including Linux headers may not work since those headers will likely not work properly from Darwin hosts.

azenla avatar Apr 04 '24 04:04 azenla