[GRASS-dev] [GRASS GIS] #462: Tcl interp->result deprecated

#462: Tcl interp->result deprecated
---------------------+------------------------------------------------------
Reporter: neteler | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Keywords: | Platform: All
      Cpu: All |
---------------------+------------------------------------------------------
In Tcl, interp->result is (really) deprecated from Tcl8.6 onwards. Still
it is used in several modules:

{{{
./lib/form/form.c
./vector/v.digit/form.c
./visualization/nviz/src/anim_support.c
./visualization/nviz/src/cutplane_obj.c
./visualization/nviz/src/do_zoom.c
./visualization/nviz/src/draw.c
./visualization/nviz/src/exag.c
./visualization/nviz/src/lights.c
./visualization/nviz/src/map_obj.c
./visualization/nviz/src/misc.c
./visualization/nviz/src/mkdspf_main.c
./visualization/nviz/src/nvizAppInit.c
./visualization/nviz/src/nviz_init.c
./visualization/nviz/src/position.c
./visualization/nviz/src/togl_flythrough.c
./visualization/nviz/src/volume.c
}}}

Funda Wang has proposed a patch set:
http://svn.mandriva.com/cgi-
bin/viewvc.cgi/packages/cooker/grass/current/SOURCES/grass-6.4.0-tcl8.6.patch?view=log

which I attached to the ticket.

Is it correct and can be submitted to 6.4.x to gain compatibility with
Tcl > 8.5? Related problems on Mac where reported.

Markus

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by fundawang):

please note that the patch is a draft, as i'm not familiar with tcl nor
grass :frowning: I only concern about get it built

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by fundawang):

i've finally finish the patch, at URL:
http://svn.mandriva.com/cgi-
bin/viewvc.cgi/packages/cooker/grass/current/SOURCES/grass-6.4.0-tcl8.6.patch

The attached patch is an outdated one.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by marisn):

Replying to [comment:2 fundawang]:
> i've finally finish the patch, at URL:
> http://svn.mandriva.com/cgi-
bin/viewvc.cgi/packages/cooker/grass/current/SOURCES/grass-6.4.0-tcl8.6.patch
>
> The attached patch is an outdated one.
I tested this patch with develbranch_6 and tcl-8.4.19. v.digit -n
map=newmap segfaults during launch. Can provide bt on request.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by neteler):

{{{
v.digit -n map=newmap
}}}

works here (Mandriva 2009.0, 64bit, tcl8.5). Also NVIZ works, both with
the patch.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by neteler):

Tested also d.what.vect on Mandriva 2009.0, 64bit, tcl8.5, works.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by neteler):

Since the update patch requires more verification, the TCL tip #330 hack
was implemented in r35624 and r35625 . The hack was tested with nviz,
d.what.vect and v.digit. The files in question now compile also with
Tcl8.6.

With later Tcl versions it will fail to compile so the patch suggested by
fundawang needs to be considered for the long term support.

Markus

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by fundawang):

I think i know the reason of crash, cause I've misled the feature of
sscanf. I've updated the patch at usual place. Please test.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by marisn):

Replying to [comment:7 fundawang]:
> I think i know the reason of crash, cause I've misled the feature of
sscanf. I've updated the patch at usual place. Please test.

Hm. This patch really seems to work. Tested on ~x86 develbranch_6.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by neteler):

I suggest to apply it to develbranch_6 but not (yet) to releasebranch_6_4
(where we use the TCL tip # 330 hack).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by neteler):

Patch applied to develbranch_6 (r35718) and to 7.trunk (r35719). Unsure
about releasebranch_6_4 (where we currently use the TCL tip # 330 hack).

Markus

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:10&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.0
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Comment (by cmbarton):

Is this still an issue? We are only maintaining, not developing the TclTk
GUI beyond GRASS 6.4 right? So can't it freeze with TclTk 8.5 and/or this
patch?

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:11&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: major | Milestone: 6.4.1
Component: Tcl | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Changes (by hamish):

  * milestone: 6.4.0 => 6.4.1

Comment:

Replying to [comment:11 cmbarton]:
> Is this still an issue? We are only maintaining, not developing
> the TclTk GUI beyond GRASS 6.4 right? So can't it freeze with
> TclTk 8.5 and/or this patch?

FWIW, IMHO maintenance mode means not actively adding new features and
refactoring, but rather keeping things working. A small patch to keep it
working with tcl/tk 8.6 seems pretty well in the maintenance dept.

Replying to [comment:10 neteler]:
> Unsure about releasebranch_6_4 (where we currently use the TCL
> tip # 330 hack).

I suggest to leave the rest as-is for now and backport it to 6.4 if
someone using 8.6 complains or if someone really feels like it.

On the other hand it seems like a pretty simple change and we could close
the bug. I'll schedule the balance of it for 6.4.1.

shrug,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/462#comment:12&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
---------------------+------------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: major | Milestone: 6.4.3
Component: Tcl/Tk | Version: svn-develbranch6
Keywords: | Platform: All
      Cpu: All |
---------------------+------------------------------------------------------
Changes (by neteler):

  * milestone: 6.4.1 => 6.4.3

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:13&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
---------------------+------------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: minor | Milestone: 6.4.4
Component: Tcl/Tk | Version: svn-releasebranch64
Keywords: | Platform: All
      Cpu: All |
---------------------+------------------------------------------------------
Changes (by neteler):

  * priority: major => minor
  * version: svn-develbranch6 => svn-releasebranch64
  * milestone: 6.4.3 => 6.4.4

Comment:

No complaints for the past 7 months...

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:14&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
---------------------+------------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
     Type: defect | Status: new
Priority: minor | Milestone: 6.4.4
Component: Tcl/Tk | Version: svn-releasebranch64
Keywords: | Platform: All
      Cpu: All |
---------------------+------------------------------------------------------

Comment(by cmbarton):

I agree. Close.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/462#comment:15&gt;
GRASS GIS <http://grass.osgeo.org>

#462: Tcl interp->result deprecated
----------------------+-----------------------------------------------------
  Reporter: neteler | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: minor | Milestone: 6.4.3
Component: Tcl/Tk | Version: svn-releasebranch64
Resolution: fixed | Keywords: v.digit, nviz, libform, tcl8.6
  Platform: All | Cpu: All
----------------------+-----------------------------------------------------
Changes (by hamish):

  * keywords: => v.digit, nviz, libform, tcl8.6
  * status: new => closed
  * resolution: => fixed
  * milestone: 6.4.4 => 6.4.3

Comment:

tcl 8.6 support for lib/form, v.digit, and nviz backported to relbr64 in
r40401 and r55872.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/462#comment:16&gt;
GRASS GIS <http://grass.osgeo.org>