jverzani / gWidgets2tcltk

An R package implementing the gWidgets2 API for the tcltk package
7 stars 2 forks source link

Unable to load gWidgets2tcltk in RStudio on M1 Mac #17

Open kinman1 opened 2 years ago

kinman1 commented 2 years ago

When attempting to load the package in either R.app or RStudio on a MacStudio M1 Pro, I get the following error in both:

Error: package or namespace load failed for ‘gWidgets2tcltk’: .onAttach failed in attachNamespace() for 'gWidgets2tcltk', details: call: structure(.External(.C_dotTclObjv, objv), class = "tclObj") error: [tcl] can't create procedure "tablelist::extendConfigSpecs": unknown namespace.

Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") : [tcl] invalid command name "bind".

R 4.2.0 RStudio 2022.02.2 gWidgets2tcltk 1.0-8

Web search for the problem brought me to this git repo.

jverzani commented 2 years ago

Does the tcltk package even load? I'd guess that is where this issue can be resolved.

kinman1 commented 2 years ago

Yes, tcltk loads just fine.

jverzani commented 2 years ago

Just fishing, but do you know what tcl version is loaded by tcltk? My guess is it is newer and something was removed.

On Sun, May 22, 2022 at 2:29 PM kinman1 @.***> wrote:

Yes, tcltk loads just fine.

— Reply to this email directly, view it on GitHub https://github.com/jverzani/gWidgets2tcltk/issues/17#issuecomment-1133949788, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADG6TBRQJXZRAGQTVAY5CDVLJ4HDANCNFSM5WSSFOVA . You are receiving this because you commented.Message ID: @.***>

-- John Verzani Department of Mathematics College of Staten Island, CUNY

kinman1 commented 2 years ago

4.2.0 is the tcltk version. 1.1-11 is tcktk2, but that seems not to be called or loaded with gWidgets2tcltk.

Thanks for your attention; I appreciate it.

jverzani commented 2 years ago

Can you show me the underlying tcl library version,.My machine has the following ,but I'm guessing yours will be newer:

> library(tcltk)
> tcl("info","tclversion")
<Tcl> 8.6 
kinman1 commented 2 years ago

Hmm, same version:

library(tcltk) tcl("info","tclversion")

8.6 On May 24, 2022, at 9:54 AM, john verzani ***@***.***> wrote: Can you show me the underlying tcl library version,.My machine has the following ,but I'm guessing yours will be newer: > library(tcltk) > tcl("info","tclversion") 8.6 — Reply to this email directly, view it on GitHub , or unsubscribe . You are receiving this because you authored the thread.
jverzani commented 2 years ago

Hmm, wasn't expecting that. Let me see if I can track things down from the error message. Thanks.

On Tue, May 24, 2022 at 5:45 PM kinman1 @.***> wrote:

Hmm, same version:

library(tcltk) tcl("info","tclversion")

8.6 On May 24, 2022, at 9:54 AM, john verzani ***@***.***> wrote: Can you show me the underlying tcl library version,.My machine has the following ,but I'm guessing yours will be newer: > library(tcltk) > tcl("info","tclversion") 8.6 — Reply to this email directly, view it on GitHub < https://www.google.com/url?q=https://github.com/jverzani/gWidgets2tcltk/issues/17%23issuecomment-1136176197&source=gmail-imap&ust=1654016094000000&usg=AOvVaw035eZZqEhEJPfzZPt6pCr7>, or unsubscribe < https://www.google.com/url?q=https://github.com/notifications/unsubscribe-auth/AAW5NXVN7KVZUMP4MQNBKCLVLUCVTANCNFSM5WSSFOVA&source=gmail-imap&ust=1654016094000000&usg=AOvVaw0saoIewTqfpZvmzAzySw7P . You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/jverzani/gWidgets2tcltk/issues/17#issuecomment-1136460996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADG6TB5HDTJZNNNIAVSBXLVLVEV3ANCNFSM5WSSFOVA . You are receiving this because you commented.Message ID: @.***>

-- John Verzani Department of Mathematics College of Staten Island, CUNY

kinman1 commented 2 years ago

Thanks; I’m almost positive it’s related to the M1 chip. All of the packages that I have are arm-64 built. For example, the tcktk description file contains:

Built: R 4.2.0; aarch64-apple-darwin20; 2022-04-23 00:19:11 UTC; unix

On May 24, 2022, at 3:03 PM, john verzani @.***> wrote:

Hmm, wasn't expecting that. Let me see if I can track things down from the error message. Thanks.

On Tue, May 24, 2022 at 5:45 PM kinman1 @.***> wrote:

Hmm, same version:

library(tcltk) tcl("info","tclversion")

8.6 On May 24, 2022, at 9:54 AM, john verzani ***@***.***> wrote: Can you show me the underlying tcl library version,.My machine has the following ,but I'm guessing yours will be newer: > library(tcltk) > tcl("info","tclversion") 8.6 — Reply to this email directly, view it on GitHub < https://www.google.com/url?q=https://github.com/jverzani/gWidgets2tcltk/issues/17%23issuecomment-1136176197&source=gmail-imap&ust=1654016094000000&usg=AOvVaw035eZZqEhEJPfzZPt6pCr7>, or unsubscribe < https://www.google.com/url?q=https://github.com/notifications/unsubscribe-auth/AAW5NXVN7KVZUMP4MQNBKCLVLUCVTANCNFSM5WSSFOVA&source=gmail-imap&ust=1654016094000000&usg=AOvVaw0saoIewTqfpZvmzAzySw7P . You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/jverzani/gWidgets2tcltk/issues/17#issuecomment-1136460996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADG6TB5HDTJZNNNIAVSBXLVLVEV3ANCNFSM5WSSFOVA . You are receiving this because you commented.Message ID: @.***>

-- John Verzani Department of Mathematics College of Staten Island, CUNY — Reply to this email directly, view it on GitHub https://www.google.com/url?q=https://github.com/jverzani/gWidgets2tcltk/issues/17%23issuecomment-1136472490&source=gmail-imap&ust=1654034589000000&usg=AOvVaw1AoCwHRKH1Vr_ANUugcG4s, or unsubscribe https://www.google.com/url?q=https://github.com/notifications/unsubscribe-auth/AAW5NXSY5VGSHXKOLG7Z5TDVLVGZTANCNFSM5WSSFOVA&source=gmail-imap&ust=1654034589000000&usg=AOvVaw1G3MpGMTMu6URz5JWI2L9u. You are receiving this because you authored the thread.

kinman1 commented 2 years ago

I did find this discussion, that seems relevant.

I have the latest Xcode installed, so if that’s the issue, I don’t know how to rectify it.

https://groups.google.com/g/r-sig-mac/c/au09JFiV-70?pli=1 https://groups.google.com/g/r-sig-mac/c/au09JFiV-70?pli=1

Thanks again.

On May 24, 2022, at 3:03 PM, john verzani @.***> wrote:

Hmm, wasn't expecting that. Let me see if I can track things down from the error message. Thanks.

On Tue, May 24, 2022 at 5:45 PM kinman1 @.***> wrote:

Hmm, same version:

library(tcltk) tcl("info","tclversion")

8.6 On May 24, 2022, at 9:54 AM, john verzani ***@***.***> wrote: Can you show me the underlying tcl library version,.My machine has the following ,but I'm guessing yours will be newer: > library(tcltk) > tcl("info","tclversion") 8.6 — Reply to this email directly, view it on GitHub < https://www.google.com/url?q=https://github.com/jverzani/gWidgets2tcltk/issues/17%23issuecomment-1136176197&source=gmail-imap&ust=1654016094000000&usg=AOvVaw035eZZqEhEJPfzZPt6pCr7>, or unsubscribe < https://www.google.com/url?q=https://github.com/notifications/unsubscribe-auth/AAW5NXVN7KVZUMP4MQNBKCLVLUCVTANCNFSM5WSSFOVA&source=gmail-imap&ust=1654016094000000&usg=AOvVaw0saoIewTqfpZvmzAzySw7P . You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/jverzani/gWidgets2tcltk/issues/17#issuecomment-1136460996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADG6TB5HDTJZNNNIAVSBXLVLVEV3ANCNFSM5WSSFOVA . You are receiving this because you commented.Message ID: @.***>

-- John Verzani Department of Mathematics College of Staten Island, CUNY — Reply to this email directly, view it on GitHub https://www.google.com/url?q=https://github.com/jverzani/gWidgets2tcltk/issues/17%23issuecomment-1136472490&source=gmail-imap&ust=1654034589000000&usg=AOvVaw1AoCwHRKH1Vr_ANUugcG4s, or unsubscribe https://www.google.com/url?q=https://github.com/notifications/unsubscribe-auth/AAW5NXSY5VGSHXKOLG7Z5TDVLVGZTANCNFSM5WSSFOVA&source=gmail-imap&ust=1654034589000000&usg=AOvVaw1G3MpGMTMu6URz5JWI2L9u. You are receiving this because you authored the thread.

kinman1 commented 2 years ago

And having started everything over from scratch, it now all works.

Very sorry for the trouble; seemingly not a bug, but something on my end.

Thanks for your help, and very sorry for the inconvenience.

On May 25, 2022, at 1:45 PM, Keith Inman @.***> wrote:

I did find this discussion, that seems relevant.

I have the latest Xcode installed, so if that’s the issue, I don’t know how to rectify it.

https://groups.google.com/g/r-sig-mac/c/au09JFiV-70?pli=1 https://groups.google.com/g/r-sig-mac/c/au09JFiV-70?pli=1

Thanks again.

On May 24, 2022, at 3:03 PM, john verzani @. @.>> wrote:

Hmm, wasn't expecting that. Let me see if I can track things down from the error message. Thanks.

On Tue, May 24, 2022 at 5:45 PM kinman1 @.***> wrote:

Hmm, same version:

library(tcltk) tcl("info","tclversion")

8.6 On May 24, 2022, at 9:54 AM, john verzani ***@***.***> wrote: Can you show me the underlying tcl library version,.My machine has the following ,but I'm guessing yours will be newer: > library(tcltk) > tcl("info","tclversion") 8.6 — Reply to this email directly, view it on GitHub < https://www.google.com/url?q=https://github.com/jverzani/gWidgets2tcltk/issues/17%23issuecomment-1136176197&source=gmail-imap&ust=1654016094000000&usg=AOvVaw035eZZqEhEJPfzZPt6pCr7 >, or unsubscribe < https://www.google.com/url?q=https://github.com/notifications/unsubscribe-auth/AAW5NXVN7KVZUMP4MQNBKCLVLUCVTANCNFSM5WSSFOVA&source=gmail-imap&ust=1654016094000000&usg=AOvVaw0saoIewTqfpZvmzAzySw7P . You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub <https://github.com/jverzani/gWidgets2tcltk/issues/17#issuecomment-1136460996 https://github.com/jverzani/gWidgets2tcltk/issues/17#issuecomment-1136460996>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AADG6TB5HDTJZNNNIAVSBXLVLVEV3ANCNFSM5WSSFOVA https://github.com/notifications/unsubscribe-auth/AADG6TB5HDTJZNNNIAVSBXLVLVEV3ANCNFSM5WSSFOVA> . You are receiving this because you commented.Message ID: @.***>

-- John Verzani Department of Mathematics College of Staten Island, CUNY — Reply to this email directly, view it on GitHub https://www.google.com/url?q=https://github.com/jverzani/gWidgets2tcltk/issues/17%23issuecomment-1136472490&source=gmail-imap&ust=1654034589000000&usg=AOvVaw1AoCwHRKH1Vr_ANUugcG4s, or unsubscribe https://www.google.com/url?q=https://github.com/notifications/unsubscribe-auth/AAW5NXSY5VGSHXKOLG7Z5TDVLVGZTANCNFSM5WSSFOVA&source=gmail-imap&ust=1654034589000000&usg=AOvVaw1G3MpGMTMu6URz5JWI2L9u. You are receiving this because you authored the thread.

jverzani commented 2 years ago

Good news.

I'm guessing now the issue was tablelist is an add-on package for tcl that is included with gWidgets2tcltk. It should be in inst/tklibs, but may not have been installed until you reinstalled. Glad it is fixed for you.

On Wed, May 25, 2022 at 5:04 PM kinman1 @.***> wrote:

And having started everything over from scratch, it now all works.

Very sorry for the trouble; seemingly not a bug, but something on my end.

Thanks for your help, and very sorry for the inconvenience.

On May 25, 2022, at 1:45 PM, Keith Inman @.***> wrote:

I did find this discussion, that seems relevant.

I have the latest Xcode installed, so if that’s the issue, I don’t know how to rectify it.

https://groups.google.com/g/r-sig-mac/c/au09JFiV-70?pli=1 < https://groups.google.com/g/r-sig-mac/c/au09JFiV-70?pli=1>

Thanks again.

On May 24, 2022, at 3:03 PM, john verzani @. @.>> wrote:

Hmm, wasn't expecting that. Let me see if I can track things down from the error message. Thanks.

On Tue, May 24, 2022 at 5:45 PM kinman1 @.***> wrote:

Hmm, same version:

library(tcltk) tcl("info","tclversion")

8.6 On May 24, 2022, at 9:54 AM, john verzani ***@***.***> wrote: Can you show me the underlying tcl library version,.My machine has the following ,but I'm guessing yours will be newer: > library(tcltk) > tcl("info","tclversion") 8.6 — Reply to this email directly, view it on GitHub <

https://www.google.com/url?q=https://github.com/jverzani/gWidgets2tcltk/issues/17%23issuecomment-1136176197&source=gmail-imap&ust=1654016094000000&usg=AOvVaw035eZZqEhEJPfzZPt6pCr7 < https://www.google.com/url?q=https://github.com/jverzani/gWidgets2tcltk/issues/17%23issuecomment-1136176197&source=gmail-imap&ust=1654016094000000&usg=AOvVaw035eZZqEhEJPfzZPt6pCr7 , or unsubscribe <

https://www.google.com/url?q=https://github.com/notifications/unsubscribe-auth/AAW5NXVN7KVZUMP4MQNBKCLVLUCVTANCNFSM5WSSFOVA&source=gmail-imap&ust=1654016094000000&usg=AOvVaw0saoIewTqfpZvmzAzySw7P < https://www.google.com/url?q=https://github.com/notifications/unsubscribe-auth/AAW5NXVN7KVZUMP4MQNBKCLVLUCVTANCNFSM5WSSFOVA&source=gmail-imap&ust=1654016094000000&usg=AOvVaw0saoIewTqfpZvmzAzySw7P

. You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub < https://github.com/jverzani/gWidgets2tcltk/issues/17#issuecomment-1136460996 < https://github.com/jverzani/gWidgets2tcltk/issues/17#issuecomment-1136460996 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AADG6TB5HDTJZNNNIAVSBXLVLVEV3ANCNFSM5WSSFOVA < https://github.com/notifications/unsubscribe-auth/AADG6TB5HDTJZNNNIAVSBXLVLVEV3ANCNFSM5WSSFOVA

. You are receiving this because you commented.Message ID: @.***>

-- John Verzani Department of Mathematics College of Staten Island, CUNY — Reply to this email directly, view it on GitHub < https://www.google.com/url?q=https://github.com/jverzani/gWidgets2tcltk/issues/17%23issuecomment-1136472490&source=gmail-imap&ust=1654034589000000&usg=AOvVaw1AoCwHRKH1Vr_ANUugcG4s>, or unsubscribe < https://www.google.com/url?q=https://github.com/notifications/unsubscribe-auth/AAW5NXSY5VGSHXKOLG7Z5TDVLVGZTANCNFSM5WSSFOVA&source=gmail-imap&ust=1654034589000000&usg=AOvVaw1G3MpGMTMu6URz5JWI2L9u . You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHub https://github.com/jverzani/gWidgets2tcltk/issues/17#issuecomment-1137846827, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADG6THGUAWYZWVQCBMAL7DVL2IVNANCNFSM5WSSFOVA . You are receiving this because you commented.Message ID: @.***>

-- John Verzani Department of Mathematics College of Staten Island, CUNY

castrong commented 2 years ago

Hi all, I'm running into this same issue. Is the recommendation to update xcode and then reinstall Rstudio (or just the gWidgets2tcltk package) from scratch? Or would it be better to individually install tablelist?

Thank you for your help!

kinman1 commented 2 years ago

I'll admit I was a bit terse in my response. I had initially ported over my files and settings from an iMac, but had numerous issues with lots of other things. When I started over, I backed up my files, wiped my hard drive and re-installed the OS. I then used brew to install every application that I needed; brew was able to find and install the correct version of everything for the M1. That included Xcode, XQuartz, R and RStudio. Once that was done, installing packages through RStudio has worked well, including this package and its dependencies. Hope that might work for you as well.

jverzani commented 2 years ago

My understanding is gWidgets2tcltk and RStudio don't play well together. I'm guessing it has to do with the underlying tcltk package, but that is just a guess.

castrong commented 2 years ago

Thanks all for your help, I ended up getting it working following roughly what @kinman1 did. I

(i) updated my OS to Monterey (12.4) (ii) reinstalled Xcode via the app store (iii) installed Apple Command Line Tools (needed to brew install R) by running xcode-select --install in terminal (iv) reinstalled R and XQuartz with brew (I did not install RStudio)