Possible librt.so issue (found while trying to compile Pandoc)

Hello,

  • OpenMandriva Lx version: ROME

  • Desktop environment (KDE, LXQT…): KDE

I submitted a package request for Pandoc, which is a pain to build and so I’m guessing it’ll take a while. In the meantime, I’ve been trying to get it to compile on OM, and I’ve run into a roadblock that may indicate an issue with librt.so. I’m getting an error that says file too short on this library.

Here are the steps I went through:

  1. Enable the system for Haskell in these ways:
  • Go to /usr/lib64 and symlink libtinfo.so to libtinfo.so.6.
  • Install lib64gmp-devel
  1. Go to haskell.org and find the ghcup script.

  2. Run the installer (it’s one of those curl | bash things, but you don’t have to run it as root).

  3. Restart your terminal so the haskell stuff is in your path.

  4. Run cabal install pandoc.

  • It dies saying librt.so: file too short

Does anybody have any insight into this?

The best place to ask a question like this is OM-Chat. You need to talk to OM developers and that is the place to do it.

Thanks! I wound up getting Pandoc installed via its tarball. If anybody else wants to do it, here are the steps:

  1. Download the Pandoc tarball from Releases · jgm/pandoc · GitHub.

  2. Extract it to .local:

    tar xvfz [pandoc tarball] --strip-components 1 -C $HOME/.local
    

Pandoc is installed!

1 Like

Package Request has been updated.

In the meantime, I have a two-liner to get it installed in your $HOME directory:

curl -OL https://github.com/jgm/pandoc/releases/download/3.6.4/pandoc-3.6.4-linux-amd64.tar.gz 
tar xvfz pandoc-3.6.4-linux-amd64.tar.gz --strip-components 1 -C $HOME/.local

There is no problem with librt.so – librt is obsolete, the functions that used to be in it are now in libc directly.
librt.so is exactly what it should be: An empty linker script so legacy applications that still try to link with -lrt keep working.

The problem here is that pandoc is written in haskell, and the haskell linker doesn’t understand linker scripts.
(This is also the reason why we currently don’t have a pandoc package - the haskell toolchain has a chicken-and-egg problem, it needs itself to build). We’re trying to solve this, but it will take some time.

Yeah; I have no experience with C and linkers; I just knew I couldn’t get it to compile. That’s why for myself, I just installed the compiled version from GitHub as a stopgap measure until it can be packaged. No big deal, and I hope this helps others who need it in the meantime.