jmcnamara / xlsxwriter.lua

A lua module for creating Excel XLSX files.
http://xlsxwriterlua.readthedocs.org/
MIT License
142 stars 52 forks source link

Got build error, when installing it #23

Closed Freakwill closed 5 years ago

Freakwill commented 5 years ago

I want to install lua-xlsxwriter to read/write excel. But I got the following error.

[~] luarocks install xlsxwriter 11:51:37 Installing https://luarocks.org/xlsxwriter-0.0.6-1.src.rock

Error: Build error: Failed installing xlsxwriter/styles.lua in /usr/local/lib/luarocks/rocks-5.3/xlsxwriter/0.0.6-1/lua/xlsxwriter/styles.lua: The source and destination are the same files

or

Error: Build error: Failed installing xlsxwriter/strict.lua in /usr/local/lib/luarocks/rocks-5.3/xlsxwriter/0.0.6-1/lua/xlsxwriter/strict.lua: The source and destination are the same files

I also tried to install it with lua-xlsxwriter

[~] luarocks install lua-xlsxwriter 11:15:56 Installing https://luarocks.org/lua-xlsxwriter-0.0.1-1.src.rock Missing dependencies for lua-xlsxwriter 0.0.1-1: struct (not installed)

lua-xlsxwriter 0.0.1-1 depends on struct (not installed) Installing https://luarocks.org/struct-1.2-2.src.rock

env MACOSX_DEPLOYMENT_TARGET=10.8 gcc -O2 -fPIC -I/usr/local/opt/lua/include/lua5.3 -c struct.c -o struct.o struct.c:181:27: warning: implicit declaration of function 'luaL_putchar' is invalid in C99 [-Wimplicit-function-declaration] while (toalign-- > 0) luaL_putchar(&b, '\0'); ^ struct.c:318:37: error: array has incomplete element type 'const struct luaL_reg' static const struct luaL_reg thislib[] = { ^ struct.c:318:21: note: forward declaration of 'struct luaL_reg' static const struct luaL_reg thislib[] = { ^ struct.c:326:3: warning: implicit declaration of function 'luaL_register' is invalid in C99 [-Wimplicit-function-declaration] luaL_register(L, "struct", thislib); ^ 2 warnings and 1 error generated.

Error: Failed installing dependency: https://luarocks.org/struct-1.2-2.src.rock - Build error: Failed compiling object struct.o

jmcnamara commented 5 years ago

The luarock is broken.

Try one of the other installation methods recommended in the docs: https://xlsxwriterlua.readthedocs.io/getting_started.html