[R-SIG-Mac] [External] tcltk on M1 mac?

Simon Urbanek @|mon@urb@nek @end|ng |rom R-project@org
Wed May 26 01:00:11 CEST 2021


Rich,

I think tcltk attempts to find the location of the libraries via otool from Xcode tools so it can tell you to install the missing libraries if you didn't (otherwise it would just crash). I agree that it may be worthwhile to just silence the warning when you are missing xcrun, since XCode is not a requirement at run time, so you can file a bug report. It's just a benign warning since the non-existence of xcrun doesn't prevent from running eventually.

As for XQuartz, we already do say that explicitly on the CRAN page (with a link to XQuartz 2.8.1):
"Note: the use of X11 (including tcltk) requires XQuartz. Always re-install XQuartz when upgrading your macOS to a new major version."

Cheers,
Simon



> On 26/05/2021, at 4:20 AM, Richard M. Heiberger <rmh using temple.edu> wrote:
> 
> I just upgraded from XQuartz 2.7.11 to the current 2.8.1, and then rebooted the Mac M1.
> 
> tcltk now loads and gives warnings:
> 
> 
> R version 4.1.0 Patched (2021-05-23 r80364) -- "Camp Pontanezen"
> Copyright (C) 2021 The R Foundation for Statistical Computing
> Platform: aarch64-apple-darwin20 (64-bit)
> 
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
> 
>  Natural language support but running in an English locale
> 
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
> 
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
> 
>> setwd('/Users/rmh/Rwd/')
>> library(tcltk)
> xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
> Warning message:
> In system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE) :
>  running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/Resources/library/tcltk/libs//tcltk.so'' had status 1
>> search()
> [1] ".GlobalEnv"        "package:tcltk"     "ESSR"             
> [4] "package:stats"     "package:graphics"  "package:grDevices"
> [7] "package:utils"     "package:datasets"  "package:methods"  
> [10] "Autoloads"         "package:base"     
>> 
> 
> 
> There are fewer messages than before.
> tcltk now loads with warnings.
> Rcmdr now loads.
> 
> What should I do about xcrun and otool?
> 
> Simon, can you add a note to the CRAN download page that XQuartz 2.8.1 is needed for the Mac M1.
> 
> Rich
> 
> 
>> On May 25, 2021, at 01:36, Simon Urbanek <simon.urbanek using r-project.org> wrote:
>> 
>> Rich,
>> you need to instal XQuartz (see instructions on the CRAN page).
>> Cheers,
>> Simon
>> 
>> 
>> 
>>> On 25/05/2021, at 4:02 PM, Richard M. Heiberger <rmh using temple.edu> wrote:
>>> 
>>> I am not seeing tcltk in either the released R
>>> R version 4.1.0 (2021-05-18) -- "Camp Pontanezen"
>>> Copyright (C) 2021 The R Foundation for Statistical Computing
>>> Platform: aarch64-apple-darwin20 (64-bit)
>>> 
>>> 
>>> or the nightly
>>> R version 4.1.0 Patched (2021-05-23 r80364) -- "Camp Pontanezen"
>>> Copyright (C) 2021 The R Foundation for Statistical Computing
>>> Platform: aarch64-apple-darwin20 (64-bit)
>>> 
>>> that I just downloaded.
>>> 
>>> Here is the transcript
>>> 
>>> R version 4.1.0 Patched (2021-05-23 r80364) -- "Camp Pontanezen"
>>> Copyright (C) 2021 The R Foundation for Statistical Computing
>>> Platform: aarch64-apple-darwin20 (64-bit)
>>> 
>>> R is free software and comes with ABSOLUTELY NO WARRANTY.
>>> You are welcome to redistribute it under certain conditions.
>>> Type 'license()' or 'licence()' for distribution details.
>>> 
>>> Natural language support but running in an English locale
>>> 
>>> R is a collaborative project with many contributors.
>>> Type 'contributors()' for more information and
>>> 'citation()' on how to cite R or R packages in publications.
>>> 
>>> Type 'demo()' for some demos, 'help()' for on-line help, or
>>> 'help.start()' for an HTML browser interface to help.
>>> Type 'q()' to quit R.
>>> 
>>>> setwd('/Users/rmh/Rwd/')
>>>> library(tcltk)
>>> xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
>>> Error: package or namespace load failed for ‘tcltk’:
>>> .onLoad failed in loadNamespace() for 'tcltk', details:
>>> call: dyn.load(file, DLLpath = DLLpath, ...)
>>> error: unable to load shared object '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tcltk/libs/tcltk.so':
>>> dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tcltk/libs/tcltk.so, 10): Library not loaded: /opt/X11/lib/libX11.6.dylib
>>> Referenced from: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tcltk/libs/tcltk.so
>>> Reason: no suitable image found.  Did find:
>>> 	/opt/X11/lib/libX11.6.dylib: no matching architecture in universal wrapper
>>> 	/opt/X11/lib/libX11.6.dylib: no matching architecture in universal wrapper
>>> In addition: Warning message:
>>> In system2("/usr/bin/otool", c("-L", shQuote(DSO)), stdout = TRUE) :
>>> running command ''/usr/bin/otool' -L '/Library/Frameworks/R.framework/Resources/library/tcltk/libs//tcltk.so'' had status 1
>>>> 
>>> 
>>> 
>>>> On May 14, 2021, at 19:57, Simon Urbanek <simon.urbanek using r-project.org> wrote:
>>>> 
>>>> 
>>>> Vince,
>>>> 
>>>> please try the latest build, Tcl/Tk should be included now.
>>>> 
>>>> Thanks,
>>>> Simon
>>>> 
>>>> 
>>>> 
>>>>> On May 14, 2021, at 7:45 AM, Simon Urbanek <simon.urbanek using R-project.org> wrote:
>>>>> 
>>>>> Vince,
>>>>> 
>>>>> Thanks for the report, yes, that is a known problem, because the R installer for arm64 doesn't include Tcl/Tk unlike the Intel version. It is a long story, but I hope to update the installer soon.
>>>>> 
>>>>> Thanks,
>>>>> Simon
>>>>> 
>>>>> 
>>>>>> On May 14, 2021, at 02:47, Vincent Carey <stvjc using channing.harvard.edu> wrote:
>>>>>> 
>>>>>> I can't seem to get tcltk running with R on M1 machine.  Homebrew tcltk
>>>>>> seems to have wrong architecture; attempt to build from source does not
>>>>>> help.  Any hints appreciated.
>>>>>> 
>>>>>> 
>>>>>> R version 4.1.0 RC (2021-05-10 r80283) -- "Camp Pontanezen"
>>>>>> 
>>>>>> Copyright (C) 2021 The R Foundation for Statistical Computing
>>>>>> 
>>>>>> Platform: aarch64-apple-darwin20 (64-bit)
>>>>>> 
>>>>>> 
>>>>>>> library(tcltk)
>>>>>> 
>>>>>> *Error: package or namespace load failed for 'tcltk':*
>>>>>> 
>>>>>> * .onLoad failed in loadNamespace() for 'tcltk', details:*
>>>>>> 
>>>>>> *  call: dyn.load(file, DLLpath = DLLpath, ...)*
>>>>>> 
>>>>>> *  error: unable to load shared object
>>>>>> '/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tcltk/libs/tcltk.so':*
>>>>>> 
>>>>>> *
>>>>>> dlopen(/Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tcltk/libs/tcltk.so,
>>>>>> 10): Library not loaded: /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl*
>>>>>> 
>>>>>> *  Referenced from:
>>>>>> /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/library/tcltk/libs/tcltk.so*
>>>>>> 
>>>>>> *  Reason: image not found*
>>>>>> 
>>>>>> -- 
>>>>>> The information in this e-mail is intended only for the ...{{dropped:18}}
>>>>>> 
>>>>>> _______________________________________________
>>>>>> R-SIG-Mac mailing list
>>>>>> R-SIG-Mac using r-project.org
>>>>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-mac&data=04%7C01%7Crmh%40temple.edu%7C6f49e75a58184914818508d91f3f074a%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637575178159233703%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=BRBubyTAu8ZhGQ%2BXNDXgqkg37j1Q8rMH32Y7okcaLVE%3D&reserved=0
>>>>> 
>>>> 
>>>> _______________________________________________
>>>> R-SIG-Mac mailing list
>>>> R-SIG-Mac using r-project.org
>>>> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-mac&data=04%7C01%7Crmh%40temple.edu%7C6f49e75a58184914818508d91f3f074a%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637575178159233703%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=BRBubyTAu8ZhGQ%2BXNDXgqkg37j1Q8rMH32Y7okcaLVE%3D&reserved=0
> 
> _______________________________________________
> 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