myuser@myuser-HP-EliteBook-8470p:~/dev/gcclua/gcc-lua> make
make[1]: Entering directory '/home/myuser/dev/gcclua/gcc-lua/gcc'
gcc -c -o gcclua.o -I/usr/lib64/gcc/x86_64-suse-linux/11/plugin/include -fPIC -xc++ -O2 -Wall -Wformat-security -I/usr/include/lua5.3 gcclua.c
gcclua.c:62:12: error: ‘namespace_binding’ was not declared in this scope; did you mean ‘namespace_bindings_p’?
62 | __typeof__(namespace_binding) namespace_binding __attribute__((weak));
| ^~~~~~~~~~~~~~~~~
| namespace_bindings_p
gcclua.c: In function ‘int gcclua_tree_get_decl_source_location(lua_State*)’:
gcclua.c:417:7: error: ‘DECL_IS_BUILTIN’ was not declared in this scope; did you mean ‘DEF_LIB_BUILTIN’?
417 | if (DECL_IS_BUILTIN(*t)) {
| ^~~~~~~~~~~~~~~
| DEF_LIB_BUILTIN
gcclua.c: In function ‘int gcclua_tree_get_type_anonymous(lua_State*)’:
gcclua.c:636:22: error: ‘TYPE_ANONYMOUS_P’ was not declared in this scope; did you mean ‘TYPE_ANON_P’?
636 | lua_pushboolean(L, TYPE_ANONYMOUS_P(*t));
| ^~~~~~~~~~~~~~~~
| TYPE_ANON_P
gcclua.c: In function ‘int gcclua_tree_get_type_vector_subparts(lua_State*)’:
gcclua.c:883:41: error: cannot convert ‘poly_uint64’ {aka ‘poly_int<1, long unsigned int>’} to ‘lua_Number’ {aka ‘double’}
883 | lua_pushnumber(L, TYPE_VECTOR_SUBPARTS(*t));
| ~~~~~~~~~~~~~~~~~~~~^~~~
| |
| poly_uint64 {aka poly_int<1, long unsigned int>}
In file included from gcclua.c:33:
/usr/include/lua5.3/lua.h:224:64: note: initializing argument 2 of ‘void lua_pushnumber(lua_State*, lua_Number)’
224 | LUA_API void (lua_pushnumber) (lua_State *L, lua_Number n);
| ~~~~~~~~~~~^
make[1]: *** [Makefile:29: gcclua.o] Error 1
make[1]: Leaving directory '/home/myuser/dev/gcclua/gcc-lua/gcc'
make: *** [Makefile:38: gcc] Error 2
Compiling gcc-lua in this repository works, but not from the official site. Why? When I make the clone from https://peter.colberg.org/gcc-lua/install I get:
But when I follow the instructions in:
https://github.com/edubart/nelua-decl#how-to-generate-bindings
then everything works.