10

My GNU/Linux system (Arch) now has libncurses.so.6 rather than libncurses.so.5. But I have upstream's vanilla TeX Live (fully updated) and xindy wants libncurses.so.5:

xindy --version

produces the following error

xindy release: 2.5.1
xindy script version: 1.18
/usr/local/texlive/bin/xindy.run: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

And ldd can confirm the problem:

ldd /usr/local/texlive/bin/xindy.run 

gives

    linux-vdso.so.1 (0x00007ffc07997000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007fab4d1b1000)
    libcrypt.so.1 => /usr/lib/libcrypt.so.1 (0x00007fab4cf79000)
    libncurses.so.5 => not found
    libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fab4cd75000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007fab4c9d1000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fab4d4af000)

How can I use xindy without changing my operating system, while using vanilla TeX Live?

2 strategies have occurred to me:

  1. compile xindy from sources against libncurses.so.6;

  2. compile and install libncurses.so.5 alongside libncurses.so.6.

Option (2) can be dodgy or can be fine, depending on the details. My suspicion is it may be dodgy for this library, simply because no packages are available for the old version of the library, which might mean there are problems having both installed. Moreover, since everything else is compiled against the new version, I'm not sure whether this would be enough for xindy anyway.

Option (1) I have no idea about. I don't know if this is even vaguely doable or, in fact, where the sources are or what might be required to compile them. (I don't suppose there's any chance a pre-compiled binary is available somewhere? But that is probably hoping for too much ;).)

What is the most practicable approach?

4
  • I have absolutly no idea what libncurses.so.5 is, but it sounds as a question that should go to the texlive list. Dec 3 '15 at 14:58
  • @UlrikeFischer I believe that it emulates the kind of semi-graphical interface which can be used at the command line a looks like ASCII art. (Don't know if you've ever used programmes which use this kind of interface or not.)
    – cfr
    Dec 3 '15 at 22:04
  • It's a library for terminal user interfaces
    – MaxNoe
    Oct 14 '19 at 9:59
  • en.wikipedia.org/wiki/Ncurses
    – MaxNoe
    Oct 14 '19 at 10:00
3

I don't know if this is an answer. It is, at least, a workaround.

This is specific to Arch Linux. It may be that it can be modified for other systems, should the need arise, but that is not something I have any knowledge of at this time. (My other system runs Fedora where there's no issue at the moment.)


On Arch Linux, you can install the AUR package ncurses5-compat-libs. As I understand it, this is using source with the same major version as the main repo's ncurses package:

ncurses5-compat-libs:

Repository     : aur
Name           : ncurses5-compat-libs
Version        : 6.0-2
URL            : http://invisible-island.net/ncurses/ncurses.html
AUR Page       : https://aur.archlinux.org/packages/ncurses5-compat-libs
Depends On     : glibc  gcc-libs  sh
License        : MIT
Votes          : 82
Popularity     : 35.48
Out of Date    : No
Maintainer     : Barthalion
Submitted      : Dydd Gwener 18 mis Medi 2015 22:03:12 BST
Last Modified  : Dydd Gwener 18 mis Medi 2015 22:03:12 BST
Description    : System V Release 4.0 curses emulation library, ABI 5

ncurses:

Repository     : core
Name           : ncurses
Version        : 6.0-3
Description    : System V Release 4.0 curses emulation library
Architecture   : x86_64
URL            : http://invisible-island.net/ncurses/ncurses.html
Licences       : MIT
Groups         : None
Provides       : libncurses++w.so=6-64  libformw.so=6-64  libmenuw.so=6-64  libpanelw.so=6-64  libncursesw.so=6-64
Depends On     : glibc  gcc-libs
Optional Deps  : None
Conflicts With : None
Replaces       : None
Download Size  : 1007.14 KiB
Installed Size : 3407.00 KiB
Packager       : Evangelos Foutras <evangelos@foutrelis.com>
Build Date     : Dydd Mawrth 15 mis Medi 2015 04:47:59 BST
Validated By   : MD5 Sum  SHA256 Sum  Signature

The difference, I think, is in the way the packages are built:

ncurses5-compat-libs's PKGBUILD includes this code:

build() {
  cd $_pkgname-${pkgver/_/-}

  ./configure --prefix=/usr --mandir=/usr/share/man \
     --with-shared --with-normal --without-debug --without-ada \
     --enable-widec --enable-pc-files --with-cxx-binding --with-cxx-shared \
     --with-abi-version=5
  make
}

whereas ncurse's PKGBUILD uses this code:

build() {
  cd $pkgname-${pkgver/_/-}

  ./configure --prefix=/usr --mandir=/usr/share/man \
     --with-shared --with-normal --without-debug --without-ada \
     --enable-widec --enable-pc-files --with-cxx-binding --with-cxx-shared \
     --enable-ext-colors --enable-ext-mouse
  make
}

So I'm assuming that the --with-abi-version=5 is the key here, and that this option is what ensures that libncursesw.so.5 is built rather than libncursesw.so.6. (libncurses.so.5 and libncurses.so.6 are just symbolic links to libncursesw.so.5 and libncursesw.so.6 respectively, which support 'wide' characters on terminals for better international support, I think).

There is also an AUR package providing the 32-bit versions of the libraries provided by libncurses5-compat-libs (i.e. the 5 versions of the libraries provided by the main repo's lib32-ncurses).

16
  • Just a quick note: On a current Arch Linux system (x64) this does not work. Even ignoring the failing PGP checks of the AUR packages xindy cannot find the .so.5 files (although which shows the correct location).
    – TeXnician
    Jul 10 '17 at 10:19
  • @TeXnician Have you tried ldconfig? If /sbin/ldconfig -p | grep libncurses.so.5 does not show results, try sudo ldconfig to update the cache. Jul 11 '17 at 8:13
  • @Schweinebacke No results. Even after updating the cache. And for libncurses only the following libncursesw.so.6 (libc6,x86-64) => /usr/lib/libncursesw.so.6 libncursesw.so.6 (libc6) => /usr/lib32/libncursesw.so.6 libncursesw.so.5 (libc6) => /usr/lib32/libncursesw.so.5 libncursesw.so (libc6,x86-64) => /usr/lib/libncursesw.so libncursesw.so (libc6) => /usr/lib32/libncursesw.so libncurses++w.so.6 (libc6,x86-64) => /usr/lib/libncurses++w.so.6 libncurses++w.so (libc6,x86-64) => /usr/lib/libncurses++w.so
    – TeXnician
    Jul 11 '17 at 8:28
  • @TeXnician What's the location of libncurses.so.5 and libncurses.so.5.9? Is the location searched by ldconfig? If not, add the path or make a symlink into /usr/lib/. BTW: Here (SuSE Leap or SuSE Tumbleweed) libncursesw.so.5.9 and libncurses.so.5.9 are different binaries. Jul 11 '17 at 8:54
  • 1
    Just for the record, as it can be a problem under Gentoo, too: Install ncurses:5 parallel to ncurses:6; it does not make any problems, since the versions are in different slots and portage keeps everything together. Afterwards, xindy works again. Mar 25 '18 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.