FLIF
FLIF copied to clipboard
viewflif fails to start (can't find libflif.so.0)
After building and installing the flif tools from the git source, I tried to run viewflif, It reports that it can't find libflif.so.0, even though that's been installed to /usr/local/lib.
Running it through strace showed it was hardcoded to look for it in /usr/lib. Indeed, moving it to that path makes viewflif launch okay.
Steps to reproduce: 0. Ensure no libflif.so.0 in /usr/lib
- git clone
- cd to project folder
- make all
- cd src && viewflif
Steps to reproduce: 0. Ensure no libflif.so.0 in /usr/lib
- git clone
- cd to project folder
- make all
- cd src && viewflif
As a side note, make all
does not actually build viewflif
at the moment. Unlike build/MSVC/Makefile, which defines:
all: flif.exe libflif_dec.dll viewflif.exe test-interface.exe
...src/Makefile defines instead:
all: flif libflif$(LIBEXT)
Shouldn't these targets be synced?
Running strace, I can see it's looking in /usr/lib/ and /usr/lib/x86_64 as well as /usr/lib/tls variations of those two, but not /usr/local/lib. These strings don't seem to be defined anywhere in the project's src folder, so they might be coming from my build tools somehow. I'm running an Archlinux x86_64 based system.
Hmm, looking into that, it seems that /usr/local is not officially supported in Arch. https://bbs.archlinux.org/viewtopic.php?id=99807
Indeed neither /usr/local/lib nor it's x86_64 variant are referenced inside my /etc/ld.so.conf system. I tried adding it as suggested in that thread, rebooting, make clean and rebuilding both flif and viewflif for good measure, then doing a make install, then it worked. Rebooting turned out to be necessary - seems gcc is caching those values somewhere in RAM?
So it seems this is more archlinux's dropped ball than yours. There's a bug linked in that thread which seems to have fixed this once, but the bug seems to be back again. A note in the building instructions might be a good idea if there are more Arch users out there than me. Although there is an AUR package hanging off this github project, but it doesn't do a make install - it uses its own install instructions to populate /usr/lib rather than /usr/local anything. So another option is to direct Arch users to the AUR.
AUR maintainer here, if anything needs to be fixed or done better hit me up.