/lib64/libtinfo.so.5: no version information available
Asked Answered
T

1

4

I created a new project with stack which made a project with resolver: lts-16.12. When running a sample .hs file with stack runghc src/MyExample.hs, it works fine, but I'm getting these as well before it runs:

/home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/ghc: /lib64/libtinfo.so.5: no version information available (required by /home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/../haskeline-0.7.5.0/libHShaskeline-0.7.5.0-ghc8.8.4.so)
/home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/ghc: /lib64/libtinfo.so.5: no version information available (required by /home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/../ghc-8.8.4/libHSghc-8.8.4-ghc8.8.4.so)
/home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/ghc: /lib64/libtinfo.so.5: no version information available (required by /home/lpied/.stack/programs/x86_64-linux/ghc-8.8.4/lib/ghc-8.8.4/bin/../terminfo-0.4.1.4/libHSterminfo-0.4.1.4-ghc8.8.4.so)

I've read things such as this and can confirm the library in question:

$ ll /lib64/libtinfo.so.5
lrwxrwxrwx. 1 root root 15 Aug 08 19:47 /lib64/libtinfo.so.5 -> libtinfo.so.5.9

does not have VERDEF / .gnu.version_d:

$ readelf -V /lib64/libtinfo.so.5|grep gnu
Version symbols section '.gnu.version' contains 245 entries:
Version needs section '.gnu.version_r' contains 1 entries:

It looks like the above message is printed by this:

  if (__glibc_unlikely (map->l_info[VERSYMIDX (DT_VERDEF)] == NULL))
    {
      /* The file has no symbol versioning.  I.e., the dependent
     object was linked against another version of this file.  We
     only print a message if verbose output is requested.  */
      if (verbose)
    {
      /* XXX We cannot translate the messages.  */
      _dl_exception_create_format
        (&exception, DSO_FILENAME (map->l_name),
         "no version information available (required by %s)", name);
      goto call_cerror;
    }
      return 0;
    }

I tried setting / unsetting various flags from here, such as LD_VERBOSE, LD_DEBUG, LD_WARN, but none had any effect.

I don't have permissions to install anything in order to fix the library itself. Any idea if / how these messages can be suppressed in lieu of that? Or any alternative non-invasive fixes?

Turbary answered 3/9, 2020 at 19:28 Comment(0)
S
8

It seems that the distribution you are using has built ncurses without symbol versioning. I'm guessing that it is something Fedora-derived, so I filed a bug to change that:

In the meantime, you can build ncurses yourself, probably using

./configure --prefix=/home/lpied/opt/ncurses --with-versioned-syms
make
make install

This does not need root privileges.

And add /home/lpied/opt/ncurses/lib64 to LD_LIBRARY_PATH in the configuration of your shell.

Sappington answered 3/9, 2020 at 19:50 Comment(3)
make install now requires root privilege. Otherwise, it fails on Fedora 36Bazluke
Thanks! Unfortunately, looks like the bug is still unresolved...Turbary
I had to add a flag: ./configure --prefix=$HOME/opt/ncurses --with-versioned-syms --with-termlib sudo make sudo make installNeuberger

© 2022 - 2024 — McMap. All rights reserved.