Skip to content

devops problems

lua5.2 ambiguous overload

error
1
2
3
/backend-build/osrm-backend/third_party/sol2/sol2/sol.hpp:6909:40: error: call of overloaded 'push<const char32_t*>(lua_State*&, const char32_t [2], const char32_t*)' is ambiguous
6909 |     return stack.. code-block::push<const char32_t*>(L, str, str + sz);
    |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~

This problem occurs when using gcc10 to compile osrm-backend. For now the easiest way to prevent this is reverting back to gcc9. Also version 5.2 of lua should be used. To do that the only way i found is to remove the other version(s)

lua
apt-get remove liblua5.3-dev
apt-get install liblua5.2-dev

Note that also alpine:3.13 has shifted to gcc10, which is where this error comes from.

To stay out of trouble :

  • use gcc9 on development
  • use alpine:3.12 as base image for backend-build

better solution

Try to get osrm-backend to compile with gcc10, this means changing sol2 because it seems there is where the error occurs.

solution
cd projects/klopt/backend-build/osrm-backend/third_party/sol2

There is a sol3 available : https://github.com/ThePhD/sol2 It is called sol3 but also sol2 V3.0.