0

I have been attempting to install the R (4.1.0) package 'deldir' on a macos platform, i.e.

https://cran.r-project.org/web/packages/deldir/index.html

following

install.packages('deldir')

I get the following warning(s) - like the one below, but iterated dozens of times:

18 | 23001 continue
      |     1
Warning: Label 23001 at (1) defined but not used [-Wunused-label]
gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2      
-c mnnd.f -o mnnd.o
mnnd.f:16:5:

Followed by the error message:

clang: error: linker command failed with exit code 1 (use -v to  see invocation)
make: *** [deldir.so] Error 1
ERROR: compilation failed for package ‘deldir’
* removing ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/deldir’

The downloaded source packages are in
‘/private/var/folders/5s/x2m_2x714s90wchtvd2ylhf80000gn/T/RtmpWxpS5.                    /downloaded_packages’
Warning messages:
1: In readRDS(dest) : lzma decoder corrupt data
2: In install.packages("deldir") :
installation of package ‘deldir’ had non-zero exit status

I was able to install several other packages without any issue today, so this is only coming up with the 'deldir' package. What does the

lzma decoder corrupt data

error mean in the context of the readRDS(dest) function, as I think this error is what is driving everything else, and what, if anything, can be done about it?

Max
  • 487
  • 5
  • 19
  • The warnings about labels don't matter, you can ignore them. You should show us the first "error", which probably comes just before the "compilation failed" message. – user2554330 May 20 '23 at 19:18
  • The "lzma" message is likely from an attempted download of the list of available packages on whatever CRAN mirror you were using. Try a different one; `cloud.r-project.org` (hosted by Posit) is quite reliable and up to date. – user2554330 May 20 '23 at 19:20
  • Final suggestion: update to current R, and then you'll be able to download binaries, and won't have to worry about compiling the package. – user2554330 May 20 '23 at 19:21
  • I just appended the missing part of the error message (immediately above "compilation error") – Max May 20 '23 at 19:22
  • I think that sort of error comes if you use an incompatible Fortran compiler. The main one available from `mac.r-project.org/tools` is for R 4.3.0; I don't know which one you would use for R 4.1.0. – user2554330 May 20 '23 at 19:24
  • If I update to R 4.3, I'll also have to go back and reinstall all of the packages that I need and use. While I can and should do this eventually, what would you suggest as the quickest short-term fix? Would it be a matter of finding the version of Fortran compatible with 4.1.0? As I mentioned, this is the first and only compiled package where I experienced this issue, so presumably the Fortran compiler I have doesn't have compatibility issues with anything else. – Max May 20 '23 at 19:30
  • The quickest short term fix is to update to R 4.3.0 and use binaries of packages from CRAN. – user2554330 May 20 '23 at 19:38

0 Answers0