Closed thomasfinstad closed 4 years ago
I don't use snap, but have you tried installing libuiohook into the same folder you put input overlay in?
Welp just get back to me once you've tried it
I tried that, didnt have any effect for me. I entered the snap env to check for library paths
snap run --shell obs-studio
env | grep -i lib
and tried to place it there /var/lib/snapd/lib/gl
no go.
Just in case I also placed it and tried with the same error in the log in all of these places:
~/snap/obs-studio/current/.config/obs-studio/plugins/input-overlay
~/snap/obs-studio/current/.config/obs-studio/plugins/input-overlay/bin
~/snap/obs-studio/current/.config/obs-studio/plugins/input-overlay/bin/64bit
~/snap/obs-studio/current/.config/obs-studio/plugins
~/snap/obs-studio/current/.config/obs-studio/plugins/input-overlay/data
~/snap/obs-studio/current/.config/obs-studio/plugins/input-overlay/data/locale
~/snap/obs-studio/current/.config/obs-studio/plugins/input-overlay/presets
To test with the snap you just need snapd. The config, package info, and files will not mix with your current setup by design of snap, so you should be able to have a plain setup within less than 5 min to test any thing you think might help load the file, but a setting with a path directly to the library as a fallback if all else fails would probably be the most likely to succeed if you are able to make that happen.
Do any other plugins work, because I'm starting to have the feeling that the snap version doesn't support any
I have not tried any, but might be able to do so later today or tomorrow, but if they need library files and dont load them locally or in preconfigured places I would say no. Will update the issue within 48 hours.
Same issue with https://obsproject.com/forum/resources/spectralizer.861/ Are you able to try to load the lib from a spessified directory? If not I dont think there is much we can do at the moment.
I will also see if the obs-studio snap guys are willing to add any workaround aswell.
Nah obs loads the plugins and just looks for the required libraries. What's the output of $ ldd input-overlay
and $ readelf -d input-overlay
If you put uiohook.so in the same directory as the plugin?
While in normal space:
~/snap/obs-studio/current/.config/obs-studio/plugins/input-overlay/bin/64bit$ ldd input-overlay.so
./input-overlay.so: error while loading shared libraries: libuiohook.so.0: invalid ELF header
~/snap/obs-studio/current/.config/obs-studio/plugins/input-overlay/bin/64bit$ readelf -d input-overlay.so
Dynamic section at offset 0x25cc8 contains 31 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libobs.so.0]
0x0000000000000001 (NEEDED) Shared library: [libuiohook.so.0]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000f (RPATH) Library rpath: [/home/usr/git/obs-studio/qtc-release/libobs:]
0x000000000000000c (INIT) 0x8000
0x000000000000000d (FINI) 0x1e93c
0x0000000000000019 (INIT_ARRAY) 0x26cb0
0x000000000000001b (INIT_ARRAYSZ) 16 (bytes)
0x000000000000001a (FINI_ARRAY) 0x26cc0
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
0x000000006ffffef5 (GNU_HASH) 0x260
0x0000000000000005 (STRTAB) 0x2750
0x0000000000000006 (SYMTAB) 0x7d0
0x000000000000000a (STRSZ) 13717 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000003 (PLTGOT) 0x27000
0x0000000000000002 (PLTRELSZ) 6000 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x6468
0x0000000000000007 (RELA) 0x60a8
0x0000000000000008 (RELASZ) 960 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffe (VERNEED) 0x5f88
0x000000006fffffff (VERNEEDNUM) 5
0x000000006ffffff0 (VERSYM) 0x5ce6
0x000000006ffffff9 (RELACOUNT) 4
0x0000000000000000 (NULL) 0x0
While in the snap confinement:
$ ldd input-overlay.so
./input-overlay.so: error while loading shared libraries: libuiohook.so.0: invalid ELF header
$ readelf -d input-overlay.so
bash: readelf: command not found
That is probably because the snap does not contain the binary for readelf and isnt allowed outside the snap filesystem.
well that doesn't help much, but
0x000000000000000f (RPATH) Library rpath: [/home/usr/git/obs-studio/qtc-release/libobs:]
this part is a bit strange. That is my build directory idk how that ended up in there
I just tried installing the snap version and it crashes immediately, so I can't really try it myself One thing you can try is my plugin dvd screensaver it only depends on things obs-studio depends on, so if that one works we'll at least now that additional dependencies are the problem. Edit: I asked on the obs discord and Matt said that the plugins go somewhere in the ~/.local folder maybe you can dig around and see if there's anything related to obs
The dvd screensaver plugin works just fine, no errors, and I can add it as a source, and it works as if it was an old dvd player, pretty cool btw, I will keep it.
Maybe you could hack around it by manipulating the RPATH, https://en.wikipedia.org/wiki/Rpath I know that snaps can get access to /media folders (ref: https://forum.snapcraft.io/t/the-removable-media-interface/7910 ) so if you are willing to build and upload with external libraries loading from /mnt or /media I could test. Or just a simple instruction on how to build the plugin myself.
Not sure why the snap didnt work for you, but I would be interested in looking into it if you would give me the error (just run /snap/bin/obs-studio
in the terminal)
The error was a segfault with X11 or something, I don't think it's that easy to debug. I made some builds with Ubuntu 18.4 LTS you can try those they might crash but it should be good enough to test plugin loading.
Where can I find the binaries with the changed RPATH?
There are none, I haven't looked into that and I'm not sure if I even want to look into that.
Can you please let me have the instructions on how to compile the plugin? I am not very well versed in software compilation, but with the required packages and instructions on how to compile your project I might be able to find out myself and give you a simple copy/paste instruction section you can add to the README.md if you want for ppl with the snap version.
I wrote a wiki page for compiling, which should give you a general idea of what to do, if you're stuck just ask me.
I'm not gonna recompile entire OBS as that would make the whole write-up of plugin compilation just a mess.
Describe the bug With the snap package version of OBS-Studio the libuiohook.so.0 library will have no valid place to load from. Snap packages install to a readonly filesystem that you can not add files to, this is for security/sandboxing.
To Reproduce
apt install snapd
snap install obs-studio
cd ~/snap/obs-studio/current/.config/obs-studio
mkdir -p plugins/input-overlay && cd plugins/input-overlay
wget https://github.com/univrsal/input-overlay/releases/download/v4.8/input-overlay.v4.8b.linux64.zip
unzip input-overlay.v4.8b.linux64.zip
rm LICENSE.txt input-overlay.v4.8b.linux64.zip README.txt
mv plugin/* ./
Expected behavior If the library is included and loaded from a known path in the plugin folder the issue should go away.
Screenshots N / A
Additional information: