Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error from luarocks #56

Open
ryanford opened this issue Jan 18, 2018 · 1 comment
Open

Build error from luarocks #56

ryanford opened this issue Jan 18, 2018 · 1 comment

Comments

@ryanford
Copy link

Installing https://luarocks.org/alien-0.7.1-2.src.rock
./bootstrap && ./configure LUA=/usr/local/openresty/luajit//bin/luajit CPPFLAGS='-I/usr/local/openresty/luajit/include/luajit-2.1 -I/usr/include' LDFLAGS=-L/usr/lib/x86_64-linux-gnu --prefix=/home/ryan/.luarocks/lib/luarocks/rocks/alien/0.7.1-2 --libdir=/home/ryan/.luarocks/lib/luarocks/rocks/alien/0.7.1-2/lib --datadir=/home/ryan/.luarocks/lib/luarocks/rocks/alien/0.7.1-2/lua && make clean && make
bootstrap: running: libtoolize --quiet
bootstrap: running: autoreconf --symlink --install
configure.ac:11: installing 'build-aux/ar-lib'
configure.ac:11: installing 'build-aux/compile'
configure.ac:18: installing 'build-aux/config.guess'
configure.ac:18: installing 'build-aux/config.sub'
configure.ac:6: installing 'build-aux/install-sh'
configure.ac:6: installing 'build-aux/missing'
Makefile.am: installing 'build-aux/depcomp'
bootstrap: Done.  Now you can run './configure'.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ANSI C header files... (cached) yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking ffi.h usability... yes
checking ffi.h presence... yes
checking for ffi.h... yes
checking for ffi_closure_alloc in -lffi... yes
checking for stdint.h... (cached) yes
checking if /usr/local/openresty/luajit//bin/luajit is a Lua interpreter... yes
checking whether /usr/local/openresty/luajit//bin/luajit version >= 5.1, < 5.4... yes
checking for /usr/local/openresty/luajit//bin/luajit version... 5.1
checking for /usr/local/openresty/luajit//bin/luajit platform... unknown
checking for /usr/local/openresty/luajit//bin/luajit script directory... ${prefix}/share/lua/5.1
checking for /usr/local/openresty/luajit//bin/luajit module directory... ${exec_prefix}/lib/lua/5.1
checking if LUA_VERSION is defined... yes
checking lua.h usability... yes
checking lua.h presence... yes
checking for lua.h... yes
checking lualib.h usability... yes
checking lualib.h presence... yes
checking for lualib.h... yes
checking lauxlib.h usability... yes
checking lauxlib.h presence... yes
checking for lauxlib.h... yes
checking luaconf.h usability... yes
checking luaconf.h presence... yes
checking for luaconf.h... yes
checking for Lua header version... 5.1
checking if Lua header version matches 5.1... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating alien-0.7.1-1.rockspec
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
test -z "tests/libalientest.la" || rm -f tests/libalientest.la
rm -f tests/so_locations
test -z "src/alien_c.la" || rm -f src/alien_c.la
rm -f src/so_locations
rm -rf .libs _libs
rm -rf src/.libs src/_libs
rm -rf tests/.libs tests/_libs
rm -f *.o
rm -f src/*.o
rm -f src/*.lo
rm -f tests/*.o
rm -f tests/*.lo
rm -f *.lo
make  all-am
make[1]: Entering directory '/tmp/luarocks_alien-0.7.1-2-WRCouJ/alien'
  CC       src/alien.lo
src/alien.c:93:14: error: static declaration of ‘luaL_testudata’ follows non-static declaration
 static void *luaL_testudata(lua_State *L, int ud, const char *tname) {
              ^
In file included from src/alien.c:67:0:
/usr/local/openresty/luajit/include/luajit-2.1/lauxlib.h:91:19: note: previous declaration of ‘luaL_testudata’ was here
 LUALIB_API void *(luaL_testudata) (lua_State *L, int ud, const char *tname);
                   ^
Makefile:597: recipe for target 'src/alien.lo' failed
make[1]: *** [src/alien.lo] Error 1
make[1]: Leaving directory '/tmp/luarocks_alien-0.7.1-2-WRCouJ/alien'
Makefile:411: recipe for target 'all' failed
make: *** [all] Error 2

Error: Build error: Failed building.
@robertlzj
Copy link

similar error on make stage
Windows 10, lua5.3 x32, MinGW32 / MSYS2

# make
C:/ProgramFiles/msys64/mingw32/bin/make  all-am
make[1]: Entering directory 'H:/TDDOWNLOAD/alien/alien-0.7.1'
  CC       src/alien.lo
src/alien.c:108: warning: "alloca" redefined
 # define alloca __builtin_alloca

In file included from C:/ProgramFiles/msys64/mingw32/i686-w64-mingw32/include/stdlib.h:741,
                 from C:/ProgramFiles/msys64/mingw32/i686-w64-mingw32/include/combaseapi.h:129,
                 from C:/ProgramFiles/msys64/mingw32/i686-w64-mingw32/include/objbase.h:14,
                 from C:/ProgramFiles/msys64/mingw32/i686-w64-mingw32/include/ole2.h:17,
                 from C:/ProgramFiles/msys64/mingw32/i686-w64-mingw32/include/wtypes.h:12,
                 from C:/ProgramFiles/msys64/mingw32/i686-w64-mingw32/include/winscard.h:10,
                 from C:/ProgramFiles/msys64/mingw32/i686-w64-mingw32/include/windows.h:97,
                 from src/alien.c:15:
C:/ProgramFiles/msys64/mingw32/i686-w64-mingw32/include/malloc.h:183: note: this is the location of the previous definition
 #define alloca(x) __builtin_alloca((x))

src/alien.c:357:54: error: 'FFI_SYSV' undeclared here (not in a function); did you mean 'FFI_OK'?
 static const ffi_abi ffi_abis[] = { FFI_DEFAULT_ABI, FFI_SYSV, FFI_STDCALL };
                                                      ^~~~~~~~
                                                      FFI_OK
src/alien.c:357:64: error: 'FFI_STDCALL' undeclared here (not in a function); did you mean 'CC_STDCALL'?
 static const ffi_abi ffi_abis[] = { FFI_DEFAULT_ABI, FFI_SYSV, FFI_STDCALL };
                                                                ^~~~~~~~~~~
                                                                CC_STDCALL
src/alien.c: In function 'alien_function_types':
src/alien.c:656:5: warning: 'ffi_prep_closure' is deprecated: use ffi_prep_closure_loc instead [-Wdeprecated-declarations]
     status = ffi_prep_closure(af->fn, &(af->cif), &alien_callback_call, af);
     ^~~~~~
In file included from src/alien.c:29:
C:/ProgramFiles/msys64/mingw64/include/ffi.h:334:1: note: declared here
 ffi_prep_closure (ffi_closure*,
 ^~~~~~~~~~~~~~~~
make[1]: *** [Makefile:607: src/alien.lo] Error 1
make[1]: Leaving directory 'H:/TDDOWNLOAD/alien/alien-0.7.1'
make: *** [Makefile:414: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants