pbs-software / pbs-modelling

R package PBSmodelling - GUI tools made easy: interact with models and explore data
2 stars 1 forks source link

Version 2.20 fails in Ubuntu #41

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When running version 2.20 in Ubuntu, I get the session shown below:

> require(PBSmodelling)
Loading required package: PBSmodelling
Loading Tcl/Tk interface ... done

PBS Modelling 2.20 -- Copyright (C) 2005-2009 Fisheries and Oceans Canada

A complete user guide 'PBSmodelling-UG.pdf' is located at 
 /usr/lib/R/library/PBSmodelling/doc/PBSmodelling-UG.pdf 

Packaged on Fri 
Pacific Biological Station, Nanaimo

Warning messages:
1: In tclRequire("BWidget") : Tcl package 'BWidget' not found
2: In tclRequire("Tktable") : Tcl package 'Tktable' not found
> runDemos()
Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"), class
= "tclObj") : 
  [tcl] invalid command name "ComboBox".
> 

The "R Demos" window pops up, but it's blank. Several tcltk widgets seem to
be missing.

What's the problem? Does this indicate that something is missing in the
tcl/tk package for Ubuntu? Obviously, we need to fix the problem, whatever
it is. Curiously, the previous version of PBSmodelling worked fine.

I'm running Ubuntu 9.04, with the basic installation, supplemented by R. I
check in the synaptic package manager, and I have tcl 8.5 and tk 8.5 both
installed. I wonder if there are other dependencies.

Original issue reported on code.google.com by schnu...@shaw.ca on 12 Aug 2009 at 8:25

GoogleCodeExporter commented 9 years ago
Thanks to email comments from Alex, the solution is to install two packages 
(libtktable2.9, bwidget) using the Synaptic Package Manager or apt-get.

That's great, but this issue still isn't resolved because the package currently 
has 
no way of telling a Linux user about these system dependencies. Maybe zzz.r can 
detect whether or not these packages are installed and issue a warning if 
they're 
not. Otherwise, zzz.r could just print a message to Unix users that these 
external 
dependencies exist.

I would favor a quick fix (including the title change) and rapid resubmission 
to 
CRAN. I don't want Linux users to get ticked off in meantime. Marc Trudel 
considers 
it a serious blunder not to inform users about external dependencies. This lack 
of 
information can result in a serious waste of time and user rejection of the 
package 
in question.

Original comment by schnu...@shaw.ca on 12 Aug 2009 at 9:47

GoogleCodeExporter commented 9 years ago
There is a warning message:

Warning messages:
1: In tclRequire("BWidget") : Tcl package 'BWidget' not found
2: In tclRequire("Tktable") : Tcl package 'Tktable' not found

But the return value of tclRequire is never checked, but should be - and then 
display
a userfriendlier message.

Original comment by alex_goo...@mofo.ca on 12 Aug 2009 at 9:51

GoogleCodeExporter commented 9 years ago
The two additional packages require tcl/tk version 8.4, not the latest version 
8.5 
normally installed in Ubuntu 9.04.

Original comment by schnu...@shaw.ca on 12 Aug 2009 at 10:00

GoogleCodeExporter commented 9 years ago
I'm not persuaded that a user gets enough information from the warning messages:

1: In tclRequire("BWidget") : Tcl package 'BWidget' not found
2: In tclRequire("Tktable") : Tcl package 'Tktable' not found

I saw those, too, but they told me nothing about how to fix the problem. For 
example, how would I know that the actual required package is called 
libtktable2.9? 
In fact, couldn't we use tclRequire() in zzz.r as a trigger to print the 
instructions about how to fix the problem?

Happily for us, Alex knows a lot more about all this than an average user. 
Warning 
messages like those above make it seem as if PBSmodelling is incomplete or 
designed 
incorrectly. In fact, the messages indicate fatal errors, not mere warnings.

Ideally, R would have somehow put these additional widgets into the Unix tcltk 
package (as appears to have been done for Windows). But, failing that, we have 
to 
take account of the fact that we're using them, and a typical user won't have a 
clue 
about what they are or how to get them.

Original comment by schnu...@shaw.ca on 12 Aug 2009 at 10:27

GoogleCodeExporter commented 9 years ago
Good greif! Sorry Alex, I misread your comment #2. I see that we're on exactly 
the 
same wavelength.

Original comment by schnu...@shaw.ca on 12 Aug 2009 at 10:29

GoogleCodeExporter commented 9 years ago
Here's the new error users will receive if the tcl packages can't be found.

> library(PBSmodelling)
Loading Tcl/Tk interface ... done

PBS Modelling 2.20 -- Copyright (C) 2005-2009 Fisheries and Oceans Canada

A complete user guide 'PBSmodelling-UG.pdf' is located at 
 C:/PROGRA~1/R/R-29~1.1/library/PBSmodelling/doc/PBSmodelling-UG.pdf 

Packaged on 2009-05-14 
Pacific Biological Station, Nanaimo

-------------------------------------------------------------
ERROR: PBS Modelling requires the tcl package "BWidget"
and cannot proceed until it is installed.
Ubuntu (apt) users can install via the command:
        apt-get install bwidget

ERROR: PBS Modelling requires the tcl package "Tktable"
and cannot proceed until it is installed.
Ubuntu (apt) users can install via the command:
        apt-get install libtktable2.9

-------------------------------------------------------------
Warning messages:
1: In tclRequire("BWidgett") : Tcl package 'BWidgett' not found
2: In tclRequire("Tktablee") : Tcl package 'Tktablee' not found

Original comment by alex_goo...@mofo.ca on 13 Aug 2009 at 4:18

GoogleCodeExporter commented 9 years ago

Original comment by alex_goo...@mofo.ca on 13 Aug 2009 at 4:26