[R-SIG-Mac] [External] Rmpfr crashes on Mac

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Sun Nov 28 23:53:00 CET 2021


Dev,

as a first step, please don't use RStudio - we have to establish if this is an R issue or not first (RStudio is not R). Second, if it still crashes, please provide
1) the crash report
2) the output od sesionInfo() in R and
3) the output of
system_profiler SPHardwareDataType SPSoftwareDataType
fron Terminal (or system("system_profiler SPHardwareDataType SPSoftwareDataType") in R).

Cheers,
Simon



> On Nov 29, 2021, at 9:36 AM, Dev Chakraborty <dpc10ster using gmail.com> wrote:
> 
> I still get the crash. I tried to recreate your commands on my machine
> (macOS Monterey, Version 12.0.1). Here is a summary; further details are
> below.
> 
> 1. Installing from CRAN downloaded file Rmpfr_0.8-7.tar.gz failed, see
> further details.
> 2. Therefore I had to instal the binary file from CRAN, see further details.
> 3. Loaded library(Rmpfr), see further details
> 4. Ran the two commands at the RStudio console:
> x <- mpfr(-50, 2000)
> y <- mpfr(-50.1, 2000)
> This caused a crash.
> 5. Restarted my system and ran:
> 
> version
>               _
> platform       x86_64-apple-darwin17.0
> arch           x86_64
> os             darwin17.0
> system         x86_64, darwin17.0
> status
> major          4
> minor          1.1
> year           2021
> month          08
> day            10
> svn rev        80725
> language       R
> version.string R version 4.1.1 (2021-08-10)
> nickname       Kick Things
> 
> 6. Details of my machine (system report)
> Model Name: MacBook Pro
>  Model Identifier: MacBookPro11,5
>  Processor Name: Quad-Core Intel Core i7
>  Processor Speed: 2.5 GHz
>  Number of Processors: 1
>  Total Number of Cores: 4
>  L2 Cache (per Core): 256 KB
>  L3 Cache: 6 MB
>  Hyper-Threading Technology: Enabled
>  Memory: 16 GB
>  System Firmware Version: 428.40.10.0.0
>  OS Loader Version: 540.40.4~45
>  SMC Version (system): 2.30f2
>  Serial Number (system): C02PTX43G8WP
>  Hardware UUID: 85D23F6B-40E1-5D82-BF89-909EF7141116
>  Provisioning UDID: 85D23F6B-40E1-5D82-BF89-909EF7141116
> 
> 
> Other details
> 1.
> install.packages("~/Downloads/Rmpfr_0.8-7.tar.gz", repos = NULL, type =
> "source")
> * installing *source* package ‘Rmpfr’ ...
> ** package ‘Rmpfr’ successfully unpacked and MD5 sums checked
> ** using staged installation
> checking for gcc... clang -mmacosx-version-min=10.13
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether clang -mmacosx-version-min=10.13 accepts -g... yes
> checking for clang -mmacosx-version-min=10.13 option to accept ISO C89...
> none needed
> checking how to run the C preprocessor... clang -mmacosx-version-min=10.13
> -E
> checking for grep that handles long lines and -e... /usr/bin/grep
> checking for egrep... /usr/bin/grep -E
> checking for ANSI C header files... rm: conftest.dSYM: is a directory
> rm: conftest.dSYM: is a directory
> yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking mpfr.h usability... no
> checking mpfr.h presence... no
> checking for mpfr.h... no
> configure: error: Header file mpfr.h not found; maybe use
> --with-mpfr-include=INCLUDE_PATH
> ERROR: configuration failed for package ‘Rmpfr’
> * removing
> ‘/Library/Frameworks/R.framework/Versions/4.1/Resources/library/Rmpfr’
> Warning in install.packages :
>  installation of package ‘/Users/Dev/Downloads/Rmpfr_0.8-7.tar.gz’ had
> non-zero exit status
> 
> 2.
> install.packages("Rmpfr")
> trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.1/Rmpfr_0.8-7.tgz'
> Content type 'application/x-gzip' length 1556368 bytes (1.5 MB)
> ==================================================
> downloaded 1.5 MB
> 
> 
> The downloaded binary packages are in
> /var/folders/d1/mx6dcbzx3v39r260458z2b200000gn/T//Rtmpfbzg9i/downloaded_packages
>> 
> 
> 3.
> library(Rmpfr)
> Loading required package: gmp
> 
> Attaching package: ‘gmp’
> 
> The following objects are masked from ‘package:base’:
> 
>    %*%, apply, crossprod, matrix, tcrossprod
> 
> C code of R package 'Rmpfr': GMP using 64 bits per limb
> 
> 
> Attaching package: ‘Rmpfr’
> 
> The following object is masked from ‘package:gmp’:
> 
>    outer
> 
> The following objects are masked from ‘package:stats’:
> 
>    dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm
> 
> The following objects are masked from ‘package:base’:
> 
>    cbind, pmax, pmin, rbind
> 
> 
> On Sun, Nov 28, 2021 at 12:53 PM Richard M. Heiberger <rmh using temple.edu>
> wrote:
> 
>> Works normally in R-4.1.2 with Rmpfr_0.8-7 on Macintosh
>> aarch64-apple-darwin20
>> I am running inside Emacs using ESS
>> 
>>> packageVersion("Rmpfr")
>> [1] ‘0.8.7’
>>> library(Rmpfr)
>> Loading required package: gmp
>> 
>> Attaching package: ‘gmp’
>> 
>> The following objects are masked from ‘package:base’:
>> 
>>    %*%, apply, crossprod, matrix, tcrossprod
>> 
>> C code of R package 'Rmpfr': GMP using 64 bits per limb
>> 
>> 
>> Attaching package: ‘Rmpfr’
>> 
>> The following object is masked from ‘package:gmp’:
>> 
>>    outer
>> 
>> The following objects are masked from ‘package:stats’:
>> 
>>    dbinom, dgamma, dnbinom, dnorm, dpois, dt, pnorm
>> 
>> The following objects are masked from ‘package:base’:
>> 
>>    cbind, pmax, pmin, rbind
>> 
>>> x1 <- mpfr(-50, 200)
>>> x1
>> 1 'mpfr' number of precision  200   bits
>> [1] -50
>>> x2 <- mpfr(-50.1, 200)
>>> x2
>> 1 'mpfr' number of precision  200   bits
>> [1] -50.10000000000000142108547152020037174224853515625
>>> version
>>               _
>> platform       aarch64-apple-darwin20
>> arch           aarch64
>> os             darwin20
>> system         aarch64, darwin20
>> status
>> major          4
>> minor          1.2
>> year           2021
>> month          11
>> day            01
>> svn rev        81115
>> language       R
>> version.string R version 4.1.2 (2021-11-01)
>> nickname       Bird Hippie
>>> 
>> 
>>> On Nov 27, 2021, at 15:46, Dev Chakraborty <dpc10ster using gmail.com> wrote:
>>> 
>>> I used package Rmpfr ca. 2017 and it worked fine. The latest version
>>> (0.8-7) causes R (running under RStudio) to crash. A simple example is:
>>> 
>>> library(Rmpfr)
>>> x1 <- mpfr(-50, 200)
>>> x2 <- mpfr(-50.1, 200)
>>> 
>>> Which gives the message:
>>> 
>>> R Session Aborted
>>> R encountered a fatal error
>>> The session was terminated
>>> Start New Session
>>> 
>>> I am using R version 4.1.1 on a Mac running MacOS 12.0.1. and an older
>> iMac
>>> running 10.15.7. The problem occurs with both machines.
>>> 
>>> When I install from the CRAN archive file  Rmpfr_0.6-1.tar.gz (the
>> version
>>> of the package around 2017, corresponding to the last time I used it) the
>>> problem goes away.
>>> 
>>>      [[alternative HTML version deleted]]
>>> 
>>> _______________________________________________
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac using r-project.org
>>> 
>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-mac&data=04%7C01%7Crmh%40temple.edu%7C3aabc743f322409d6fa308d9b259a7bb%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637736920545174898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=pNPM8x8q1%2BQxq4QevSbfjlcO44vDVEyUvsRlfDBfgBo%3D&reserved=0
>> 
>> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 



More information about the R-SIG-Mac mailing list