[Tile-serving] [openstreetmap/osm2pgsql] src/lua-utils.cpp:154:5: error: ‘luaL_traceback’ was not declared in this scope (#1151)

gen2 notifications at github.com
Tue May 5 07:55:24 UTC 2020


> It works on Lua 5.1.4 (LuaJIT 2.1.0-beta3), possibly they have backported some features from 5.2. Can you try with 5.2 or LuaJIT instead?

i tried luajit w/ lua52compat enabled, but since their header files are in /usr/include/luajit-2.0 it still failes. But at least luaL_traceback is supported:

```
# fgrep -rn luaL_traceback /usr/include/luajit-2.0/
/usr/include/luajit-2.0/lauxlib.h:85:LUALIB_API void luaL_traceback (lua_State *L, lua_State *L1, const char *msg,
```


> Seems like we need to add an #ifdef in luaX_pcall and fallback to the old behaviour if Lua is too old.
> 
> http://lua.2524044.n2.nabble.com/Traceback-from-C-td7655196.html has some hints how to implement this feature for 5.1. As this isn't part of our unit tests, I'm very reluctant to implement it here, and would rather disable stack traces for 5.1. Also, our installation instructions assume Lua 5.2 everywhere (or LuaJIT).


What about a checking for sufficient lua version (and throwing an error) before starting the compiler?



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/1151#issuecomment-623911554
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20200505/3d16d041/attachment.htm>


More information about the Tile-serving mailing list