Skip to content

lua5.5 only: python.so: undefined symbol: luaL_openlibs #100

Open
cclauss/lunatic-python
#10

Description

@cclauss

lua5.5 tests/test_py.lua # fails...

The tests pass on lua5.1 and lua5.3 but fail on lua5.5 with:

lua5.5: error loading module 'python' from file './python.so':
	./python.so: undefined symbol: luaL_openlibs

luaL_openlibs(LuaState);

Activity

  1. leso-kn commented on Jun 19, 2026

    @leso-kn
    Collaborator

    Note

    This comment goes for #98 and #99 as well

    Hi :) Thanks for pointing this out!

    The issues you've spotted can be resolved with Lua version specific #ifdefs.

    I can implement that, but would propose to wait until #94 is merged, as this will be a good test for the Github Actions pipeline.

  2. cclauss commented on Jun 19, 2026

    @cclauss
    ContributorAuthor

    I know Python, but I am using this effort to learn a bit of Lua.

    I agree that getting GHA running should happen before the fixes, so we have proof and can detect any future regressions.

  3. leso-kn commented on Jun 19, 2026

    @leso-kn
    Collaborator

    oh, Nice :)

    Lua is fun! The Lua C-API (which is what we primarily work with in lunatic-python) is a bit more complex, but generally Lua does not have a lot of syntax.

    Let's implement the pipeline then and we can continue to these three issues. Should be quick to do!

  4. cclauss commented on Jul 8, 2026

    @cclauss
    ContributorAuthor

    As discussed in

    Important

    ALWAYS add the --lua-version option when running apt-installed luarocks!


    apt-installed luarocks is v3.8.0, not the current >= 3.13. On lua5.5, this causes Error: Unknown entry LUA_INCDIR on:
    % luarocks --local --lua-version=5.5 make

    An incomplete workaround:

          - if: runner.os == 'Linux' && matrix.lua-version == '5.5'  # Workaround for apt installed luarocks v3.8.0
            run: |
              mkdir -p $HOME/.luarocks/lua5.5
              luarocks --lua-version=5.5 config variables.LUA_INCDIR /usr/include/lua5.5
              luarocks --lua-version=5.5 config | grep LUA
              echo "---"
              luarocks --lua-version=5.5 config | grep LUA
    Wrote
    	variables.LUA_INCDIR = "/usr/include/lua5.5"
    to
    	/home/runner/.luarocks/config-5.5.lua
    
  5. cclauss commented on Jul 14, 2026

    @cclauss
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions