Bug 1404662

Summary: libR.so doesn't contain full path of libRblas.so
Product: [Fedora] Fedora Reporter: Sjoerd Mullender <sjoerd>
Component: RAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: igeorgex, tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: R-3.3.2-3.fc25 R-3.3.2-3.fc24 R-3.3.2-3.el7 R-3.3.2-3.el5 R-3.3.2-3.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-19 06:03:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sjoerd Mullender 2016-12-14 11:44:49 UTC
Description of problem:
When linking a program against libR.so, you can't run the program unless you provide a LD_LIBRARY_PATH that points to /usr/lib64/R/lib.  This is because the libR.so in that directory links to libRblas.so, but doesn't contain the path of said file.

This can be easily seen thus:
$ ldd /usr/lib64/R/lib/libR.so | grep libRblas
	libRblas.so => not found

On a Fedora 24 system with an older version of R-core (R-core-3.3.1-2.fc24.x86_64) I get this:
$ ldd /usr/lib64/R/lib/libR.so | grep libRblas
	libRblas.so => /usr/lib64/R/lib/libRblas.so (0x00007fc77c085000)


Version-Release number of selected component (if applicable):
R-core-3.3.2-2.fc25.x86_64

How reproducible:


Steps to Reproduce:
1.ldd /usr/lib64/R/lib/libR.so | grep libRblas
2.
3.

Actual results:
libRblas.so => not found

Expected results:
libRblas.so => /usr/lib64/R/lib/libRblas.so (0x00007fc77c085000

Additional info:

Comment 1 Sjoerd Mullender 2016-12-14 17:00:26 UTC
With R-core-3.3.1-2.fc25.x86_64 on Fedora 25, it also works correctly:
$ ldd /usr/lib64/R/lib/libR.so | grep libRblas
	libRblas.so => /usr/lib64/R/lib/libRblas.so (0x00007fab52e63000)

This is clearly a regression in R-core-3.3.2-2.fc25.x86_64.

Comment 2 Tom "spot" Callaway 2016-12-14 17:08:30 UTC
Yeah, so it looks like while R is perfectly happy using libRblas.so as a symlink to libopenblas.so.0, externally, nothing else is.

The speedup from using openblas is significant, so the fix is to build a copy of openblas that has the libRblas.so filename and soname, and use that instead of the symlink. I have a new build of openblas going which adds this, then I'll do a new round of R builds that depend on it.

As a temporary workaround, you can run (as root):
rm -f /usr/lib64/R/lib/libRblas.so
mv /usr/lib64/R/lib/libRrefblas.so /usr/lib64/R/lib/libRblas.so

That will restore the unoptimized libRblas.so that R provides.

Comment 3 Tom "spot" Callaway 2016-12-14 17:10:03 UTC
Oh, and run /sbin/ldconfig (as root) after moving libRrefblas.so so that the ldcache is updated.

Comment 4 Sjoerd Mullender 2016-12-14 17:14:45 UTC
The workaround does indeed work.

Comment 5 Fedora Update System 2016-12-15 17:32:15 UTC
R-3.3.2-3.fc23 openblas-0.2.19-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-46ffd0fe13

Comment 6 Fedora Update System 2016-12-15 17:32:33 UTC
R-3.3.2-3.el7 openblas-0.2.19-4.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-08541f148f

Comment 7 Fedora Update System 2016-12-15 17:32:44 UTC
R-3.3.2-3.fc24 openblas-0.2.19-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-87243d4214

Comment 8 Fedora Update System 2016-12-15 17:32:56 UTC
R-3.3.2-3.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-e213692dbc

Comment 9 Fedora Update System 2016-12-15 17:33:08 UTC
R-3.3.2-3.fc25 openblas-0.2.19-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-3b99079f61

Comment 10 Fedora Update System 2016-12-15 17:33:21 UTC
R-3.3.2-3.el5 has been submitted as an update to Fedora EPEL 5. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-11ca20b113

Comment 11 Fedora Update System 2016-12-16 04:23:04 UTC
R-3.3.2-3.el7, openblas-0.2.19-4.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-08541f148f

Comment 12 Fedora Update System 2016-12-16 05:27:01 UTC
R-3.3.2-3.fc23, openblas-0.2.19-4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-46ffd0fe13

Comment 13 Fedora Update System 2016-12-16 05:32:11 UTC
R-3.3.2-3.fc24, openblas-0.2.19-4.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-87243d4214

Comment 14 Fedora Update System 2016-12-16 05:34:14 UTC
R-3.3.2-3.fc25, openblas-0.2.19-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-3b99079f61

Comment 15 Fedora Update System 2016-12-16 13:17:39 UTC
R-3.3.2-3.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-e213692dbc

Comment 16 Fedora Update System 2016-12-16 13:18:04 UTC
R-3.3.2-3.el5 has been pushed to the Fedora EPEL 5 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-11ca20b113

Comment 17 Fedora Update System 2016-12-19 06:03:27 UTC
R-3.3.2-3.fc25, openblas-0.2.19-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2017-01-04 21:21:49 UTC
R-3.3.2-3.fc24, openblas-0.2.19-4.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2017-01-05 04:20:00 UTC
R-3.3.2-3.el7, openblas-0.2.19-4.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2017-01-06 23:48:31 UTC
R-3.3.2-3.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2017-01-07 00:19:15 UTC
R-3.3.2-3.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.