racket / readline-gpl

GNU General Public License v3.0
2 stars 4 forks source link

Unmet dependency on libreadline-dev #3

Open Bost opened 4 years ago

Bost commented 4 years ago

Hi. It looks like readline-gpl depends on libreadline-dev and doesn't check its presence during the installation process:

$ raco pkg install readline-gpl
Resolving "readline-gpl" via https://download.racket-lang.org/releases/7.5/catalog/
Resolving "readline-gpl" via https://pkgs.racket-lang.org
Using cached15774461751577446175668 for git://github.com/racket/readline-gpl
raco setup: version: 7.5
raco setup: platform: x86_64-linux [3m]
raco setup: target machine: racket
raco setup: installation name: 7.5
raco setup: variants: 3m
raco setup: main collects: /usr/share/racket/collects
raco setup: collects paths: 
raco setup:   /home/bost/.racket/7.5/collects
raco setup:   /usr/share/racket/collects
raco setup: main pkgs: /usr/share/racket/pkgs
raco setup: pkgs paths: 
raco setup:   /usr/share/racket/pkgs
raco setup:   /home/bost/.racket/7.5/pkgs
raco setup: links files: 
raco setup:   /usr/share/racket/links.rktd
raco setup:   /home/bost/.racket/7.5/links.rktd
raco setup: main docs: /usr/share/doc/racket
raco setup: --- updating info-domain tables ---                    [12:35:44]
raco setup: updating: /home/bost/.racket/7.5/share/info-cache.rktd
raco setup: --- pre-installing collections ---                     [12:35:44]
raco setup: --- installing foreign libraries ---                   [12:35:44]
raco setup: --- installing shared files ---                        [12:35:44]
raco setup: installing: shared file /home/bost/.racket/7.5/share/readline-lib.rkt
raco setup: --- compiling collections ---                          [12:35:44]
raco setup: --- parallel build using 4 jobs ---                    [12:35:44]
raco setup: 3 making: <pkgs>/readline-gpl
raco setup: 3 making: <pkgs>/readline-gpl/private
raco setup: --- creating launchers ---                             [12:35:44]
raco setup: --- installing man pages ---                           [12:35:44]
raco setup: --- building documentation ---                         [12:35:44]
raco setup: --- installing collections ---                         [12:35:46]
raco setup: --- post-installing collections ---                    [12:35:46]
$ racket -l rash/repl --
ffi-lib: couldn't open "libreadline.so.5" (libreadline.so.5: cannot open shared object file: No such file or directory)
  context...:
   /usr/share/racket/collects/ffi/unsafe.rkt:131:0: get-ffi-lib11
   "/home/bost/.racket/7.5/share/readline-lib.rkt": [running body]
   temp37_0
   for-loop
   run-module-instance!125
   do-dynamic-require5
   "/usr/share/racket/pkgs/readline-lib/readline/rktrl.rkt": [running body]
   temp37_0
   for-loop
   run-module-instance!125
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   for-loop
   [repeats 1 more time]
   run-module-instance!125
   ...

So I installed the libreadline-dev manually and life was good again:

$ sudo apt install --yes libreadline-dev
[abbreviated]
$ racket -l rash/repl --
12:46 /home/bost/
> 

Thanks in advance for fixing it.

LiberalArtist commented 3 years ago

In general, Racket packages on Unix-like systems don't do this kind of checking for native libraries (because you can generally build and install the Racket package, and in some cases even use part of it, without the native library).

But I suspect your underlying problem would be fixed by https://github.com/racket/readline-gpl/pull/5: libreadline-dev presumably provides a libreadline.so without a version number, which this package accepts, but you may well already have one or more of the non-development packages mentioned in https://github.com/willghatch/racket-rash/pull/66, just ones newer than this library currently knows to look for. For example, I have a libreadline.so.8 from the libreadline8 Debian/Ubuntu package.

LiberalArtist commented 1 month ago

Even so, this package ought to fail gracefully when it can't find a libreadline.so, not prevent you from using the repl at all!