luainkernel / lunatik

Lunatik is a framework for scripting the Linux kernel with Lua.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

failed to compile on debian bookworm kernel 6.1 on a RPi

endersonmaia opened this issue · comments

When I do:

git clone https://github.com/luainkernel/lunatik.git
git submodule update --init --recursive
make

I get

make -C /lib/modules/6.1.0-rpi7-rpi-2712/build M=/home/endersonmaia/lunatik CONFIG_LUNATIK=m	\
CONFIG_LUNATIK_RUN=m CONFIG_LUNATIK_RUNTIME=y CONFIG_LUNATIK_DEVICE=m	\
CONFIG_LUNATIK_LINUX=m CONFIG_LUNATIK_NOTIFIER=m CONFIG_LUNATIK_SOCKET=m \
CONFIG_LUNATIK_RCU=m CONFIG_LUNATIK_THREAD=m CONFIG_LUNATIK_FIB=m \
CONFIG_LUNATIK_DATA=m CONFIG_LUNATIK_PROBE=m CONFIG_LUNATIK_SYSCALL=m
make[1]: Entering directory '/usr/src/linux-headers-6.1.0-rpi7-rpi-2712'
  CC [M]  /home/endersonmaia/lunatik/lua/lapi.o
during GIMPLE pass: *build_cgraph_edges
/home/endersonmaia/lunatik/lua/lapi.c: In function 'lua_checkstack':
/home/endersonmaia/lunatik/lua/lapi.c:111:13: internal compiler error: Illegal instruction
  111 | LUA_API int lua_checkstack (lua_State *L, int n) {
      |             ^~~~~~~~~~~~~~
0x7fff1085777f __libc_start_call_main
	../sysdeps/nptl/libc_start_call_main.h:58
0x7fff10857857 __libc_start_main_impl
	../csu/libc-start.c:360
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.
make[2]: *** [/usr/src/linux-headers-6.1.0-rpi7-common-rpi/scripts/Makefile.build:255: /home/endersonmaia/lunatik/lua/lapi.o] Error 1
make[1]: *** [/usr/src/linux-headers-6.1.0-rpi7-common-rpi/Makefile:2039: /home/endersonmaia/lunatik] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.1.0-rpi7-rpi-2712'
make: *** [Makefile:7: all] Error 2

My environment:

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
$ uname -a
Linux turdusmerula 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
$ gcc --version
gcc (Debian 12.2.0-14) 12.2.0

It's something in my environment, I can't even compile a simple hello world.

$ cat hello.c 
#include <stdio.h>
int main() {
   // printf() displays the string inside quotation
   printf("Hello, World!");
   return 0;
}

 $ gcc hello.c 
during GIMPLE pass: *build_cgraph_edges
hello.c: In function 'main':
hello.c:2:5: internal compiler error: Illegal instruction
    2 | int main() {
      |     ^~~~
0x7fff5f49777f __libc_start_call_main
	../sysdeps/nptl/libc_start_call_main.h:58
0x7fff5f497857 __libc_start_main_impl
	../csu/libc-start.c:360
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.

It's something in my environment, I can't even compile a simple hello world.

$ cat hello.c 
#include <stdio.h>
int main() {
   // printf() displays the string inside quotation
   printf("Hello, World!");
   return 0;
}

 $ gcc hello.c 
during GIMPLE pass: *build_cgraph_edges
hello.c: In function 'main':
hello.c:2:5: internal compiler error: Illegal instruction
    2 | int main() {
      |     ^~~~
0x7fff5f49777f __libc_start_call_main
	../sysdeps/nptl/libc_start_call_main.h:58
0x7fff5f497857 __libc_start_main_impl
	../csu/libc-start.c:360
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-12/README.Bugs> for instructions.