-
-
Notifications
You must be signed in to change notification settings - Fork 0
Crash on recent GLib/libffi versions #5
Comments
I think the problem here is that some recent distributives (like Ubnuntu 20.10 and seemingly Manjaro, but not Ubuntu 20.04, where package is built) ship with libffi.so.7, the newer version of shared library. I don't yet have a proper solution to this problem (other than potentially dropping Ubuntu 20.04 LTS support). A workaround would be to build |
I did install the lgi module via install-luadeps.sh, which does mention building lgi from git wouldn't that work? I did install lgi from luarocks earlier so I don't know if that impacted the run.
Would it be theoretically possible to make a appimage release or flatpak build? |
I suspect you haven't defined If you want to install
export DEPSDIR=/path/to/linuxmotehook/deps # Insert correct path here
git clone https://github.com/pavouk/lgi.git
cd lgi
luarocks make --tree "$DEPSDIR" lgi-*.rockspec (use ``` to create code blocks like that) I'm not sure about flatpak (probably would be doable but rather tricky), but appimage wouldn't work well, since my program is in Lua and consists of multiple files. It also have two user-end programs (autocalibrator and main script). Generally, AppImage isn't a very good option for terminal programs anyways. P.S.: just curious, what error did running main program produced? Something complicated about missing symbols? |
that was the symlink error |
Hi @Rihcus , @v1993 , I'm on Archlinux, and while trying to setup linuxmotehook, I came across exactly the same error when trying to run main.lua:
Any idea to get me started with debugging this? |
@gnulabis This is caused by library version mismatch. You must not softlink libffi, build lgi module yourself instead. |
Thanks @v1993 , for the quick reply. However, in my case, I never softlinked libffi. It was not necessary because nothing was complaining about libffi6.
And I installed the lgi module from luarocks, which seems to build the module in the process:
Furthermore, I downloaded myself the lgi sources and tried a few of the examples in the samples directory, they all seem to work fine. As a last note, the actual behavior is that when I run main.lua, it starts ok, I get the message that the WiiMote is registered and it crashes only when I start CEMU, or if I run PadTest and click on "start" button. |
@gnulabis That's weird, to say the least. Have you tried removing lgi version that ships with linuxmotehook? |
@gnulabis I'm afraid you'll have to dig into lgi source code to debug this further. One last thing to try first: install lgi from git repository instead of luarocks, see CI scripts on how to do this. It may be fixed in git but not in release. EDIT: here's how to install: git clone https://github.com/pavouk/lgi.git
cd lgi
make rock
luarocks make lgi-*.rockspec |
lgi from the git repo did not help, the error is the same. I started looking at the sources, here's what I've found so far: The error is coming from And the assert is failing there because the This function, So, it seems that at some point we are passing an array from Lua to C that is not of fixed size, and lgi does not like that. @v1993 , do you have any idea/suspicion as to why suddenly in my installation (and @Rihcus ) we are passing a non-fixed length array while in yours it clearly does not happen (otherwise the lgi code would have asserted)? edit: or, perhaps you can help me figure out how to find out what it is exactly this array that we are allocating space for? Is there a way to see some more info about the Lua object (such as name, contents) by modifying the lgi sources? My Lua and gobject knowledge is extremely limited to figure this out on my own. |
@gnulabis I'm also mostly clueless here. I suspect something have changed in libffi or other external library, but not sure what exactly have happened. I'll try reproducing this locally (previous times I didn't actually tried using connecting to linuxmotehook, not reaching the crash). |
Please continue discussion of relevant crash in lgi-devs/lgi#265. I'll leave this issue open until it's fixed and build with fix is released. |
Many thanks! |
Hello, is there any way to circumvent this bug? For example by installing a previous version of libffi? Thank you. |
@cipitaua I simply don't know. In theory, it may work if you'll use "bundled" package from this repository and get yourself libffi6, but I can't promise anything. |
For anyone who comes across this issue: I'm currently looking into rewriting linuxmotehook in another language, which will allow to get rid of this issue (and hopefully simplify further development and distribution too). You also can try out https://github.com/joaorb64/xwiimote-cemuhook, which tries to be a bit more invasive than linuxmotehook, but also includes its functions. |
Please see linuxmotehook2 for successor to this project. |
Dependency issues with linuxwiimote on manjaro
Installed Dependencies:
I am not sure where libffi.so.6 is supposed to come from
The text was updated successfully, but these errors were encountered: