[R] error loading tcltk2
Philippe Grosjean
phgrosjean at sciviews.org
Sat Apr 21 11:50:32 CEST 2012
There is indeed a bug in tcltk2, while I introduced some changes
targeting a better look of Tk widgets on Ubuntu. This new code is
assuming 'cat' is available on all platforms. Indeed on Windows, it *is*
available iff Rtools are installed, which is the case apparently on all
test machines so far, but the code fails otherwise.
I'll solve this bug this week-end (just testing if the platform is
Windows makes the job here) and submit a new version as soon as
possible. Sorry to all of you for the inconvenience it may have brought
to your workflow.
Waiting for this fix to propagated on all mirrors, if you urgently need
tcltk2, you know that you still can install Rtools as a temporary
work-around on one or the other test machine, which could be useful
anyway, if you are developing/compiling R packages...
Best,
Philippe
On 20/04/12 17:21, peter dalgaard wrote:
>
> On Apr 20, 2012, at 16:03 , Duncan Murdoch wrote:
>
>> On 20/04/2012 8:41 AM, Roberto Ugoccioni wrote:
>>> Hello,
>>> I just installed R-2.15.0 on windows XP and cannot load package tcltk2
>>> (which I just downloaded from CRAN as tcltk2_1.2-1.zip; package install
>>> reported no problems):
>>>
>>>> library(tcltk2)
>>> Carico il pacchetto richiesto: tcltk
>>> Loading Tcl/Tk interface ... done
>>> Error : .onLoad failed in loadNamespace() for 'tcltk2', details:
>>> call: system("cat /etc/issue", intern = TRUE, ignore.stderr = TRUE)
>>> error: 'cat' not found
>>> Errore: package/namespace load failed for ‘tcltk2’
>>> It seems .onLoad is trying to run a unix command 'cat' but i'm on a windows
>>> platform:
>>>> str(.Platform)
>>> List of 8
>>> $ OS.type : chr "windows"
>>> $ file.sep : chr "/"
>>> $ dynlib.ext: chr ".dll"
>>> $ GUI : chr "Rgui"
>>> $ endian : chr "little"
>>> $ pkgType : chr "win.binary"
>>> $ path.sep : chr ";"
>>> $ r_arch : chr "i386"
>>>> sessionInfo()
>>> R version 2.15.0 (2012-03-30)
>>> Platform: i386-pc-mingw32/i386 (32-bit)
>>> locale:
>>> [1] LC_COLLATE=Italian_Italy.1252 LC_CTYPE=Italian_Italy.1252
>>> [3] LC_MONETARY=Italian_Italy.1252 LC_NUMERIC=C
>>> [5] LC_TIME=Italian_Italy.1252
>>> attached base packages:
>>> [1] stats graphics grDevices utils datasets methods base
>>> I looked for an R file in the tcltk2 installed package tree containing the
>>> above system() call but could not find it.
>>> This looks like a bug to me but I'd like to ask for further advice before
>>> reporting it as such, I might have overlooked something. Thanks for any
>>> help.
>>
>> I'd suggest you should contact the package maintainer. It's not hard to find a copy of the cat utility function (e.g. in the Rtools used for building R and packages), but the error does suggest the package may not be intended to be used on Windows.
>
> It's intended for Windows alright... However, the nit seems to be this:
>
>> tcltk2:::.isUbuntu
> function ()
> return(grepl("^Ubuntu", suppressWarnings(system("cat /etc/issue",
> intern = TRUE, ignore.stderr = TRUE))[1]))
>
> which gets called unconditionally in tcltk:::.onLoad(). It could at least check that there is room to swing a cat....
>
>>
>> Duncan Murdoch
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list