Hi Arjen (again):
On 2013-11-15 00:24-0800 Alan W. Irwin wrote:
> [...]I use the following cmake configuration:
>
> rm -rf /home/software/plplot_svn/HEAD/build_dir/* \
> /home/software/plplot_svn/installcmake
>
> cd /home/software/plplot_svn/HEAD/build_dir
>
> cmake -DCMAKE_INSTALL_PREFIX=/home/software/plplot_svn/installcmake \
> -DDEFAULT_NO_CAIRO_DEVICES=ON -DPLD_wxwidgets=OFF -DBUILD_TEST=ON \
> -DDEFAULT_NO_BINDINGS=ON -DENABLE_tcl=ON -DENABLE_itcl=ON \
> -DENABLE_tk=ON -DENABLE_itk=ON -DUSE_INCRTCL_VERSION_4=OFF \
> ../plplot_allura >& cmake.out
>
> I just repeated all those tests using [...]
>> Tcl8.6 and friends that I have built.
>
> This just involved changing my PATH to point to the installed Tcl8.6
> version of tclsh. Then repeat all the above steps exactly. The new
> version of tclsh pulled in the rest of the components that were
> consistent with Tcl8.6 (thanks to my recent PLplot build system
> upgrades). Those components included version 3 of Itcl and Itk
> (linked against Tcl/Tk8.6 and not linked against the system versions
> of those libraries), and version 4.0.1 of Iwidgets because of
> -DUSE_INCRTCL_VERSION_4=OFF above. (Note that option is OFF by
> default in any case so users will not need to specify
> -DUSE_INCRTCL_VERSION_4=OFF in order to assure they are dealing with
> version 3 of Itcl and friends.) The results were identical to the
> results above for the Tcl8.5 and friends system versions. So I am
> happy with that result and other would-be Tcl8.6 and PLplot users
> should be happy as well!
>
> More later on the -DUSE_INCRTCL_VERSION_4=ON case which proved
> to be much less boring than the above good results. :-)
So here is the continuation of that post which is important but
somewhat long because the results for -DUSE_INCRTCL_VERSION_4=ON are
not boringly perfect. That CMake option pulled in version 4 or
Itcl/Itk (also linked against Tcl/Tk8.6) and version 4.1 of Iwidgets.
If I applied the following local build-system patch:
Index: examples/CMakeLists.txt
===================================================================
--- examples/CMakeLists.txt (revision 12702)
+++ examples/CMakeLists.txt (working copy)
@@ -1013,7 +1013,7 @@
if(FILE_DEPENDS_xwin)
add_dependencies(test_tk_02 test_xwin_dyndriver)
endif(FILE_DEPENDS_xwin)
- list(APPEND targets_examples_tk test_tk_02)
+# list(APPEND targets_examples_tk test_tk_02)
add_custom_target(test_tk_04
COMMAND xtk04 -f ${CMAKE_CURRENT_BINARY_DIR}/tk/tk04
@@ -1027,7 +1027,7 @@
if(FILE_DEPENDS_xwin)
add_dependencies(test_tk_04 test_xwin_dyndriver)
endif(FILE_DEPENDS_xwin)
- list(APPEND targets_examples_tk test_tk_04)
+# list(APPEND targets_examples_tk test_tk_04)
endif(ENABLE_itk)
endif(ENABLE_tk AND PLD_tk)
to exclude these two targets from being dependencies of the
test_interactive target, then the test_interactive target ran without
any error message or non-zero return codes. However, there were some
subtle issues with those results that are not present in the version 3
case. The Iwidgets file chooser (which you can get access to by clicking on
"Plot->save->as" for -dev tk) emits an error message that starts as
cannot inherit from "iwidgets::Dialog" (cannot inherit from
"iwidgets::Dialogshell" (cannot inherit from "iwidgets::Shell" (cannot
inherit from "itk::Toplevel" (can't create object "itk::Toplevel":
command already exists with that nameITCL: cannot create
Tcl_NewObjectInstance for class "::itk::Toplevel"))))
....
There is also the same message for part of Plot->Palettes->Palette 0
and Plot->Palettes->Palette 1 if you attempt to "Save Palette" or
"Load Palette". I assume that is because those buttons also
attempt to run the Iwidgets file chooser (which works well
for Version 3 of Itcl and friends).
Note that version 4 of Itcl and friends (i.e., version 4 of Itcl and
Itk and version 4.1.0 of Iwidget) work well otherwise for the colour
palette case; I was able to demonstrate (with the exception of "Save
Palette" and "Load Palette") that all the many different colour
palette sliders and buttons work in detail for both the Palette 0 and
1 cases just like they do for version 3 of Itcl and friends. This good
result is consistent with the extremely small set of differences
between Iwidgets-4.0.1 and Iwidgets-4.1.0 which can be seen in
cmake/build_projects/iwidgets/iwidgets4.1.patch. This small set of
changes allows Iwidgets-4.1.0 to work (with version 4 of Itcl and Itk)
as well as Iwidgets-4.0.1 works (with version 3 of Itcl and Itk). (I
have demonstrated that by trying the Iwidgets calendar and watch demos
in both cases with no issues.) Similarly, I hope only small changes
will be required of our own scripts to get the Iwidgets file chooser
dialog working again. (More below about that.)
The final two tests I made for version 4 of Itcl and friends were to
run the two explicit Itcl tests that I locally removed from the above
"test_interactive" target.
Here are the results for the test_tk_02 target:
software@raven> make test_tk_02
[ 0%] Built target tclmatrixd
[ 0%] Built target plhershey-unicode-gen
[ 4%] Built target plhershey-unicode.h_built
[ 4%] Built target csirocsa
[ 12%] Built target csironn
[ 16%] Built target deltaT-gen
[ 16%] Built target deltaT.h_built
[ 20%] Built target tai-utc-gen
[ 20%] Built target tai-utc.h_built
[ 20%] Built target qsastime
[ 52%] Built target plplotd
[ 60%] Built target plplottcltkd
[ 60%] Built target xtk02
[ 60%] Built target plplot.tcl_target
[ 60%] Built target tclIndex_tcl
[ 76%] Built target tcl_files
[ 92%] Built target tclIndex_tk
[ 96%] Built target xwin
[ 96%] Built target test-drv-info
[100%] Built target test_xwin_dyndriver
cannot inherit from "PLWin" (cannot inherit from "itk::Widget" (can't create
object "itk::Widget": command already exists with that nameITCL: cannot create
Tcl_NewObjectInstance for class "::itk::Widget"))
while executing
"inherit PLWin"
(class "Pltkwin" body line 2)
invoked from within
"itcl::class Pltkwin {
inherit PLWin
constructor {args} {}
protected method plwin {} { return $itk_interior.plwin }
public method..."
(file "/home/software/plplot_svn/HEAD/build_dir/bindings/tk/Pltkwin.tcl"
line 41)
invoked from within
"source /home/software/plplot_svn/HEAD/build_dir/bindings/tk/Pltkwin.tcl"
(in namespace eval "::" script line 1)
invoked from within
"namespace eval :: $auto_index($name)"
(procedure "auto_load" line 13)
invoked from within
"auto_load $name [uplevel 1 {::namespace current}]"
(autoloading "Pltkwin")
(procedure "::unknown" line 22)
invoked from within
"Pltkwin .plw"
(file "/home/software/plplot_svn/HEAD/build_dir/examples/tk/tk02" line 49)
invoked from within
"source /home/software/plplot_svn/HEAD/build_dir/examples/tk/tk02"
make[3]: *** [examples/CMakeFiles/test_tk_02] Error 1
make[2]: *** [examples/CMakeFiles/test_tk_02.dir/all] Error 2
make[1]: *** [examples/CMakeFiles/test_tk_02.dir/rule] Error 2
make: *** [test_tk_02] Error 2
software@raven> make test_tk_04
[ 0%] Built target tclmatrixd
[ 0%] Built target plhershey-unicode-gen
[ 4%] Built target plhershey-unicode.h_built
[ 4%] Built target csirocsa
[ 12%] Built target csironn
[ 16%] Built target deltaT-gen
[ 16%] Built target deltaT.h_built
[ 20%] Built target tai-utc-gen
[ 20%] Built target tai-utc.h_built
[ 20%] Built target qsastime
[ 52%] Built target plplotd
[ 60%] Built target plplottcltkd
Scanning dependencies of target xtk04
[ 60%] Building C object examples/tk/CMakeFiles/xtk04.dir/xtk04.c.o
Linking C executable xtk04
[ 60%] Built target xtk04
[ 60%] Built target plplot.tcl_target
[ 60%] Built target tclIndex_tcl
[ 76%] Built target tcl_files
[ 92%] Built target tclIndex_tk
[ 96%] Built target xwin
[ 96%] Built target test-drv-info
[100%] Built target test_xwin_dyndriver
Scanning dependencies of target test_tk_04
cannot inherit from "PLWin" (cannot inherit from "itk::Widget" (can't create
object "itk::Widget": command already exists with that nameITCL: cannot create
Tcl_NewObjectInstance for class "::itk::Widget"))
while executing
"inherit PLWin"
(class "PLXWin" body line 2)
invoked from within
"itcl::class PLXWin {
inherit PLWin
constructor {args} {
eval PLWin::constructor $args
} {
# Set up defaults
plw::setup_defaults $h..."
(file "/home/software/plplot_svn/HEAD/build_dir/bindings/tk/PLXWin.itk"
line 8)
invoked from within
"source /home/software/plplot_svn/HEAD/build_dir/bindings/tk/PLXWin.itk"
(in namespace eval "::" script line 1)
invoked from within
"namespace eval :: $auto_index($name)"
(procedure "auto_load" line 13)
invoked from within
"auto_load $name [uplevel 1 {::namespace current}]"
(autoloading "PLXWin")
(procedure "::unknown" line 22)
invoked from within
"PLXWin .plw"
(file "/home/software/plplot_svn/HEAD/build_dir/examples/tk/tk04" line 37)
invoked from within
"source /home/software/plplot_svn/HEAD/build_dir/examples/tk/tk04"
make[3]: *** [examples/CMakeFiles/test_tk_04] Error 1
make[2]: *** [examples/CMakeFiles/test_tk_04.dir/all] Error 2
make[1]: *** [examples/CMakeFiles/test_tk_04.dir/rule] Error 2
make: *** [test_tk_04] Error 2
So all three error messages are different, but similar. As I
commented about the first (truncated) error message above concerning
the file chooser, I hope from the small changes between Iwidgets 4.1.0
versus 4.0.1 that a small change to our scripts will solve these
issues. Furthermore, a google search for <"cannot inherit from"
"command already exists with that"> found
http://sourceforge.net/p/incrtcl/bugs/182/. I didn't understand that
discussion much (note I don't understand OO concepts tha well) except
that the incrtcl (i.e., version 4 of Itcl and Itk) developers didn't
view the issue as a bug. But if you understand that discussion it may
lead to an easy solution for what changes we have to make to become
completely compatible with Itcl4 and friends.
In sum, when you get to the point (which I assume will be quite some
time from now) of trying out version 4 of Itcl and Itk and version
4.1.0 of Iwidgets, I hope you will be willing to try to fix the above
errors. I am fairly sure those fixes will be straightforward for the
reasons I mentioned, but I am not in a good position to do those fixes
myself because although I know how to fix up the part of the build
system dealing with Tcl and friends and know how to build Tcl8.6 and
friends, I don't really understand the Tcl language (or OO concepts)
that well.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel