[R-SIG-Mac] Advise on building R on OSX without optimization for debugging

Prof Brian Ripley r|p|ey @end|ng |rom @t@t@@ox@@c@uk
Mon Jul 13 09:59:11 CEST 2020


On 08/07/2020 21:38, Simon Urbanek wrote:
> Dmitriy,
> 
> due to permissions and the various limitations on passing environment variables across processes it is often easier to simply run R and attach the debugger to it:
> 
> $ R
> [...]
>> Sys.getpid()
> [1] 89955
>>
> 
> $ sudo lldb
> Password:
> (lldb) attach 89955
> [...]
> (lldb) c
> Process 89955 resuming

On Catalina I can do that for a version of R I compiled, but not for a 
notarized binary distribution (which also refuses to be run under a 
debugger).  The lldb error message is maximally uninformative:

(lldb) attach 16682
error: attach failed: Error 1

or

(lldb) run
error: process exited with status -1 (Error 1)

I presume that is intentional on Apple's part and there is no way round 
it other than weakening security (e.g. disable SIP)?

My memory was that it did work on High Sierra (I sometimes use it to 
investigate packages which segfault under your distribution but not with 
my builds) and I have just re-checked there with the CRAN distribution 
of 4.0.2.

Brian Ripley

-- 
Brian D. Ripley,                  ripley using stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford



More information about the R-SIG-Mac mailing list