[R-SIG-Mac] incompatible lldb on mojave?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[R-SIG-Mac] incompatible lldb on mojave?

Vincent Carey
I'd like to make use of material in

https://kevinushey.github.io/blog/2015/04/13/debugging-with-lldb/

But with R 4.0 I get

%vjcair> 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

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

(lldb) quit

%vjcair> which lldb

/usr/bin/lldb

%vjcair> lldb --version

lldb-1100.0.30.12

Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)


with gdb, there is a little more info -- and a peculiar warning that
mentions /Volumes/Builds/Simon/R4/h ...


%vjcair> R -d gdb

GNU gdb (GDB) 8.1

Copyright (C) 2018 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-apple-darwin16.7.0".

Type "show configuration" for configuration details.

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Find the GDB manual and other documentation resources online at:

<http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".

Type "apropos word" to search for commands related to "word"...

Reading symbols from /Library/Frameworks/R.framework/Resources/bin/exec/R...

warning:
`/Volumes/Builds/Simon/R4/high-sierra-x86_64/R-4.0-branch/src/main/Rmain.o':
can't open to read symbols: No such file or directory.

(no debugging symbols found)...done.

(gdb) run

Starting program:
/Library/Frameworks/R.framework/Versions/4.0/Resources/bin/exec/R

Unable to find Mach task port for process-id 59032: (os/kern) failure (0x5).

 (please check gdb is codesigned - see taskgated(8))

> sessionInfo()

R version 4.0.0 Patched (2020-04-27 r78309)

Platform: x86_64-apple-darwin17.0 (64-bit)

Running under: macOS Mojave 10.14.6


Matrix products: default

BLAS:
/Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib

LAPACK:
/Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

--
The information in this e-mail is intended only for the ...{{dropped:18}}

_______________________________________________
R-SIG-Mac mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Reply | Threaded
Open this post in threaded view
|

Re: [R-SIG-Mac] incompatible lldb on mojave?

Simon Urbanek
Vince,

Apple no longer allows debugging of distributed apps - see R for Mac FAQ 10.17:
http://mac.r-project.org/bin/macosx/RMacOSX-FAQ.html#I-cannot-attach-debugger-to-R

Another (not recommended) work-around is to disable SIP.

Cheers,
Simon



> On 3/05/2020, at 10:42 AM, Vincent Carey <[hidden email]> wrote:
>
> I'd like to make use of material in
>
> https://kevinushey.github.io/blog/2015/04/13/debugging-with-lldb/
>
> But with R 4.0 I get
>
> %vjcair> 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
>
> error: process exited with status -1 (Error 1)
>
> (lldb) quit
>
> %vjcair> which lldb
>
> /usr/bin/lldb
>
> %vjcair> lldb --version
>
> lldb-1100.0.30.12
>
> Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
>
>
> with gdb, there is a little more info -- and a peculiar warning that
> mentions /Volumes/Builds/Simon/R4/h ...
>
>
> %vjcair> R -d gdb
>
> GNU gdb (GDB) 8.1
>
> Copyright (C) 2018 Free Software Foundation, Inc.
>
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>>
>
> This is free software: you are free to change and redistribute it.
>
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>
> and "show warranty" for details.
>
> This GDB was configured as "x86_64-apple-darwin16.7.0".
>
> Type "show configuration" for configuration details.
>
> For bug reporting instructions, please see:
>
> <http://www.gnu.org/software/gdb/bugs/>.
>
> Find the GDB manual and other documentation resources online at:
>
> <http://www.gnu.org/software/gdb/documentation/>.
>
> For help, type "help".
>
> Type "apropos word" to search for commands related to "word"...
>
> Reading symbols from /Library/Frameworks/R.framework/Resources/bin/exec/R...
>
> warning:
> `/Volumes/Builds/Simon/R4/high-sierra-x86_64/R-4.0-branch/src/main/Rmain.o':
> can't open to read symbols: No such file or directory.
>
> (no debugging symbols found)...done.
>
> (gdb) run
>
> Starting program:
> /Library/Frameworks/R.framework/Versions/4.0/Resources/bin/exec/R
>
> Unable to find Mach task port for process-id 59032: (os/kern) failure (0x5).
>
> (please check gdb is codesigned - see taskgated(8))
>
>> sessionInfo()
>
> R version 4.0.0 Patched (2020-04-27 r78309)
>
> Platform: x86_64-apple-darwin17.0 (64-bit)
>
> Running under: macOS Mojave 10.14.6
>
>
> Matrix products: default
>
> BLAS:
> /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
>
> LAPACK:
> /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
>
> --
> The information in this e-mail is intended only for th...{{dropped:8}}

_______________________________________________
R-SIG-Mac mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Reply | Threaded
Open this post in threaded view
|

Re: [R-SIG-Mac] incompatible lldb on mojave?

Bob Rudis
Can you provide a bit more info on the setup?

I ask b/c: (more below the snippet)

    $ 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
    Process 3834 launched:
'/Library/Frameworks/R.framework/Resources/bin/exec/R' (x86_64)

    R version 4.0.0 RC (2020-04-21 r78267) -- "Arbor Day"
    Copyright (C) 2020 The R Foundation for Statistical Computing
    Platform: x86_64-apple-darwin17.0 (64-bit)

    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under certain conditions.
    Type 'license()' or 'licence()' for distribution details.

      Natural language support but running in an English locale

    R is a collaborative project with many contributors.
    Type 'contributors()' for more information and
    'citation()' on how to cite R or R packages in publications.

    Type 'demo()' for some demos, 'help()' for on-line help, or
    'help.start()' for an HTML browser interface to help.
    Type 'q()' to quit R.

    > str(mtcars)
    'data.frame':   32 obs. of  11 variables:
     $ mpg : num  21 21 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 ...
     $ cyl : num  6 6 4 6 8 6 8 4 4 6 ...
     $ disp: num  160 160 108 258 360 ...
     $ hp  : num  110 110 93 110 175 105 245 62 95 123 ...
     $ drat: num  3.9 3.9 3.85 3.08 3.15 2.76 3.21 3.69 3.92 3.92 ...
     $ wt  : num  2.62 2.88 2.32 3.21 3.44 ...
     $ qsec: num  16.5 17 18.6 19.4 17 ...
     $ vs  : num  0 0 1 1 0 1 0 1 1 1 ...
     $ am  : num  1 1 1 0 0 0 0 0 0 0 ...
     $ gear: num  4 4 4 3 3 3 3 4 4 4 ...
     $ carb: num  4 4 1 1 2 1 4 2 2 4 ...
    >

I have full Xcode installed and updated to latest (I'm on developer betas).

    $ lldb --version
    lldb-1103.0.17
    Apple Swift version 5.2 (swiftlang-1103.0.22 clang-1103.0.22)

I'm also on a more restrictive OS (Catalina).

Of note: macOS prompted me for permission to use lldb.

-boB

On Sat, May 2, 2020 at 11:26 PM Simon Urbanek
<[hidden email]> wrote:

>
> Vince,
>
> Apple no longer allows debugging of distributed apps - see R for Mac FAQ 10.17:
> http://mac.r-project.org/bin/macosx/RMacOSX-FAQ.html#I-cannot-attach-debugger-to-R
>
> Another (not recommended) work-around is to disable SIP.
>
> Cheers,
> Simon
>
>
>
> > On 3/05/2020, at 10:42 AM, Vincent Carey <[hidden email]> wrote:
> >
> > I'd like to make use of material in
> >
> > https://kevinushey.github.io/blog/2015/04/13/debugging-with-lldb/
> >
> > But with R 4.0 I get
> >
> > %vjcair> 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
> >
> > error: process exited with status -1 (Error 1)
> >
> > (lldb) quit
> >
> > %vjcair> which lldb
> >
> > /usr/bin/lldb
> >
> > %vjcair> lldb --version
> >
> > lldb-1100.0.30.12
> >
> > Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
> >
> >
> > with gdb, there is a little more info -- and a peculiar warning that
> > mentions /Volumes/Builds/Simon/R4/h ...
> >
> >
> > %vjcair> R -d gdb
> >
> > GNU gdb (GDB) 8.1
> >
> > Copyright (C) 2018 Free Software Foundation, Inc.
> >
> > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
> >>
> >
> > This is free software: you are free to change and redistribute it.
> >
> > There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> >
> > and "show warranty" for details.
> >
> > This GDB was configured as "x86_64-apple-darwin16.7.0".
> >
> > Type "show configuration" for configuration details.
> >
> > For bug reporting instructions, please see:
> >
> > <http://www.gnu.org/software/gdb/bugs/>.
> >
> > Find the GDB manual and other documentation resources online at:
> >
> > <http://www.gnu.org/software/gdb/documentation/>.
> >
> > For help, type "help".
> >
> > Type "apropos word" to search for commands related to "word"...
> >
> > Reading symbols from /Library/Frameworks/R.framework/Resources/bin/exec/R...
> >
> > warning:
> > `/Volumes/Builds/Simon/R4/high-sierra-x86_64/R-4.0-branch/src/main/Rmain.o':
> > can't open to read symbols: No such file or directory.
> >
> > (no debugging symbols found)...done.
> >
> > (gdb) run
> >
> > Starting program:
> > /Library/Frameworks/R.framework/Versions/4.0/Resources/bin/exec/R
> >
> > Unable to find Mach task port for process-id 59032: (os/kern) failure (0x5).
> >
> > (please check gdb is codesigned - see taskgated(8))
> >
> >> sessionInfo()
> >
> > R version 4.0.0 Patched (2020-04-27 r78309)
> >
> > Platform: x86_64-apple-darwin17.0 (64-bit)
> >
> > Running under: macOS Mojave 10.14.6
> >
> >
> > Matrix products: default
> >
> > BLAS:
> > /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
> >
> > LAPACK:
> > /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
> >
> > --
> > The information in this e-mail is intended only for th...{{dropped:8}}
>
> _______________________________________________
> R-SIG-Mac mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

_______________________________________________
R-SIG-Mac mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Reply | Threaded
Open this post in threaded view
|

Re: [R-SIG-Mac] incompatible lldb on mojave?

Vincent Carey
Thanks, I am upgrading a machine to catalina and will get back to you.

On Sun, May 3, 2020 at 8:01 AM Bob Rudis <[hidden email]> wrote:

> Can you provide a bit more info on the setup?
>
> I ask b/c: (more below the snippet)
>
>     $ 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
>     Process 3834 launched:
> '/Library/Frameworks/R.framework/Resources/bin/exec/R' (x86_64)
>
>     R version 4.0.0 RC (2020-04-21 r78267) -- "Arbor Day"
>     Copyright (C) 2020 The R Foundation for Statistical Computing
>     Platform: x86_64-apple-darwin17.0 (64-bit)
>
>     R is free software and comes with ABSOLUTELY NO WARRANTY.
>     You are welcome to redistribute it under certain conditions.
>     Type 'license()' or 'licence()' for distribution details.
>
>       Natural language support but running in an English locale
>
>     R is a collaborative project with many contributors.
>     Type 'contributors()' for more information and
>     'citation()' on how to cite R or R packages in publications.
>
>     Type 'demo()' for some demos, 'help()' for on-line help, or
>     'help.start()' for an HTML browser interface to help.
>     Type 'q()' to quit R.
>
>     > str(mtcars)
>     'data.frame':   32 obs. of  11 variables:
>      $ mpg : num  21 21 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 ...
>      $ cyl : num  6 6 4 6 8 6 8 4 4 6 ...
>      $ disp: num  160 160 108 258 360 ...
>      $ hp  : num  110 110 93 110 175 105 245 62 95 123 ...
>      $ drat: num  3.9 3.9 3.85 3.08 3.15 2.76 3.21 3.69 3.92 3.92 ...
>      $ wt  : num  2.62 2.88 2.32 3.21 3.44 ...
>      $ qsec: num  16.5 17 18.6 19.4 17 ...
>      $ vs  : num  0 0 1 1 0 1 0 1 1 1 ...
>      $ am  : num  1 1 1 0 0 0 0 0 0 0 ...
>      $ gear: num  4 4 4 3 3 3 3 4 4 4 ...
>      $ carb: num  4 4 1 1 2 1 4 2 2 4 ...
>     >
>
> I have full Xcode installed and updated to latest (I'm on developer betas).
>
>     $ lldb --version
>     lldb-1103.0.17
>     Apple Swift version 5.2 (swiftlang-1103.0.22 clang-1103.0.22)
>
> I'm also on a more restrictive OS (Catalina).
>
> Of note: macOS prompted me for permission to use lldb.
>
> -boB
>
> On Sat, May 2, 2020 at 11:26 PM Simon Urbanek
> <[hidden email]> wrote:
> >
> > Vince,
> >
> > Apple no longer allows debugging of distributed apps - see R for Mac FAQ
> 10.17:
> >
> http://mac.r-project.org/bin/macosx/RMacOSX-FAQ.html#I-cannot-attach-debugger-to-R
> >
> > Another (not recommended) work-around is to disable SIP.
> >
> > Cheers,
> > Simon
> >
> >
> >
> > > On 3/05/2020, at 10:42 AM, Vincent Carey <[hidden email]>
> wrote:
> > >
> > > I'd like to make use of material in
> > >
> > > https://kevinushey.github.io/blog/2015/04/13/debugging-with-lldb/
> > >
> > > But with R 4.0 I get
> > >
> > > %vjcair> 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
> > >
> > > error: process exited with status -1 (Error 1)
> > >
> > > (lldb) quit
> > >
> > > %vjcair> which lldb
> > >
> > > /usr/bin/lldb
> > >
> > > %vjcair> lldb --version
> > >
> > > lldb-1100.0.30.12
> > >
> > > Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
> > >
> > >
> > > with gdb, there is a little more info -- and a peculiar warning that
> > > mentions /Volumes/Builds/Simon/R4/h ...
> > >
> > >
> > > %vjcair> R -d gdb
> > >
> > > GNU gdb (GDB) 8.1
> > >
> > > Copyright (C) 2018 Free Software Foundation, Inc.
> > >
> > > License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html
> > >>
> > >
> > > This is free software: you are free to change and redistribute it.
> > >
> > > There is NO WARRANTY, to the extent permitted by law.  Type "show
> copying"
> > >
> > > and "show warranty" for details.
> > >
> > > This GDB was configured as "x86_64-apple-darwin16.7.0".
> > >
> > > Type "show configuration" for configuration details.
> > >
> > > For bug reporting instructions, please see:
> > >
> > > <http://www.gnu.org/software/gdb/bugs/>.
> > >
> > > Find the GDB manual and other documentation resources online at:
> > >
> > > <http://www.gnu.org/software/gdb/documentation/>.
> > >
> > > For help, type "help".
> > >
> > > Type "apropos word" to search for commands related to "word"...
> > >
> > > Reading symbols from
> /Library/Frameworks/R.framework/Resources/bin/exec/R...
> > >
> > > warning:
> > >
> `/Volumes/Builds/Simon/R4/high-sierra-x86_64/R-4.0-branch/src/main/Rmain.o':
> > > can't open to read symbols: No such file or directory.
> > >
> > > (no debugging symbols found)...done.
> > >
> > > (gdb) run
> > >
> > > Starting program:
> > > /Library/Frameworks/R.framework/Versions/4.0/Resources/bin/exec/R
> > >
> > > Unable to find Mach task port for process-id 59032: (os/kern) failure
> (0x5).
> > >
> > > (please check gdb is codesigned - see taskgated(8))
> > >
> > >> sessionInfo()
> > >
> > > R version 4.0.0 Patched (2020-04-27 r78309)
> > >
> > > Platform: x86_64-apple-darwin17.0 (64-bit)
> > >
> > > Running under: macOS Mojave 10.14.6
> > >
> > >
> > > Matrix products: default
> > >
> > > BLAS:
> > >
> /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
> > >
> > > LAPACK:
> > >
> /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
> > >
> > > --
> > > The information in this e-mail is intended only for th...{{dropped:8}}
> >
> > _______________________________________________
> > R-SIG-Mac mailing list
> > [hidden email]
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>

--
The information in this e-mail is intended only for the ...{{dropped:18}}

_______________________________________________
R-SIG-Mac mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Reply | Threaded
Open this post in threaded view
|

[R-SIG-Mac] Running R with lldb

Duncan Murdoch
In reply to this post by Simon Urbanek
I'm now successfully building R-devel in /Users/murdoch/R/R-devel.  If I
run it from that directory using

  bin/R -d lldb

it starts, but "run" gives this error:

Process 11165 launched: '/Users/murdoch/R/R-devel/bin/exec/R' (x86_64)
dyld: Library not loaded: libRblas.dylib
   Referenced from: /Users/murdoch/R/R-devel/bin/exec/R
   Reason: image not found
Process 11165 stopped
* thread #1, stop reason = signal SIGABRT
     frame #0: 0x00000001004c7ede dyld`__abort_with_payload + 10
dyld`__abort_with_payload:
->  0x1004c7ede <+10>: jae    0x1004c7ee8               ; <+20>
     0x1004c7ee0 <+12>: movq   %rax, %rdi
     0x1004c7ee3 <+15>: jmp    0x1004c6408               ; cerror_nocancel
     0x1004c7ee8 <+20>: retq
Target 0: (R) stopped.

I can start it from the /Users/murdoch/R/R-devel/lib directory where
libRblas.dylib lives.  Setting DYLD_LIBRARY_PATH or LD_LIBRARY_PATH to
point there doesn't help (either on the bin/R command line or exported).
  Is there some other way to run it from whatever directory I happen to
be in?

Duncan Murdoch

On 02/05/2020 11:26 p.m., Simon Urbanek wrote:

> Vince,
>
> Apple no longer allows debugging of distributed apps - see R for Mac FAQ 10.17:
> http://mac.r-project.org/bin/macosx/RMacOSX-FAQ.html#I-cannot-attach-debugger-to-R
>
> Another (not recommended) work-around is to disable SIP.
>
> Cheers,
> Simon
>
>
>
>> On 3/05/2020, at 10:42 AM, Vincent Carey <[hidden email]> wrote:
>>
>> I'd like to make use of material in
>>
>> https://kevinushey.github.io/blog/2015/04/13/debugging-with-lldb/
>>
>> But with R 4.0 I get
>>
>> %vjcair> 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
>>
>> error: process exited with status -1 (Error 1)
>>
>> (lldb) quit
>>
>> %vjcair> which lldb
>>
>> /usr/bin/lldb
>>
>> %vjcair> lldb --version
>>
>> lldb-1100.0.30.12
>>
>> Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
>>
>>
>> with gdb, there is a little more info -- and a peculiar warning that
>> mentions /Volumes/Builds/Simon/R4/h ...
>>
>>
>> %vjcair> R -d gdb
>>
>> GNU gdb (GDB) 8.1
>>
>> Copyright (C) 2018 Free Software Foundation, Inc.
>>
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>>>
>>
>> This is free software: you are free to change and redistribute it.
>>
>> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
>>
>> and "show warranty" for details.
>>
>> This GDB was configured as "x86_64-apple-darwin16.7.0".
>>
>> Type "show configuration" for configuration details.
>>
>> For bug reporting instructions, please see:
>>
>> <http://www.gnu.org/software/gdb/bugs/>.
>>
>> Find the GDB manual and other documentation resources online at:
>>
>> <http://www.gnu.org/software/gdb/documentation/>.
>>
>> For help, type "help".
>>
>> Type "apropos word" to search for commands related to "word"...
>>
>> Reading symbols from /Library/Frameworks/R.framework/Resources/bin/exec/R...
>>
>> warning:
>> `/Volumes/Builds/Simon/R4/high-sierra-x86_64/R-4.0-branch/src/main/Rmain.o':
>> can't open to read symbols: No such file or directory.
>>
>> (no debugging symbols found)...done.
>>
>> (gdb) run
>>
>> Starting program:
>> /Library/Frameworks/R.framework/Versions/4.0/Resources/bin/exec/R
>>
>> Unable to find Mach task port for process-id 59032: (os/kern) failure (0x5).
>>
>> (please check gdb is codesigned - see taskgated(8))
>>
>>> sessionInfo()
>>
>> R version 4.0.0 Patched (2020-04-27 r78309)
>>
>> Platform: x86_64-apple-darwin17.0 (64-bit)
>>
>> Running under: macOS Mojave 10.14.6
>>
>>
>> Matrix products: default
>>
>> BLAS:
>> /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
>>
>> LAPACK:
>> /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
>>
>> --
>> The information in this e-mail is intended only for t...{{dropped:8}}

_______________________________________________
R-SIG-Mac mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Reply | Threaded
Open this post in threaded view
|

Re: [R-SIG-Mac] Running R with lldb

Prof Brian Ripley
One of the suggestions in

https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Debugging-on-macOS

should help.  Both worked for my build of R-devel yesterday ....


On 05/08/2020 14:25, Duncan Murdoch wrote:

> I'm now successfully building R-devel in /Users/murdoch/R/R-devel.  If I
> run it from that directory using
>
>   bin/R -d lldb
>
> it starts, but "run" gives this error:
>
> Process 11165 launched: '/Users/murdoch/R/R-devel/bin/exec/R' (x86_64)
> dyld: Library not loaded: libRblas.dylib
>    Referenced from: /Users/murdoch/R/R-devel/bin/exec/R
>    Reason: image not found
> Process 11165 stopped
> * thread #1, stop reason = signal SIGABRT
>      frame #0: 0x00000001004c7ede dyld`__abort_with_payload + 10
> dyld`__abort_with_payload:
> ->  0x1004c7ede <+10>: jae    0x1004c7ee8               ; <+20>
>      0x1004c7ee0 <+12>: movq   %rax, %rdi
>      0x1004c7ee3 <+15>: jmp    0x1004c6408               ; cerror_nocancel
>      0x1004c7ee8 <+20>: retq
> Target 0: (R) stopped.
>
> I can start it from the /Users/murdoch/R/R-devel/lib directory where
> libRblas.dylib lives.  Setting DYLD_LIBRARY_PATH or LD_LIBRARY_PATH to
> point there doesn't help (either on the bin/R command line or exported).
>   Is there some other way to run it from whatever directory I happen to
> be in?
>
> Duncan Murdoch
>
> On 02/05/2020 11:26 p.m., Simon Urbanek wrote:
>> Vince,
>>
>> Apple no longer allows debugging of distributed apps - see R for Mac
>> FAQ 10.17:
>> http://mac.r-project.org/bin/macosx/RMacOSX-FAQ.html#I-cannot-attach-debugger-to-R 
>>
>>
>> Another (not recommended) work-around is to disable SIP.
>>
>> Cheers,
>> Simon
>>
>>
>>
>>> On 3/05/2020, at 10:42 AM, Vincent Carey <[hidden email]>
>>> wrote:
>>>
>>> I'd like to make use of material in
>>>
>>> https://kevinushey.github.io/blog/2015/04/13/debugging-with-lldb/
>>>
>>> But with R 4.0 I get
>>>
>>> %vjcair> 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
>>>
>>> error: process exited with status -1 (Error 1)
>>>
>>> (lldb) quit
>>>
>>> %vjcair> which lldb
>>>
>>> /usr/bin/lldb
>>>
>>> %vjcair> lldb --version
>>>
>>> lldb-1100.0.30.12
>>>
>>> Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
>>>
>>>
>>> with gdb, there is a little more info -- and a peculiar warning that
>>> mentions /Volumes/Builds/Simon/R4/h ...
>>>
>>>
>>> %vjcair> R -d gdb
>>>
>>> GNU gdb (GDB) 8.1
>>>
>>> Copyright (C) 2018 Free Software Foundation, Inc.
>>>
>>> License GPLv3+: GNU GPL version 3 or later
>>> <http://gnu.org/licenses/gpl.html
>>>>
>>>
>>> This is free software: you are free to change and redistribute it.
>>>
>>> There is NO WARRANTY, to the extent permitted by law.  Type "show
>>> copying"
>>>
>>> and "show warranty" for details.
>>>
>>> This GDB was configured as "x86_64-apple-darwin16.7.0".
>>>
>>> Type "show configuration" for configuration details.
>>>
>>> For bug reporting instructions, please see:
>>>
>>> <http://www.gnu.org/software/gdb/bugs/>.
>>>
>>> Find the GDB manual and other documentation resources online at:
>>>
>>> <http://www.gnu.org/software/gdb/documentation/>.
>>>
>>> For help, type "help".
>>>
>>> Type "apropos word" to search for commands related to "word"...
>>>
>>> Reading symbols from
>>> /Library/Frameworks/R.framework/Resources/bin/exec/R...
>>>
>>> warning:
>>> `/Volumes/Builds/Simon/R4/high-sierra-x86_64/R-4.0-branch/src/main/Rmain.o':
>>>
>>> can't open to read symbols: No such file or directory.
>>>
>>> (no debugging symbols found)...done.
>>>
>>> (gdb) run
>>>
>>> Starting program:
>>> /Library/Frameworks/R.framework/Versions/4.0/Resources/bin/exec/R
>>>
>>> Unable to find Mach task port for process-id 59032: (os/kern) failure
>>> (0x5).
>>>
>>> (please check gdb is codesigned - see taskgated(8))
>>>
>>>> sessionInfo()
>>>
>>> R version 4.0.0 Patched (2020-04-27 r78309)
>>>
>>> Platform: x86_64-apple-darwin17.0 (64-bit)
>>>
>>> Running under: macOS Mojave 10.14.6
>>>
>>>
>>> Matrix products: default
>>>
>>> BLAS:
>>> /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
>>>
>>>
>>> LAPACK:
>>> /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
>>>
>>>
>>> --
>>> The information in this e-mail is intended only for t...{{dropped:8}}
>
> _______________________________________________
> R-SIG-Mac mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac


--
Brian D. Ripley,                  [hidden email]
Emeritus Professor of Applied Statistics, University of Oxford

_______________________________________________
R-SIG-Mac mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Reply | Threaded
Open this post in threaded view
|

Re: [R-SIG-Mac] Running R with lldb

Duncan Murdoch
Thanks, attaching to the process seemed simplest.

For others:  the manual talks about doing it with gdb, but the same
syntax works with lldb.  Here's an example:  Start R, then open a new
terminal window:

murdoch@djmair3 ~
$ ps
   PID TTY           TIME CMD
11293 ttys000    0:00.08 -bash
13829 ttys000    0:00.31 /Users/murdoch/R/R-devel/bin/exec/R
13804 ttys001    0:00.03 -bash

murdoch@djmair3 ~
$ lldb -p 13829
(lldb) process attach --pid 13829
Process 13829 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
     frame #0: 0x00007fff70eb10fe libsystem_kernel.dylib`__select + 10
libsystem_kernel.dylib`__select:
->  0x7fff70eb10fe <+10>: jae    0x7fff70eb1108            ; <+20>
     0x7fff70eb1100 <+12>: movq   %rax, %rdi
     0x7fff70eb1103 <+15>: jmp    0x7fff70eaa22d            ; cerror
     0x7fff70eb1108 <+20>: retq
Target 0: (R) stopped.

Duncan Murdoch

On 05/08/2020 10:16 a.m., Prof Brian Ripley wrote:

> One of the suggestions in
>
> https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Debugging-on-macOS
>
> should help.  Both worked for my build of R-devel yesterday ....
>
>
> On 05/08/2020 14:25, Duncan Murdoch wrote:
>> I'm now successfully building R-devel in /Users/murdoch/R/R-devel.  If I
>> run it from that directory using
>>
>>    bin/R -d lldb
>>
>> it starts, but "run" gives this error:
>>
>> Process 11165 launched: '/Users/murdoch/R/R-devel/bin/exec/R' (x86_64)
>> dyld: Library not loaded: libRblas.dylib
>>     Referenced from: /Users/murdoch/R/R-devel/bin/exec/R
>>     Reason: image not found
>> Process 11165 stopped
>> * thread #1, stop reason = signal SIGABRT
>>       frame #0: 0x00000001004c7ede dyld`__abort_with_payload + 10
>> dyld`__abort_with_payload:
>> ->  0x1004c7ede <+10>: jae    0x1004c7ee8               ; <+20>
>>       0x1004c7ee0 <+12>: movq   %rax, %rdi
>>       0x1004c7ee3 <+15>: jmp    0x1004c6408               ; cerror_nocancel
>>       0x1004c7ee8 <+20>: retq
>> Target 0: (R) stopped.
>>
>> I can start it from the /Users/murdoch/R/R-devel/lib directory where
>> libRblas.dylib lives.  Setting DYLD_LIBRARY_PATH or LD_LIBRARY_PATH to
>> point there doesn't help (either on the bin/R command line or exported).
>>    Is there some other way to run it from whatever directory I happen to
>> be in?
>>
>> Duncan Murdoch
>>
>> On 02/05/2020 11:26 p.m., Simon Urbanek wrote:
>>> Vince,
>>>
>>> Apple no longer allows debugging of distributed apps - see R for Mac
>>> FAQ 10.17:
>>> http://mac.r-project.org/bin/macosx/RMacOSX-FAQ.html#I-cannot-attach-debugger-to-R
>>>
>>>
>>> Another (not recommended) work-around is to disable SIP.
>>>
>>> Cheers,
>>> Simon
>>>
>>>
>>>
>>>> On 3/05/2020, at 10:42 AM, Vincent Carey <[hidden email]>
>>>> wrote:
>>>>
>>>> I'd like to make use of material in
>>>>
>>>> https://kevinushey.github.io/blog/2015/04/13/debugging-with-lldb/
>>>>
>>>> But with R 4.0 I get
>>>>
>>>> %vjcair> 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
>>>>
>>>> error: process exited with status -1 (Error 1)
>>>>
>>>> (lldb) quit
>>>>
>>>> %vjcair> which lldb
>>>>
>>>> /usr/bin/lldb
>>>>
>>>> %vjcair> lldb --version
>>>>
>>>> lldb-1100.0.30.12
>>>>
>>>> Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
>>>>
>>>>
>>>> with gdb, there is a little more info -- and a peculiar warning that
>>>> mentions /Volumes/Builds/Simon/R4/h ...
>>>>
>>>>
>>>> %vjcair> R -d gdb
>>>>
>>>> GNU gdb (GDB) 8.1
>>>>
>>>> Copyright (C) 2018 Free Software Foundation, Inc.
>>>>
>>>> License GPLv3+: GNU GPL version 3 or later
>>>> <http://gnu.org/licenses/gpl.html
>>>>>
>>>>
>>>> This is free software: you are free to change and redistribute it.
>>>>
>>>> There is NO WARRANTY, to the extent permitted by law.  Type "show
>>>> copying"
>>>>
>>>> and "show warranty" for details.
>>>>
>>>> This GDB was configured as "x86_64-apple-darwin16.7.0".
>>>>
>>>> Type "show configuration" for configuration details.
>>>>
>>>> For bug reporting instructions, please see:
>>>>
>>>> <http://www.gnu.org/software/gdb/bugs/>.
>>>>
>>>> Find the GDB manual and other documentation resources online at:
>>>>
>>>> <http://www.gnu.org/software/gdb/documentation/>.
>>>>
>>>> For help, type "help".
>>>>
>>>> Type "apropos word" to search for commands related to "word"...
>>>>
>>>> Reading symbols from
>>>> /Library/Frameworks/R.framework/Resources/bin/exec/R...
>>>>
>>>> warning:
>>>> `/Volumes/Builds/Simon/R4/high-sierra-x86_64/R-4.0-branch/src/main/Rmain.o':
>>>>
>>>> can't open to read symbols: No such file or directory.
>>>>
>>>> (no debugging symbols found)...done.
>>>>
>>>> (gdb) run
>>>>
>>>> Starting program:
>>>> /Library/Frameworks/R.framework/Versions/4.0/Resources/bin/exec/R
>>>>
>>>> Unable to find Mach task port for process-id 59032: (os/kern) failure
>>>> (0x5).
>>>>
>>>> (please check gdb is codesigned - see taskgated(8))
>>>>
>>>>> sessionInfo()
>>>>
>>>> R version 4.0.0 Patched (2020-04-27 r78309)
>>>>
>>>> Platform: x86_64-apple-darwin17.0 (64-bit)
>>>>
>>>> Running under: macOS Mojave 10.14.6
>>>>
>>>>
>>>> Matrix products: default
>>>>
>>>> BLAS:
>>>> /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.dylib
>>>>
>>>>
>>>> LAPACK:
>>>> /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
>>>>
>>>>
>>>> --
>>>> The information in this e-mail is intended only for t...{{dropped:8}}
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
>

_______________________________________________
R-SIG-Mac mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac