Skip to content

Lzmq not found by Lua #69

@martindehmel94

Description

@martindehmel94

I have some trouble integrating lzmq into my lua script, which is called by the Lua/C++ API.
I use Lua version 5.4 under Ubuntu 20.04.

This is my Lua Code:

#!/usr/local/bin/lua

local function test()
	local lzmq = require "lzmq"  
end

local ok, err_msg = pcall(test, 42)
if not ok then
    print(err_msg)
end

This prints the following error message:
error loading module 'lzmq' from file '/usr/local/lib/lua/5.4/lzmq.so':
/usr/local/lib/lua/5.4/lzmq.so: undefined symbol: lua_checkstack

lzmq is located under /usr/local/lib/lua/5.4/.

I use the following C++ code to load and execute my Lua file:

#include <iostream>
#include <lua.hpp>

using namespace std;

lua_State* L;

int main()
{
	L = luaL_newstate();
	luaL_openlibs(L);
        luaL_dofile(L, "controller.lua");
        lua_close(L);
        cout << "Error? " << error << endl;
}

What can be the reason for this error?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions