[R-SIG-Mac] How to workaround RStudio issues

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Tue Jun 18 20:59:00 CEST 2024


An update:  The RStudio bug that causes problems here is triggered by 
setting  "Automatically activate project-local Python environments" in 
the Python global option.  Unsetting that checkbox stops /usr/local/bin 
from being prepended.

I've decided not to try to work around this in rgl's configure script.

Duncan Murdoch


On 2024-06-15 2:13 p.m., Duncan Murdoch wrote:
> RStudio is causing problems for rgl builds.  In particular, on my M3
> system, I have installed the arm64 binaries and tools in
> /opt/R/arm64/bin as recommended, and builds work fine if I run them in a
> shell with that directory first in the PATH.
> 
> However, when I try to do builds in RStudio, they fail.  I think this is
> because it prepends /usr/local/bin to my PATH before configuring, and
> the rgl configure script finds the x86_64 versions of some files before
> the arm64 ones, and they don't work.  So then rgl thinks I don't have
> X11 libs available, and builds as though I don't.
> 
> This isn't the right place to ask how to fix RStudio.  I've already done
> that in one of their forums, and I already know how to build rgl outside
> of it.  However, I do get complaints from users who try to build rgl and
> have the builds fail (e.g. https://github.com/dmurdoch/rgl/issues/423),
> and I'd like to make the configure script resilient against this sort of
> problem.  (And this might not be RStudio specific:  there are lots of
> ways to end up with a PATH that doesn't have things in the right order.)
> 
> So here are my questions:
> 
>    - What is the correct way in a package configure script (or
> configure.ac, since I use autoconf) to determine that the build is
> happening on an arm64 Mac?
> 
>    - Is it correct in a configure script to force the arm64 directory to
> be first?  If so, how do I do that?
> 
>    - How do I determine if the user really did install the arm64 files to
> /opt/R/arm64/bin?
> 
>    - Should I really be doing this, or is my system broken since my
> /usr/local/bin directory contains things it shouldn't, or should I just
> tell people to put /opt/R/arm64/bin first in their PATH?
> 
> Duncan Murdoch



More information about the R-SIG-Mac mailing list