guillaumechereau / goxel

Goxel: Free and Open Source 3D Voxel Editor
GNU General Public License v3.0
2.8k stars 223 forks source link

Unable to compile on Fedora #210

Closed ossimalvin closed 4 years ago

ossimalvin commented 4 years ago

When building using the instructions in the readme, I get these errors: In function ‘createstrobj’, inlined from ‘luaS_createlngstrobj’ at src/../ext_src/lua/lstring.c:148:17, inlined from ‘luaS_newlstr’ at src/../ext_src/lua/lstring.c:206:10, inlined from ‘pushstr’ at src/../ext_src/lua/lobject.c:391:3, inlined from ‘luaO_pushvfstring’ at src/../ext_src/lua/lobject.c:405:5: src/../ext_src/lua/lstring.c:142:17: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 142 | getstr(ts)[l] = '\0'; /* ending 0 */ In file included from src/../ext_src/lua/ldebug.h:11, from src/../ext_src/lua/lundump.c:17, from src/luagoxel.c:30: src/../ext_src/lua/lobject.c: In function ‘luaO_pushvfstring’: src/../ext_src/lua/lstate.h:213:18: note: at offset 0 to object ‘ts’ with size 24 declared here 213 | struct TString ts; | ^~ In file included from src/luagoxel.c:56: In function ‘createstrobj’, inlined from ‘luaS_createlngstrobj’ at src/../ext_src/lua/lstring.c:148:17, inlined from ‘luaS_newlstr’ at src/../ext_src/lua/lstring.c:206:10: src/../ext_src/lua/lstring.c:142:17: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 142 | getstr(ts)[l] = '\0'; /* ending 0 */ In file included from src/../ext_src/lua/ldebug.h:11, from src/../ext_src/lua/lundump.c:17, from src/luagoxel.c:30: src/../ext_src/lua/lstring.c: In function ‘luaS_newlstr’: src/../ext_src/lua/lstate.h:213:18: note: at offset 0 to object ‘ts’ with size 24 declared here 213 | struct TString ts; | ^~ In file included from src/luagoxel.c:56: In function ‘createstrobj’, inlined from ‘luaS_createlngstrobj’ at src/../ext_src/lua/lstring.c:148:17, inlined from ‘luaS_newlstr’ at src/../ext_src/lua/lstring.c:206:10, inlined from ‘luaS_new’ at src/../ext_src/lua/lstring.c:231:10, inlined from ‘luaT_init’ at src/../ext_src/lua/ltm.c:49:23: src/../ext_src/lua/lstring.c:142:17: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 142 | getstr(ts)[l] = '\0'; /* ending 0 */ In file included from src/../ext_src/lua/ldebug.h:11, from src/../ext_src/lua/lundump.c:17, from src/luagoxel.c:30: src/../ext_src/lua/ltm.c: In function ‘luaT_init’: src/../ext_src/lua/lstate.h:213:18: note: at offset 0 to object ‘ts’ with size 24 declared here 213 | struct TString ts; | ^~ In file included from src/luagoxel.c:56: In function ‘createstrobj’, inlined from ‘luaS_createlngstrobj’ at src/../ext_src/lua/lstring.c:148:17, inlined from ‘luaS_newlstr’ at src/../ext_src/lua/lstring.c:206:10, inlined from ‘luaS_new’ at src/../ext_src/lua/lstring.c:231:10, inlined from ‘luaX_init’ at src/../ext_src/lua/llex.c:75:19: src/../ext_src/lua/lstring.c:142:17: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 142 | getstr(ts)[l] = '\0'; /* ending 0 */ In file included from src/../ext_src/lua/ldebug.h:11, from src/../ext_src/lua/lundump.c:17, from src/luagoxel.c:30: src/../ext_src/lua/llex.c: In function ‘luaX_init’: src/../ext_src/lua/lstate.h:213:18: note: at offset 0 to object ‘ts’ with size 24 declared here 213 | struct TString ts; | ^~ In file included from src/luagoxel.c:56: In function ‘createstrobj’, inlined from ‘luaS_createlngstrobj’ at src/../ext_src/lua/lstring.c:148:17, inlined from ‘luaS_newlstr’ at src/../ext_src/lua/lstring.c:206:10, inlined from ‘luaS_new’ at src/../ext_src/lua/lstring.c:231:10, inlined from ‘luaT_init’ at src/../ext_src/lua/ltm.c:49:23, inlined from ‘f_luaopen’ at src/../ext_src/lua/lstate.c:209:3: src/../ext_src/lua/lstring.c:142:17: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 142 | getstr(ts)[l] = '\0'; /* ending 0 */ In file included from src/../ext_src/lua/ldebug.h:11, from src/../ext_src/lua/lundump.c:17, from src/luagoxel.c:30: src/../ext_src/lua/lstate.c: In function ‘f_luaopen’: src/../ext_src/lua/lstate.h:213:18: note: at offset 0 to object ‘ts’ with size 24 declared here 213 | struct TString ts; | ^~ src/luagoxel.c: At top level: cc1: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics cc1: note: unrecognized command-line option ‘-Wno-unknow-pragma’ may have been intended to silence earlier diagnostics

guillaumechereau commented 4 years ago

I removed the lua code totally, so the file ext_src/lua/lstring.c shouldn't be there anymore.

Make sure you are on the last version from github, then do a make clean, and see if it compile better after that.

ossimalvin commented 4 years ago

I had downloaded the source from the latest release tag. I'll try compiling from master tommorow. Thanks