Hello, I am writing as an administrator, not as an R user, so forgive me if I am not completely knowledgeable about R. I have a user who is creating an R package for windows from a Linux environment using the crossbuild environment by Jun Yan and A.J. Rossini. The packages she generated worked fine until she tried to install in R 1.9.1 for Windows. Now when she installs with install.packages( "Zelig", CRAN="http://gking.harvard.edu" ) it results in two errors. First, it claims there are some missing files. When I look in the zip file, the files are there, but they coexist with other files that have the same name differing only in case. So there is both 'help/zelig' and 'help/Zelig', and this is causing R to think that one of them is missing. Second, R says that many of the files have bad MD5 checksums. I generated some MD5 digests using the linux command 'openssl dgst -md5' and compared against the ones created by the R Crossbuild script. They are different. So I made a new MD5 file and stuck it in the package. This time, the installation resulted in just three files having bad checksums, and they happen to be the counterparts to the "missing" files. In other words, it claims that "html/zelig" is missing, and "html/Zelig" has a bad MD5 checksum. So I have two problems. First, MD5 checksums are not being generated correctly by the cross builder. At worst, I could re-generate those, so it is not a big deal. More problematic, there seems to be a bug in the way R 1.9.1 for windows imports packages that contain files whose names differ only by case. Does anyone else notice this problem, or is it a known issue? Is there a workaround? Thanks. -- Erik Ray Unix Systems Administrator Harvard-MIT Data Center Harvard University phone: (617) 496-5097 mobile: (781) 710-1162
On Fri, 25 Jun 2004, Erik T. Ray wrote:> I am writing as an administrator, not as an R user, so forgive me if I > am not completely knowledgeable about R.(We might expect you to know about file systems, surely?)> I have a user who is creating an R package for windows from a Linux > environment using the crossbuild environment by Jun Yan and A.J. > Rossini.I can't comment on that environment (I can't even find it despite having read an article in R-News about a Makefile by those authors). However, the R team provides (and documents) cross-building, so why not use that instead?> The packages she generated worked fine until she tried to > install in R 1.9.1 for Windows. Now when she installs with > > install.packages( "Zelig", CRAN="http://gking.harvard.edu" ) > > it results in two errors. > > First, it claims there are some missing files. When I look in the zip > file, the files are there, but they coexist with other files that have > the same name differing only in case. So there is both 'help/zelig' and > 'help/Zelig', and this is causing R to think that one of them is > missing.For your information, Windows filenames are case-insensitive, and zelig and Zelig cannot exist in the same directory. So the problem lies with the package in using such name pairs. The R documentation does warn about this, and R's tools do check for it. That package should fail `R CMD check' -- this should be reported to its author.> Second, R says that many of the files have bad MD5 checksums. I > generated some MD5 digests using the linux command 'openssl dgst -md5' > and compared against the ones created by the R Crossbuild script. They > are different. So I made a new MD5 file and stuck it in the package. > This time, the installation resulted in just three files having bad > checksums, and they happen to be the counterparts to the "missing" > files. In other words, it claims that "html/zelig" is missing, and > "html/Zelig" has a bad MD5 checksum.Not so for packages built with the R team's tools - I have just checked one. It is quite likely that the transfer of files corrupted the files -- how was that done? (We do not support direct cross-building of package zip files, mainly because of pitfalls at this stage. My guess is that the line endings got changed from LF to CRLF.) You can just delete the MD5 file if you are sure the files are correct.> So I have two problems. First, MD5 checksums are not being generated > correctly by the cross builder.You present no evidence for that claim, and I cannot reproduce it.> At worst, I could re-generate those, so > it is not a big deal. More problematic, there seems to be a bug in the > way R 1.9.1 for windows imports packages that contain files whose names > differ only by case.A bug in the package, compounded by the user not running R CMD check.> Does anyone else notice this problem, or is it a known issue? Is there > a workaround?R CMD check Care in moving files between file systems. Hope that helps .... -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
"Erik T. Ray" <etr at ravelgrane.com> writes:> Hello, > > I am writing as an administrator, not as an R user, so forgive me if I > am not completely knowledgeable about R. > > I have a user who is creating an R package for windows from a Linux > environment using the crossbuild environment by Jun Yan and A.J. > Rossini. The packages she generated worked fine until she tried to > install in R 1.9.1 for Windows. Now when she installs with > > install.packages( "Zelig", CRAN="http://gking.harvard.edu" ) > > it results in two errors. > > First, it claims there are some missing files. When I look in the zip > file, the files are there, but they coexist with other files that have > the same name differing only in case. So there is both 'help/zelig' > and 'help/Zelig', and this is causing R to think that one of them is > missing.Yes, Windows will do that sort of thing to you. This stems from the Zelig sources themselves, [pd at titmouse tmp]$ tar tvfz ~/Zelig_1.1-2.tar.gz | grep -i /zelig.Rd -rw-r--r-- king/king 2905 2004-04-17 02:53:49 Zelig/man/Zelig.Rd -rw-r--r-- king/king 2779 2004-06-18 23:13:21 Zelig/man/zelig.Rd but pretty obviously, that's a bad idea.... Incidentally, "R CMD check" finds multiple problems with the package, but filenames differing only in case is not among them, so it looks like the checker could need improvement in that area.> Second, R says that many of the files have bad MD5 checksums. I > generated some MD5 digests using the linux command 'openssl dgst -md5' > and compared against the ones created by the R Crossbuild script. They > are different. So I made a new MD5 file and stuck it in the package. > This time, the installation resulted in just three files having bad > checksums, and they happen to be the counterparts to the "missing" > files. In other words, it claims that "html/zelig" is missing, and > "html/Zelig" has a bad MD5 checksum.The OS can't tell them apart, so it's a small wonder...> So I have two problems. First, MD5 checksums are not being generated > correctly by the cross builder. At worst, I could re-generate those, > so it is not a big deal. More problematic, there seems to be a bug in > the way R 1.9.1 for windows imports packages that contain files whose > names differ only by case. > > Does anyone else notice this problem, or is it a known issue? Is there > a workaround?Rename the source files! I don't think there's any other solution. It might be worth digging into the MD5 issue a bit more. Should be completely orthogonal to the file name issue: [pd at titmouse tmp]$ md5sum test1.tex 0a158be8f97a4134ab648d90b009e850 test1.tex [pd at titmouse tmp]$ cp test1.tex TEST1.TEX [pd at titmouse tmp]$ md5sum TEST1.TEX 0a158be8f97a4134ab648d90b009e850 TEST1.TEX [pd at titmouse tmp]$ openssl dgst -md5 test1.tex MD5(test1.tex)= 0a158be8f97a4134ab648d90b009e850 However, there might be an issue with zip/unzip if it converts to CRLF line endings or such. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907