Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 351910 - dev-lang/R undesired LD_LIBRARY_PATH
Summary: dev-lang/R undesired LD_LIBRARY_PATH
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
: 351911 351913 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-17 14:04 UTC by Benda Xu
Modified: 2012-01-02 19:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
stop placing explict R_LD_LIBRARY_PATH in configure.ac (R-2.11.1-ldpath.patch,1.43 KB, text/plain)
2011-01-17 14:47 UTC, Benda Xu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benda Xu gentoo-dev 2011-01-17 14:04:07 UTC
R has a design flaw using /usr/bin/R as a shell wrapper hardcoding LD_LIBRARY_PATH envs. People has already pointed it out[1], but upstream insists on such a non-standard solution.

This dirty ad-hoc implementation may cause problems if undesired libraries on LD_LIBRARY_PATH (silently) get loaded in front of gentoo standard ones.

One such senario is in Gentoo Prefix. We want to use libraries in ${PREFIX}/usr/lib, but R sets /usr/local/lib:/usr/X11R6/lib to LD_LIBRARY_PATH causing errors on the old (host) systems.

1. https://stat.ethz.ch/pipermail/r-devel/2005-February/032267.html

Reproducible: Always

Steps to Reproduce:
1. touch /usr/local/lib/libXrender.so
2. R
3. in R env type "X11()"
Actual Results:  
Error in X11() : X11 module cannot be loaded
In addition: Warning message:
In X11() :
  unable to load shared library '/usr/lib/R/modules//R_X11.so':
  /usr/lib/libcairo.so.2: undefined symbol: XRenderCreateLinearGradient


Expected Results:  
X11() loads successfully.

in the example libcairo.so looks for libXrender.so for symbol XRenderCreateLinearGradient.
Comment 1 Dustin Polke 2011-01-17 14:28:38 UTC
*** Bug 351911 has been marked as a duplicate of this bug. ***
Comment 2 Benda Xu gentoo-dev 2011-01-17 14:38:57 UTC
*** Bug 351913 has been marked as a duplicate of this bug. ***
Comment 3 Benda Xu gentoo-dev 2011-01-17 14:40:20 UTC
Sorry, refreshing my browser resulted in reporting again.
Comment 4 Benda Xu gentoo-dev 2011-01-17 14:47:21 UTC
Created attachment 260052 [details]
stop placing explict R_LD_LIBRARY_PATH in configure.ac
Comment 5 Benda Xu gentoo-dev 2011-01-17 14:49:58 UTC
one possible fix is to delete R_LD_LIBRARY_PATH scripts in configure.ac as in the patch (as you can  see in the comments, the upstream maintainer is also doubting), then run "aclocal -I m4 && autoconf" before configure.
Comment 6 Sébastien Fabbro (RETIRED) gentoo-dev 2011-01-19 17:23:13 UTC
You should really re-suggest it upstream and see what they say by now, because it would change the default R runtime expected behaviour, no matter how bad it is.  I may apply this patch if I see positive feedback.
Comment 7 Benda Xu gentoo-dev 2011-01-20 10:13:01 UTC
Hi Sébastien,

I have reported the isssue in R bug tracker here:

https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14480

(In reply to comment #6)
> You should really re-suggest it upstream and see what they say by now, because
> it would change the default R runtime expected behaviour, no matter how bad it
> is.  I may apply this patch if I see positive feedback.

Comment 8 Sébastien Fabbro (RETIRED) gentoo-dev 2012-01-02 19:51:43 UTC
It seems upstream is not keen on replacing it. If you are ready to maintain the patch, feel free to commit it. Meanwhile, closing as upstream until they decide it is worth it.