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.
*** Bug 351911 has been marked as a duplicate of this bug. ***
*** Bug 351913 has been marked as a duplicate of this bug. ***
Sorry, refreshing my browser resulted in reporting again.
Created attachment 260052 [details] stop placing explict R_LD_LIBRARY_PATH in configure.ac
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.
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.
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.
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.