R library() bug
Stephen P Carrier
carrier@berkeley.edu
Fri Dec 1 23:24:46 GMT 2023
On Tue, Nov 28, 2023 at 8:32 PM Marco Atzeri <marco.atzeri@gmail.com> wrote:
> On 29.11.2023 02:12, Stephen P Carrier via Cygwin wrote:
> > I have found another issue with Cygwin R.
> >
> > This is for a brand new R installation (4.3.0) on up-to-date Cygwin. I
> am
> > warned when starting R that "stats" package was not found. Though it was
> > just a warning I do need the stats package for some things.
> >
> > Minimal test case: I invoke "R" with no arguments and get:
> >
> > -----
> > R version 4.3.0 (2023-04-21) -- "Already Tomorrow"
> > Copyright (C) 2023 The R Foundation for Statistical Computing
> > Platform: x86_64-pc-cygwin (64-bit)
> >
> > R is free software and comes with ABSOLUTELY NO WARRANTY.
> > You are welcome to redistribute it under certain conditions.
> > Type 'license()' or 'licence()' for distribution details.
> >
> > R is a collaborative project with many contributors.
> > Type 'contributors()' for more information and
> > 'citation()' on how to cite R or R packages in publications.
> >
> > Type 'demo()' for some demos, 'help()' for on-line help, or
> > 'help.start()' for an HTML browser interface to help.
> > Type 'q()' to quit R.
> >
> > During startup - Warning message:
> > package ‘stats’ in options("defaultPackages") was not found
> >> library("stats")
> > Error: package or namespace load failed for ‘stats’ in dyn.load(file,
> > DLLpath = DLLpath, ...):
> > unable to load shared object '/usr/lib/R/library/stats/libs/stats.dll':
> > No such file or directory
> > -----
> >
> > However, the file /usr/lib/R/library/stats/libs/stats.dll is very much a
> > file that exists and is readable by the user running R. I've looked over
> > file and folder permissions and don't see an issue. Other packages in
> > options('defaultPackages') load without difficulty.
> >
> > Could the maintainer have a look? Thanks.
> >
> > --Stephen Carrier
> >
>
> Can you share as attachment the cygcheck.out ?
>
> https://www.cygwin.com/problems.html
>
> Run
> "cygcheck -s -v -r > cygcheck.out"
> and include that file as an attachment in your report. Please do not
> compress or otherwise encode the output. Just attach it as a straight
> text file so that it can be easily viewed.
>
I was able to reproduce on a different windows machine which is more
convenient for me to troubleshoot on, so I'll send along a new
cygcheck2.out to capture the few differences between the systems.
I ran R under strace and R does find the "missing" file and tries to load
it, immediately unloads it, and reports an error that seems to come from
newlib.
I think there may be a problem in newlib or in the way R tries to use
newlib? (or, Windows is changing things again.) Fixing something like
this is beyond my abilities. I hope this report is useful.
I am attaching cygcheck2.out and also strace2_select.out, a selection of
the strace output that shows the error and points to line 288 of dlfcn.cc
in the newlib source:
https://sourceware.org/git/?p=newlib-cygwin.git;a=history;f=winsup/cygwin/dlfcn.cc;h=fb705247352e46fb8fe408937a6e766fa37760e2;hb=HEAD
I have no idea why this one package is affected and none of the others.
The full strace2.out is too big for e-mail, I can make it available if
anyone who will look at itt. I will try any suggestions. Thanks,
Stephen Carrier
More information about the Cygwin
mailing list