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

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Mon Apr 25 18:14:21 CEST 2022


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


On 25/04/2022 9:26 a.m., Prof Brian Ripley wrote:
> On 25/04/2022 14:09, Duncan Murdoch wrote:
>> I wanted to debug an error in my attempt to fix PR#18328, but I can't
>> seem to run R under lldb:
>>
>>
>> murdoch using 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?
> 
> 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.
>



More information about the R-SIG-Mac mailing list