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

Richard M. Heiberger rmh @end|ng |rom temp|e@edu
Wed May 26 01:25:35 CEST 2021


1. I don't understand the issue well enough to file a bug.
I do have Xcode.  Why wasn't it found?

I just clicked on Xcode.app and it wants to install more stuff.
I clicked "install" and it did something with a green bar movimg to the right
and then welcomed me to Xcode 12.5 (12E262).
It wants me to do something about a project, which I am not going to do, so I will just close Xcode.

I quit R and the started R and then library(tcltk).
It gave the same messages about xcrun and otool.
Consequently I don't know if the install button on Xcode actually installed anything.
The Finder in Applications shows May 3, 2021 which is three weeks ago, not today.
This suggests to me I should issue an xcode command somewhere so it can find those things.
Perhaps you could change the warning to give information on what to type where (in the terminal app?,
in the Xcode app?,  as a system("") command from within R?)

2. The instruction on the CRAN page about XQuartz says to upgrade for a new macOS.
I don't have a new macOS.  I am at Big Sur 11.3..  I upgraded to
a new R major version from 4.0.4 to 4.1.0.  Should the instruction say to upgrade XQuartz when I
upgrade to a new R major version?

Rich

> On May 25, 2021, at 19:00, Simon Urbanek <simon.urbanek using R-project.org> wrote:
> 
> 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%7C16857f63f22d4631e94808d91fd0de1d%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637575804226218839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=9CVLS1HXFUw%2F2p3UWobJa%2BMj3oKtOOq9RF%2BvS%2FrljdE%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%7C16857f63f22d4631e94808d91fd0de1d%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637575804226218839%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=9CVLS1HXFUw%2F2p3UWobJa%2BMj3oKtOOq9RF%2BvS%2FrljdE%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%7C16857f63f22d4631e94808d91fd0de1d%7C716e81efb52244738e3110bd02ccf6e5%7C0%7C0%7C637575804226228803%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=lJ3QeyVfJzCebqvKS1QeaAbYQMiTYO2L74DHaDvEXIQ%3D&reserved=0



More information about the R-SIG-Mac mailing list