Thank you, especially for the R-admin link and link to the underlying issue.

This is macOS Monterey version 12.6.5, so I am stuck with rebuilding -- 
empirically it seems like make distclean && <reconfigure> && make all is 
needed. This doesn't seem to make sense (shouldn't `make clean` remove all the 
compiled libraries?) so I'll investigate a bit more; maybe it is because I do 
not `make install`? I know there is no value in papering over upstream issues, 
but wonder if I were to unlink all (or some?) *so / *dylib before `make all` 
would be effective?

After the fact I realized that the R-SIG-mac mailing list might have been more 
appropriate, but I did not see the issue discussed there.

Martin

From: Prof Brian Ripley <rip...@stats.ox.ac.uk>
Date: Wednesday, May 31, 2023 at 3:46 AM
To: Martin Morgan <mtmorgan.b...@gmail.com>
Cc: Tomas Kalibera <tomas.kalib...@gmail.com>, R-devel <R-devel@r-project.org>
Subject: Re: [Rd] Building R from source always fails on 
tools:::sysdata2LazyLoadDB
On 30/05/2023 22:57, Martin Morgan wrote:
> Thanks Ivan & Tomas
>
> A simpler way to trigger the problem is library(tools) or 
> library.dynam("tools", "tools", ".") so I guess it is loading src/tools.so
>
> Ivan, adding -d lldb I need to tell lldb where to find the R library
>
> (lldb) process launch --environment 
> DYLD_LIBRARY_PATH=/Users/ma38727/bin/R-devel/lib
>
> And then `library(tools)` works. To run lldb I needed to grant Xcode 
> permissions using my local administrator account.
>
> @Thomas I can't see anything in the Console app logs, but this might be 
> partly my ineptitude.

Which version of macOS is this?

- Prior to Ventura it is the known behaviour.

- With Ventura the same happens if any R process from the current build
is in use, even a crashed one. (The latter happened to me this morning:
there were reports under Crash Reports in the Console App.)

As the R-admin manual says

"Updating an �arm64� build may fail because of the bug described at
https://openradar.appspot.com/FB8914243 but ab initio builds work. This
has been far rarer since macOS 13."

Once it happens, you need to rebuild (make clean;make all should suffice).

>
> Martin
>
> From: Tomas Kalibera <tomas.kalib...@gmail.com>
> Date: Tuesday, May 30, 2023 at 4:54 PM
> To: Martin Morgan <mtmorgan.b...@gmail.com>, R-devel <R-devel@r-project.org>
> Subject: Re: [Rd] Building R from source always fails on 
> tools:::sysdata2LazyLoadDB
>
> On 5/30/23 22:09, Martin Morgan wrote:
>> I build my own R from source on an M1 mac. I have a clean svn checkout in 
>> one directory ~/src/R-devel. I switch to ~/bin/R-devel and the first time run
>>
>> cd ~/bin/R-devel
>> ~/src/R-devel/configure --enable-R-shlib 'CFLAGS=-g -O0' 
>> CPPFLAGS=-I/opt/R/arm64/include 'CXXFLAGS=-g -O0'
>> make -j
>>
>> At some point in the future I svn update src/R-devel, then
>>
>> cd ~/bin/R-devel
>> make -j
>>
>> This always ends with
>>
>> installing 'sysdata.rda'
>> /bin/sh: line 1: 99497 Done                    echo 
>> "tools:::sysdata2LazyLoadDB(\"/Users/XXX/src/R-devel/src/library/utils/R/sysdata.rda\",\"../../../library/utils/R\")"
>>        99498 Killed: 9               | R_DEFAULT_PACKAGES=NULL LC_ALL=C 
>> ../../../bin/R --vanilla --no-echo
>> make[4]: *** [sysdata] Error 137
>> make[3]: *** [all] Error 2
>> make[2]: *** [R] Error 1
>> make[1]: *** [R] Error 1
>> make: *** [R] Error 1
>>
>> what am I doing wrong? Is there a graceful way to fix this (my current 
>> solution is basically to start over, with `make distclean`)? If I cd into 
>> ~/bin/R-devel/src/library/utils I can start an interactive session and 
>> reproduce the error
>>
>> ~/bin/R-devel/src/library/utils $   R_DEFAULT_PACKAGES=NULL ../../../bin/R 
>> --vanilla
>>> tools:::sysdata2LazyLoadDB("/Users/ma38727/src/R-devel/src/library/utils/R/sysdata.rda","../../../library/utils/R")
>> zsh: killed     R_DEFAULT_PACKAGES=NULL ../../../bin/R --vanilla
>>
>> or simply
>>
>>> tools:::sysdata2LazyLoadDB
>> zsh: killed     R_DEFAULT_PACKAGES=NULL LC_ALL=C R_ENABLE_JIT=0 TZ=UTC 
>> ../../../bin/R
>
> If it is macOS, it might be worth checking the system logs (Console
> app). It may be some system security feature.
>
> Tomas

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

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to