[R-SIG-Mac] rgl in R version 4.1.1 Patched (2021-08-13 r80752)
@|mon@urb@nek @end|ng |rom R-project@org
Fri Aug 20 02:57:32 CEST 2021
using that checkout I get
* checking package dependencies ... ERROR
Package suggested but not available: ‘webshot2’
but otherwise it works as advertised.
However, I just found out that there is another problem in R that rgl exposed. Using non-session terminal:
> png("/tmp/1.png", type="quartz")
Warning in axis(side = side, at = at, labels = labels, ...) :
no font could be found for family "Arial"
so requests for fonts using Quartz-back-end without an UI session fail. It works fine inside a session, but since checks are normally run without a session that explains the check failures. I can run checks in a session, so I think that's what I'll do for now.
Now, back to rgl - so checks can be run in a session, but oddly, rgl manages to segfault XQuartz in the checks. I don't think it's rgl's fault - more likely something in XQuartz (a TCP connection shouldn't be able to segfault the other end...).
Anyway, so if you can post the fixed release I'd be happy the recompile and publish manually.
PS: I found yet another problem - XQuartz has moved the location of fonts from X11/lib to X11/shared so our fontconfig configuration in R needs to add that directory as well. So all is all this has highlighted quite a few related issues ;)
> On Aug 20, 2021, at 11:43 AM, Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
> Thanks Simon (and Prof Ripley, offline). The --static modifier needs to be added in two places in configure.ac, which leads to it being added in two places in configure.
> If anyone wants to build from source, you could get the CRAN release plus this modification using
> remotes::install_github("dmurdoch/rgl using configpatch")
> Duncan Murdoch
> On 19/08/2021 6:08 p.m., Simon Urbanek wrote:
>> R (and the CRAN builds) use more recent static freetype with harfbuzz support so it does not depend for those in XQuartz.
>> The issue is that rgl doesn't use sufficient flags to compile against freetype since it misses the dependencies - in fact is fails checks,
>> pkg-config has to be used with --static --libs otherwise the linking doesn't have all the dependencies included that are necessary:
>> $ pkg-config freetype2 --libs
>> -L/opt/R/arm64/lib -lfreetype
>> $ pkg-config freetype2 --static --libs
>> -L/opt/R/arm64/lib -lfreetype -lbz2 -lpng16 -lz -lharfbuzz -lm -lglib-2.0 -lintl -liconv -lm -Wl,-framework,CoreFoundation -Wl,-framework,Carbon -Wl,-framework,Foundation -Wl,-framework,AppKit -lpcre
>> The CRAN binaries are built against static libraries to make sure the user doesn't have to install 3rd party dependencies.
>> It looks line rgl does the right thing for libpng but not for freetype.
>>> On Aug 19, 2021, at 9:54 PM, Stefan Evert <stefanML using collocations.de> wrote:
>>>> On 19 Aug 2021, at 10:40, Duncan Murdoch <murdoch.duncan using gmail.com> wrote:
>>>>> Error in dyn.load(dynlib <- getDynlib(dir)) :
>>>>> unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so':
>>>>> dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so, 6): Symbol not found: _hb_buffer_add_utf8
>>>>> Referenced from: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so
>>>>> Expected in: flat namespace
>>>>> in /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/rgl/libs/rgl.so
>>>> That looks like a symbol in the harfbuzz lib. rgl doesn't reference it directly, I think FreeType does. I don't know what you need to do to fix this, but maybe that's enough of a hint.
>>> I just ran into the same problem with a M1 MacBook and XQuartz 2.8.1 installed. My MacBook has no developer tools installed, not even XCode – just R, "rgl" (and various other packages) from CRAN, and XQuartz.
>>> XQuartz doesn't include libharfbuzz, so I doubt that it's libfreetype depends on it. Any chance that the CRAN machine that builds the aarch64 binary package links against some other version of freetype that pulls in the dependency?
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac using r-project.org
More information about the R-SIG-Mac