Bug 239169 - math/R package needs readline (rl_sort_completion_matches)
Summary: math/R package needs readline (rl_sort_completion_matches)
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Joseph Mingrone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-12 16:56 UTC by Nicola Mingotti
Modified: 2019-07-16 12:45 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (jrm)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicola Mingotti 2019-07-12 16:56:23 UTC
Hi,

I just installed R from package in FreeBSD-12. It does not work out of the box, giving the error :

---------------------------
ld-elf.so.1: /usr/local/lib/R/lib/libR.so.3.6: Undefined symbol "rl_sort_completion_matches"
---------------------------

It all works as expected if is install readline:
$> sudo pkg install readline 

bye
Nicola
Comment 1 Joseph Mingrone freebsd_committer 2019-07-13 18:45:47 UTC
Hi Nicola,

This is strange.  The R package should depend on devel/readline.  To confirm this, I just started a clean jail and built the package.

# pkg info -d R | grep readline
        readline-8.0.0

# pkg info -r readline | grep R
readline-8.0.0:
        R-3.6.0_1

Next, I removed all packages from the jail, set pkg to use the default repository and installed the default R package.  I see the same as above, that is, R depends on readline.

Could you provide more hints as to why your installation of R did not depend on readline?

Regards,

Joseph
Comment 2 Nicola Mingotti 2019-07-15 10:44:59 UTC
(In reply to Joseph Mingrone from comment #1)

Hi Joseph,

Luckily i was able to reproduce the exact same behaviour in another system I have. 

My first test was on:
$> uname -a
FreeBSD fbs-slacmac 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC  amd64

My second test is in:
$> uname -a
FreeBSD nise1 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC  amd64

All commands from here are in machine nise1.

#> pkg info | grep readline
readline-7.0.5                 

#> pkg install R

#> R 
ld-elf.so.1: /usr/local/lib/R/lib/libR.so.3.6: Undefined symbol "rl_sort_completion_matches"

#>  pkg info | grep readline
readline-7.0.5                 

#>  pkg install readline
# this updates the readline 

#> R 
==> Now works

#>  pkg info | grep readline
readline-8.0.0                 

In conclusion, if there is readline-7.X already installed in the system, the new one will not be installed with R, and R will not work with the old one.

bye
Nicola
Comment 3 Joseph Mingrone freebsd_committer 2019-07-15 20:39:56 UTC
Thanks for clarifying.

1. Are you using the official packages?

2. Based on your command snippets below, I assume you have not `pkg lock`ed any packages?
Comment 4 Joseph Mingrone freebsd_committer 2019-07-15 20:56:32 UTC
I confirmed your issue by running a little test in a jail.  Unfortunately I can't see a problem with math/R itself, since it depends on devel/readline [1].  It's more of a 'feature/limitation' of the ports tree and pkg.  I'll dig a little deeper and see if I can provide more information.

[1] More specifically, it has USES=readline:port, which in turn has LIB_DEPENDS+=libreadline.so.8:devel/readline.
Comment 5 Joseph Mingrone freebsd_committer 2019-07-16 12:45:34 UTC
Adding pkg@ because I am unclear if it is expected behavior for `pkg install R` to ignore the missing libreadline.so.8 library dependency.  I would have guessed that pkg would either complain or try to upgrade the readline package to version 8.0.0.

A summary of the problem:

- Start with an older version of the readline package installed, version 7.0.5.
- `pkg install R`, which requires the shared library libreadline.so.8
- Installing R does not complain or try to upgrade the readline package
- R fails to run