lgi-devs / lgi

Dynamic Lua binding to GObject libraries using GObject-Introspection
MIT License
440 stars 70 forks source link

Can't load in KUbuntu 20.04 installation #244

Closed v1993 closed 4 years ago

v1993 commented 4 years ago

I'm trying to get lgi to work on my new installation (git lgi built with luarocks make. It fails to load module with following message:

error loading module 'lgi.corelgilua51' from file '/home/v/.luarocks/lib/lua/5.3/lgi/corelgilua51.so':
    libffi.so.6: cannot open shared object file: No such file or directory
stack traceback:
    [C]: in ?
    [C]: in function 'require'
    /home/v/.luarocks/share/lua/5.3/lgi/core.lua:14: in main chunk
    [C]: in function 'require'
    /home/v/.luarocks/share/lua/5.3/lgi/init.lua:19: in main chunk
    [C]: in function 'require'
    /home/v/.luarocks/share/lua/5.3/lgi.lua:19: in main chunk
    [C]: in function 'require'
    stdin:1: in main chunk
    [C]: in ?

And it is unsurprising because it is libffi.so.7 now!

psychon commented 4 years ago

Well... but since the .so files depends on libffi.so.6, somehow you managed to compile it against it. Or does luarocks now distribute pre-built binaries?

Anyway, this is fixed by simply recompiling lgi. The linker should do The Right Thing (tm) when it turns its -lffi argument into the name of a shared object.

v1993 commented 4 years ago

I made a fresh build I think? Will try with clean repo this time anyways.

Weird thing is that while luarocks make builds git version actually it still fails. I also have no libffi.so.6 installed.

v1993 commented 4 years ago

Alright, this fixed the problem. Closing issue.

tristanmvh commented 4 years ago

how did you fix the issue?