May be here is a clue. In the NEWS.txt (included in the source files) there is the following:
* Install: add "--libdir", "--enable-libtclenvmodules", "--with-tcl" and "--with-tclinclude" options to configure script to control libtclenvmodules build and installation. and it is exactly related to the variable @libdir@ that is used in modulecmd.tcl.in. So may be debian/rules should be adapted accordingly. On Sat, 3 Aug 2019 09:44:31 -0500 Ron Lovell <[email protected]> wrote: > Patrice, thanks for filing the bug report. I was just looking at that bug > myself. The definition of g_tclextlib at line 41 is in new code added since > the version 4.2.2 that's in Buster. > > I'm NOT a Tcl programmer or Modules guru. But is "prefix" something that > should be compiled into the modules at build time, or initialized in > /etc/environment-modules/siteconfig.tcl, or maybe in a file > /etc/environment-modules/rc? > > As a workaround I edited modulecmd.tcl to replace "${prefix}" with "/usr" > at line 41. That allows /usr/share/modules/init/bash to complete > successfully and define function "module" correctly. > > Hope this helps. > > -- > James Ronald Lovell <[email protected]> > Huntsville, AL, USA

