I was asked by CRAN to fix some problems appearing in my summarytools <https://cran.r-project.org/web/checks/check_results_summarytools.html>' package build checks. Trivial email problems aside, on the summary page <https://www.r-project.org/nosvn/R.check/r-release-macos-arm64/summarytools-00check.html> for the Mac OS build, I see: [...] checking whether package ?summarytools? can be installed ... [1s/1s] ERROR Installation failed. See ?/Volumes/Builds/packages/big-sur-arm64/results/4.2/summarytools.Rcheck/00install.out? for details. [...] On the details page <https://www.r-project.org/nosvn/R.check/r-release-macos-arm64/summarytools-00install.html>, I see: [...] ** 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? [...] Tcl/Tk is used by some functions to allow users to bring up an "open file...", & "save file..." dialogs & message boxes, as well as the tclvalue() function. In my NAMESPACE, I have: importFrom(tcltk,tclvalue) importFrom(tcltk,tk_messageBox) importFrom(tcltk,tkgetOpenFile) importFrom(tcltk,tkgetSaveFile) Also, a prerequisite is to have XQuartz <https://www.xquartz.org/> installed on Mac OS. Summarytools has been around for a while, and I never had this problem before. And since I don't have a Mac machine, I'm not sure how to go about this. A Google search reveals that several other packages have the same issue. But I wasn't able to find the root cause nor a proper solution. Any tips / pointers would be greatly appreciated. Thanks, Dominic Comtois summarytools <https://cran.r-project.org/web/packages/summarytools/index.html> author & maintainer
[R-pkg-devel] How to fix Tcl/Tk Error on Mac OS build
5 messages · Dominic Comtois, Dirk Eddelbuettel, Tomas Kalibera +2 more
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. 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. Dirk
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
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
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 at 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 at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Thanks, indeed, as part of full re-install for R 4.2.0 package builds the Tcl/Tk libraries were missing. Now fixed and summarytools check with * checking data for non-ASCII characters ... NOTE Note: found 78 marked UTF-8 strings Status: 1 NOTE I'll just repeat the important link that Tomas posted: https://cran.r-project.org/web/packages/external_libs.html On a slightly orthogonal note (not related to the question other than it involves tcltk): I'd like to point out that Tcl/Tk is often not available on computing servers, so I would recommend packages that do not provide GUI tools to avoid dependence on tcltk if not strictly necessary as it prevents the use in headless HPC environments. Cheers, Simon
On Apr 26, 2022, at 2:45 PM, Dominic Comtois <dominic.comtois at gmail.com> wrote: I was asked by CRAN to fix some problems appearing in my summarytools <https://cran.r-project.org/web/checks/check_results_summarytools.html>' package build checks. Trivial email problems aside, on the summary page <https://www.r-project.org/nosvn/R.check/r-release-macos-arm64/summarytools-00check.html> for the Mac OS build, I see: [...] checking whether package ?summarytools? can be installed ... [1s/1s] ERROR Installation failed. See ?/Volumes/Builds/packages/big-sur-arm64/results/4.2/summarytools.Rcheck/00install.out? for details. [...] On the details page <https://www.r-project.org/nosvn/R.check/r-release-macos-arm64/summarytools-00install.html>, I see: [...] ** 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? [...] Tcl/Tk is used by some functions to allow users to bring up an "open file...", & "save file..." dialogs & message boxes, as well as the tclvalue() function. In my NAMESPACE, I have: importFrom(tcltk,tclvalue) importFrom(tcltk,tk_messageBox) importFrom(tcltk,tkgetOpenFile) importFrom(tcltk,tkgetSaveFile) Also, a prerequisite is to have XQuartz <https://www.xquartz.org/> installed on Mac OS. Summarytools has been around for a while, and I never had this problem before. And since I don't have a Mac machine, I'm not sure how to go about this. A Google search reveals that several other packages have the same issue. But I wasn't able to find the root cause nor a proper solution. Any tips / pointers would be greatly appreciated. Thanks, Dominic Comtois summarytools <https://cran.r-project.org/web/packages/summarytools/index.html> author & maintainer [[alternative HTML version deleted]]
______________________________________________ R-package-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel