I'm trying to install lua-requests with luarocks, it requires xml, that fails to install.
Log says that C++17 can't work with xml, I tried to change it somehow, but I don't know how and where I should do it...
xml 1.1.3-1 depends on lua >= 5.1, < 5.4 (5.1-1 provided by VM)
xml 1.1.3-1 depends on lub >= 1.0.3, < 2 (1.0.7-1 installed)
gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/Parser.cpp -o src/Parser.o -Iinclude -Isrc/bind -Isrc/vendor
In file included from include/xml/Parser.h:33,
from src/Parser.cpp:1:
src/bind/dub/dub.h:298:48: error: ISO C++17 does not allow dynamic exception specifications
298 | lua_Number checknumber(lua_State *L, int narg) throw(dub::TypeException);
| ^~~~~
src/bind/dub/dub.h:299:50: error: ISO C++17 does not allow dynamic exception specifications
299 | lua_Integer checkinteger(lua_State *L, int narg) throw(dub::TypeException);
| ^~~~~
src/bind/dub/dub.h:300:63: error: ISO C++17 does not allow dynamic exception specifications
300 | const char *checklstring(lua_State *L, int narg, size_t *len) throw(dub::TypeException);
| ^~~~~
src/bind/dub/dub.h:301:82: error: ISO C++17 does not allow dynamic exception specifications
301 | void **checkudata(lua_State *L, int ud, const char *tname, bool keep_mt = false) throw(dub::Exception);
| ^~~~~
src/bind/dub/dub.h:304:82: error: ISO C++17 does not allow dynamic exception specifications
304 | void **checksdata(lua_State *L, int ud, const char *tname, bool keep_mt = false) throw(dub::Exception);
| ^~~~~
src/bind/dub/dub.h:307:62: error: ISO C++17 does not allow dynamic exception specifications
307 | void **checksdata_d(lua_State *L, int ud, const char *tname) throw(dub::Exception);
| ^~~~~
src/bind/dub/dub.h:317:56: error: ISO C++17 does not allow dynamic exception specifications
317 | inline const char *checkstring(lua_State *L, int narg) throw(dub::TypeException) {
| ^~~~~
You should modify the error part(remove the throw) code, and use luarocks to make it.
example for modified error part.
should be modified like this.
Here is my solution on Amazon Linux 2023.
and xml will be installed