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

Dmitriy Selivanov @e||v@nov@dm|tr|y @end|ng |rom gm@||@com
Wed Jul 8 13:08:06 CEST 2020


Dear all,

I'm trying to debug a segfault reported here
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17850 (thanks Kevin for
the nice article
https://kevinushey.github.io/blog/2015/04/13/debugging-with-lldb/ about
debugging with lldb)

I need to compile R without optimization (with the O0 flag) instead of
using binaries provided by Simon.

Here I have difficulties. What I've tried:

   1. Downloaded latest R-devel from
   https://stat.ethz.ch/R/daily/R-devel.tar.gz
   2. Downloaded xz and pcre2 as suggested here
   https://mac.r-project.org/tools/
   3. run ./confilgure
   4. replaced O2 with O0 in Makeconf
   5. make

Now R is compiled and I can launch it with ./bin/R. However when I run it
with lldb

   1. ./bin/R -d lldb
   2. run

I'm, getting:

Process 74482 launched:
'/Users/dmitry.selivanov/Downloads/R-devel/bin/exec/R' (x86_64)

dyld: Library not loaded: libRblas.dylib

  Referenced from: /Users/dmitry.selivanov/Downloads/R-devel/bin/exec/R

  Reason: image not found

Process 74482 stopped

* thread #1, stop reason = signal SIGABRT

    frame #0: 0x0000000100574ebe dyld`__abort_with_payload + 10

dyld`__abort_with_payload:

->  0x100574ebe <+10>: jae    0x100574ec8               ; <+20>

    0x100574ec0 <+12>: movq   %rax, %rdi

    0x100574ec3 <+15>: jmp    0x1005733e8               ; cerror_nocancel

    0x100574ec8 <+20>: retq

Target 0: (R) stopped.


Any suggestions? Things are much easier on linux-based docker images, but I
can't reproduce the reported bug there...


Regards
Dmitriy Selivanov

	[[alternative HTML version deleted]]



More information about the R-SIG-Mac mailing list