Unable to load Lua modules from last OSRM builds

Author: frodrigoCreated Aug 18, 2026Updated Aug 29, 2026
LabelsBug Report

I am on the process of migration of my own setup from version 6.0.0 to new build and dependencies (vcpkg), using master branch. I use advanced processing in Lua profiles.

I try to building OSRM with Docker but using “forky” debian:forky-slim to use Debian system package not available in stable. The build it self is fine.

But when I wan to load Lua modules from Debian packages (in my case lua-redis and lua-dbi-duckdb) I am facing two issues.

  1. The OSM embed Lua engine do not expose Lua symbols, and the Lua module are not able to use standard Lua function. I am able to get it works by adding -DCMAKE_EXE_LINKER_FLAGS="-rdynamic" to cmake (no sure if it is the right way to fix this it.)

  2. The Lua path for resolving Lua module does not include system default location, and fails to load modules installed from Debian system package from /usr/share/lua/ ( https://packages.debian.org/forky/all/lua-redis/filelist , note is only 5.3 available but it to works fine with Lua 5.5 and https://packages.debian.org/forky/amd64/lua-dbi-duckdb/filelist )

I can achieve a workaround with

dockerfile
RUN apt update && \
    apt install -y --no-install-recommends \
        duckdb \
        lua-dbi-duckdb \
        lua-redis && \
    duckdb -c "INSTALL spatial"
ENV LUA_PATH="/usr/share/lua/5.5/?.lua;/usr/share/lua/5.3/?.lua"
ENV LUA_CPATH="/usr/lib/x86_64-linux-gnu/lua/5.5/?.so"

Source: Project-OSRM/osrm-backend