[R-pkg-devel] How to fix Tcl/Tk Error on Mac OS build

David Winsemius dw|n@em|u@ @end|ng |rom comc@@t@net
Tue Apr 26 17:07:30 CEST 2022


Apologies if these items are know to be common knowledge. I have no experience with package development that uses TcL/Tk. My sketchy knowledge comes only from seeing it mentioned on the Mac-specific pages and on R-Mac-SIG mailing list.
 
This appears possibly the most on point since arm build is mentioned in the error log:

On 2021-09-18 2:20 a.m., Prof Brian Ripley wrote:
> On 09/09/2021 19:03, John Fox wrote:
>> Dear Simon, Philippe, and list members,
>> 
>> I've encountered some Tcl/Tk-related issues with the Apple silicon arm64 build of R 4.1.0 for macOS. These issues affect the Rcmdr package, although they don't prevent it from working:
>> 
>> (1) Some fonts that are available for the Intel build appear to be missing from the arm64 build. Compare the screen shots of the Rcmdr main window at <https://socialsciences.mcmaster.ca/jfox/.Pickup/x86_64-apple-darwin17.0.png> (Intel build) and <https://socialsciences.mcmaster.ca/jfox/.Pickup/aarch64-apple-darwin20.png> (arm64 build). This problem is purely aesthetic.
>> 
>> (2) The Tcl/Tk Tktable package is apparently absent from the arm64 build but still present in the Intel build. The Rcmdr detects its absence and suppresses some features (i.e., those requiring the Rcmdr data editor). I understand that the Tktable package is problematic and it may have been removed intentionally.
>> 
>> The Tcl/Tk Tablelist package would be a reasonable substitute, and were it available, I could use it to restore the missing features in the Rcmdr. I'm aware that Philippe Grosjean planned to incorporate Tablelist in his tcltk2 package, but as far as I know, that plan hasn't yet materialized. If I knew how to supply a Tcl/Tk package in an R package, I could put Tablelist directly in the Rcmdr.
>> 
>> Any help would be greatly appreciated.
>> 
>> John
>> 
> To close this circle, Simon has provided
> https://mac.r-project.org/libs-arm64/tcltk-8.6.11-xft-darwin20.4-arm64.pkg
> If you install that, it updates Tk and adds Tktable, solving both problems.  (As the Tcl/Tk installation is shared between R versions, this will fix 4.1.0 as well as 4.1.1.  It will be incorporated in future releases.)


-----

The R for MacOS page says:
-----------

R-4.2.0.pkg (notarized and signed)
SHA1-hash: 2a90fb8629e44f72f9d89d6a9bac9b71564587d7
(ca. 90MB) for Intel Macs	

R 4.2.0 binary for macOS 10.13 (High Sierra) and higher, Intel 64-bit build, signed and notarized package.
Contains R 4.2.0 framework, R.app GUI 1.78 in 64-bit for Intel Macs, Tcl/Tk 8.6.6 X11 libraries and Texinfo 6.7. The latter two components are optional and can be ommitted when choosing "custom install", they are only needed if you want to use the tcltk R package or build package documentation from sources.
---------------

And there is further information at the Mac R Tools page: https://cran.r-project.org/bin/macosx/tools/

------------------
-------------------
And there is discussion about how to avoid unnecessary efforts to load TkTcl in the R-Mac-SIG list

https://markmail.org/search/?q=list%3Aorg.r-project.r-help+tcl+tk+package#query:list%3Aorg.r-project.r-help%20tcl%20tk%20package%20order%3Adate-backward+page:1+mid:s4zpfqw6t3vbr4z6+state:results

--------------

HTH;
David.
--------------


> On Apr 26, 2022, at 6:38 AM, Tomas Kalibera <tomas.kalibera using gmail.com> wrote:
> 
> 
> On 4/26/22 13:38, Dirk Eddelbuettel wrote:
>> Dominic,
>> 
>> On 25 April 2022 at 22:45, Dominic Comtois wrote:
>> | ** byte-compile and prepare package for lazy loadingtcltk DLL is
>> | linked to '/opt/R/arm64/lib/libtk8.6.dylib'
>> | Error: .onLoad failed in loadNamespace() for 'tcltk', details:
>> |   call: fun(libname, pkgname)
>> |   error: Tcl/Tk libraries are missing: install the Tcl/Tk component
>> | from the R installerExecution halted
>> | ERROR: lazy loading failed for package ‘summarytools’
>> | [...]
>> 
>> Doesn't this simply demonstrate that tcltk is missing on that platform?
>> Which is not your fault, or under your control.
> 
> Yes, as can be seen by looking at other packages using tcltk (e.g. tcltk2 or tkrplot).
> 
>> There is no simple or singular way for us to communicate such setup issues to
>> CRAn so you could try to email the maintainer of that port here or privately.
> 
> You can find the name and address of the maintainer here
> 
> https://cran.r-project.org/web/packages/external_libs.html
> 
> (linked from the CRAN Repository Policy, https://cran.r-project.org/web/packages/policies.html)
> 
> and report, but that is probably no longer necessary as Simon is reading this list as well.
> 
> Best
> Tomas
> 
>> 
>> Dirk
>> 
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list