#87 gap5 (2.0b8): tcl tablelist not found

open
Gap5 (15)
5
2011-03-28
2011-03-28
Anonymous
No

It looks like tablelist poses a problem. When I do:

"Edit contig" -> Search -> "Search by: tag type" -> and then try to switch the default COMM type to something else

I get an error window with:

--------------------------------------------------------------------------------
invalid command name "tablelist"
while executing
"tablelist .e1.search.type_frame.r.tag.select.type.list -columns {0 "Index"
0 "Code"
0 "Tag name"} -labelcommand tablelist::sortByColumn ..."
("eval" body line 1)
invoked from within
"eval [list tablelist $path.list -columns {0 "Index"
0 "Code"
0 "Tag name"} -labelcommand tablelist::sortByColumn -exportselection 0 ..."
(procedure "tag_checklist" line 23)
invoked from within
"tag_checklist $w.type $arr -selectmode browse -width 35 -height 10"
(procedure "tag_editor_select_type" line 34)
invoked from within
"tag_editor_select_type .e1.search.type_frame.r.tag [set .e1.search.Tag] {show_help gap5 Editor-Searching} {search_set_tag_type .e1.search.option_fra..."
invoked from within
".e1.search.option_frame.tag.button invoke"
("uplevel" body line 1)
invoked from within
"uplevel #0 [list $w invoke]"
(procedure "tk::ButtonUp" line 22)
invoked from within
"tk::ButtonUp .e1.search.option_frame.tag.button"
(command bound to event)

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

This concerns gap5 latest beta (b8), installed on a Kubuntu 9.10 64 bit system from the SF tarball (no SVN version has ever been on this machine).

I tried setting STADEN_DEBUG to 1 to get more info, but apart a "load libgap5.so =>" nothing more was printed out to STDOUT.

I looked up $STADENROOT, and there is indeed a "tablelist" directory with the usual files (at least it looks like) under $STADENROOT/share/tcltk/tklib0.5/tablelist. As last resort, I tried installing tklib into the system ("sudo apt-get install tklib"), but this does not help either.

Any ideas what could be done?

Best,
Bastien

Discussion

  • James Bonfield
    James Bonfield
    2011-03-30

    Hello Bastien,

    Curious. Initially I thought that perhaps it was just a packaging error and I'd failed to bundle tklib correctly (normally when building from source it'll just pick up the system one). However if you did an apt-get install tklib and it still fails then that doesn't make sense.

    It works for me, but I have various extra packages installed. I'll have a play on a nice pristine kubuntu install and see if I can replicate it.

    The share/staden/etc/shlib.conf file sets up the Tcl auto_path for finding packages, including tk_lib. This is generated at build time dependant on the configure --with-* parameters, although I think I manually edited this for the binary build to point things back into the unpacked self-contained directory structure. Anyway that's a good starting point for investigating things.

     
  • "share/staden/etc/shlib.conf " was the right hint. However, the packaged gap5 version only sets a couple of absolute paths:

    foreach x [list "/software/badger/opt/tcl_packages/tklib0.5" "/usr/lib"] {
    if {![info exists _p($x)]} {
    set _p($x) 1
    lappend auto_path $x
    }
    }

    May I propose you change this to something like:

    set md [file dirname $::argv0]
    append md /../../../tcltk
    foreach x [list $md "/software/badger/opt/tcl_packages/tklib0.5" "/usr/lib" "/usr/share/tcltk"] {
    if {![info exists _p($x)]} {
    set _p($x) 1
    lappend auto_path $x
    }
    }

    with $md being the tcltk libs you ship with gap5 (and get therefore placed before anything in that list) and "/usr/share/tcltk" being the place where (K)Ubuntu stores tcltk libraries (at least 9.10, I need to chek the 10 and 11 versions).

    Eventually one might want to think about pre-pending $md to $auto_path instead of appending.

    B

     
  • James Bonfield
    James Bonfield
    2011-03-30

    Ah that's definitely the cause of the error then. Thanks for pointing it out.

    It ought to be use $STADLIB or similar. These variables are set in the wrapper script for the main programs (spin ,gap5, gap4, etc) or in the staden.profile if people to prefer to have them set for all tools. The wrapper scripts do something similar - checking the location for $0 to determine the STADENROOT relative to that.