[R-SIG-Mac] lldb not finding libRblas.dylib

3 views
Skip to first unread message

Duncan Murdoch

unread,
Apr 25, 2022, 9:09:43 AM4/25/22
to R-SIG-Mac
I wanted to debug an error in my attempt to fix PR#18328, but I can't
seem to run R under lldb:


murdoch@djmair3 ~/R/R-devel
$ bin/R -d lldb
(lldb) target create "/Users/murdoch/R/R-devel/bin/exec/R"
Current executable set to '/Users/murdoch/R/R-devel/bin/exec/R' (x86_64).
(lldb) run
Process 98432 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 98432 stopped
* thread #1, stop reason = signal SIGABRT
    frame #0: 0x00000001004fe05e dyld`__abort_with_payload + 10
dyld`__abort_with_payload:
->  0x1004fe05e <+10>: jae    0x1004fe068               ; <+20>
    0x1004fe060 <+12>: movq   %rax, %rdi
    0x1004fe063 <+15>: jmp    0x1004fc588               ; cerror_nocancel
    0x1004fe068 <+20>: retq
Target 0: (R) stopped.

This is on an Intel Mac running Catalina, 10.15.7.  I have the current
svn source, r82250, with only src/main/gram.c and src/main/gram.y
changed.  If I look in the R-devel directory after building, I do find
the file:

$ find . -name libRblas.dylib
./lib/libRblas.dylib
./src/extra/blas/libRblas.dylib

Can anyone suggest what is going wrong?

Duncan Murdoch

_______________________________________________
R-SIG-Mac mailing list
R-SI...@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Prof Brian Ripley

unread,
Apr 25, 2022, 9:26:58 AM4/25/22
to Duncan Murdoch, R-SIG-Mac
Looks like §4.4.3 of R-exts. Have you tried the workarounds there?

I almost always attach a debugger on macOS, as suggested there.

I believe this is a self-build, but

https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#I-cannot-attach-debugger-to-R

is worth knowing about if you ever want to debug a binary version of R.

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

Duncan Murdoch

unread,
Apr 25, 2022, 12:14:44 PM4/25/22
to Prof Brian Ripley, R-SIG-Mac
Thanks, that worked.

BTW, I think there's a typo in the manual. In the suggestion to connect
to a running process it says

pw -ef | grep exec/R
# identify the pid pid for the next command

I think that should be "ps", not "pw". And for rare ps users like me,
it might be worth mentioning that the pid is the second value reported,
since the grep removes the title line.

Duncan Murdoch
Reply all
Reply to author
Forward
0 new messages