makelove icon indicating copy to clipboard operation
makelove copied to clipboard

issue with shared_libraries for appimage

Open anchikai opened this issue 2 years ago • 7 comments

My project uses nuklear for handling all of its ui. So I built nuklear from source and I have nuklear.so in the project's root directory, aka ./nuklear.so as well as

[appimage]
shared_libraries = [
    "nuklear.so",
]

inside of makelove.toml.

With all of that said, running the appimage makes love error as it can't find nuklear.so.

anchikai avatar Jan 20 '23 21:01 anchikai

Can you extract the AppImage and check whether the file is there and where it is? Which love version are you building for? From 11.4 the official AppImages are a bit different than the ones I built for earlier versions. Could you share the AppImage so I can have a look myself?

pfirsich avatar Jan 21 '23 04:01 pfirsich

Hey my bad for not getting to you, I am using the latest version of love. When I extracted the AppImage it was called squashfs-root, and the .so is located at squashfs-root/usr/lib/nuklear.so. Also github isn't letting me upload the AppImage through this comment, you have discord?

anchikai avatar Jan 21 '23 17:01 anchikai

oh my bad, I'm actually using 11.3

anchikai avatar Jan 21 '23 17:01 anchikai

Hey, I do have Discord, but I don't want to share my username + id publicly, I think. If you don't mind to share it, please do and I will contact you there. Or join the löve Discord server and ping me from there.

pfirsich avatar Jan 30 '23 19:01 pfirsich

The wrapper script needs to set LUA_PATH and LUA_CPATH environment variable to somewhere relative to the AppImage before launching LOVE https://github.com/pfirsich/love-appimages/blob/b58084eb23f6595617ad9511b5b136a7523e2f4d/build.py#L46-L54.

See https://github.com/love2d/love-appimage-source/blob/55ba1c5d9371dc7879764e9e657f6ca9198551bd/AppRun.c#L201-L214 on how it's done by modifying AppRun.c

MikuAuahDark avatar Jan 31 '23 03:01 MikuAuahDark

I knew I tested this in the past and now I find this again: https://github.com/pfirsich/love-appimages#handling-shared-libraries It seems my plan was to adjust cpath from Lua, if the file is run from an AppImage.

pfirsich avatar Feb 01 '23 09:02 pfirsich

Is that an acceptable solution for you?

pfirsich avatar Feb 27 '23 14:02 pfirsich