Skip to content

R not running under lldb? (osx)

4 messages · Tim Keitt, Simon Urbanek

#
I see:

Tims-Air:~ tkeitt$ R --version

R version 3.6.3 (2020-02-29) -- "Holding the Windsock"

Copyright (C) 2020 The R Foundation for Statistical Computing

Platform: x86_64-apple-darwin15.6.0 (64-bit)


R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under the terms of the

GNU General Public License versions 2 or 3.

For more information about these matters see

https://www.gnu.org/licenses/.


Tims-Air:~ tkeitt$ R -d lldb

(lldb) target create "/Library/Frameworks/R.framework/Resources/bin/exec/R"

Current executable set to
'/Library/Frameworks/R.framework/Resources/bin/exec/R' (x86_64).

(lldb) run --vanilla

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

Never happened before. Is this a known issue?

Thanks.

THK
#
Tim,

as a security precaution Apple has disabled the ability to debug notarized applications*. It means any software distributed on macOS Catalina (and they may have retro-actively enabled it for recent updates of Mojave) cannot be run in a debugger.

If you want to debug R, you have to use non-release binaries that are not notarized and install them by hand, e.g.:

curl -L http://mac.r-project.org/high-sierra/R-4.0-branch/x86_64/R-4.0-branch.tar.gz | tar fxz - -C /

Of course, this disables the Apple protections and thus is not recommended for casual users. 

Cheers,
Simon

* - more technical details: Apple requires notarization of any application that will be distributed via an Apple installer. Apple no longer allows installation of macOS applications that are not notarized. In order to obtain notarization, the application has to be fully signed, has to use hardened run-time and may not enable debugging entitlements. One part of the hardened run-time is that no debugger is allowed to attach to the application.
#
Thanks Simon. I'll probably just switch to rocker when needing to debug in
that case.

THK

On Tue, Apr 21, 2020 at 6:51 PM Simon Urbanek <simon.urbanek at r-project.org>
wrote:

  
  
#
Tim,

sure, make sense (it's also easier to use ASAN and friends that way). The only issue is that it won't work for mcOS-specific bugs.

Cheers,
Simon