FLIF icon indicating copy to clipboard operation
FLIF copied to clipboard

viewflif fails to start (can't find libflif.so.0)

Open williain opened this issue 7 years ago • 3 comments

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

  1. git clone
  2. cd to project folder
  3. make all
  4. cd src && viewflif

williain avatar Sep 24 '17 15:09 williain

Steps to reproduce: 0. Ensure no libflif.so.0 in /usr/lib

  1. git clone
  2. cd to project folder
  3. make all
  4. 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?

waldyrious avatar Sep 24 '17 19:09 waldyrious

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.

williain avatar Sep 25 '17 00:09 williain

AUR maintainer here, if anything needs to be fixed or done better hit me up.

professorjamesmoriarty avatar Sep 25 '17 01:09 professorjamesmoriarty