[R-SIG-Mac] build R for macOS with binary compatibility with CRAN
Jonathon Love
jon @end|ng |rom thon@cc
Fri Jan 10 10:41:23 CET 2020
hi simon,
it's been interesting looking at all your install_name_tool patching ...
i've been doing something very similar with jamovi (and jasp before
that), where we ship an embedded version of R inside the app bundle. in
my case, i have to patch all the paths to be relative (i.e.
@executable_path/../.. etc). because the user can put an app bundle at
any path.
one thing that you do with the macOS R, is bundle the libc++.1.dylib and
the libc++abi.1.dylib from /usr/lib ... but i don't think this is
necessary. the strategy i've taken is to copy every dependency *except*
those from /usr/lib ... my projects would have user bases in the 10's of
thousands, if not 100's of thousands, and it hasn't been a problem so far.
are you sure you need to bundle the libc++ and libc++abi .dylibs?
kind regards
jonathon
On 10/1/20 13:52, Simon Urbanek wrote:
> Jonathon,
>
> when you build R it requires the compiler runtime libraries from /usr/local. We don't want to require users to install compilers just to run R, so we supply copies of those runtime libraries in the lib directory.
> You can replicate the way CRAN R is built using the CRAN build scripts in https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R-build
>
> There is a lot going on and there are many special cases for all the compiler generations we were using over the years, but I think the main part to look at for what you refer to is
> https://svn.r-project.org/R-dev-web/trunk/QA/Simon/R-build/fixpathR
>
> Cheers,
> Simon
>
>
>
>> On Jan 9, 2020, at 5:38 PM, Jonathon Love <jon using thon.cc> wrote:
>>
>> hi,
>>
>> i've successfully built R for macOS, and it all works well, however i'm wanting to achieve compatibility with the prebuilt .tgz CRAN R packages.
>>
>> the compatibility issue i've been having is that the R produced lacks the Resources/lib/libc++.1.dylib. the prebuilt CRAN R packages link to this, and can't find it at runtime.
>>
>> i'm wondering where this file (and a few other files in Resources/lib) that ship with the official CRAN R binary come from - because i don't think they're from the build process of R.
>>
>> it looks like the official binary is subject to a few additional build steps (copying binaries in, etc.)?
>>
>> with thanks
>>
>> jonathon
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac using r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
More information about the R-SIG-Mac
mailing list