On 2013-11-23 12:11-0000 Andrew Ross wrote:

> On Friday 22 Nov 2013 14:26:31 Alan W. Irwin wrote:
>> On 2013-11-22 12:40-0000 Andrew Ross wrote:
>>> Alan,
>>>
>>> I've been testing your changes as I go on my Ubuntu system. One thing
>>> I noticed almost by accident is that your itk detection code requires a
>>> working X11 display. This is not actually required to build (although
>>> it obviously is to use). I only noticed because I was building via a
>>> ssh connection without X11 forwarding and I couldn't understand why
>>> itk was disabled.
>>>
>>> This is probably not an issue for most users, but it might be an issue
>>> for example on auto-builders as used by distributions like Debian. It
>>> would be nice if we could avoid that.
>>
>> To Andrew and Orion:
>>
>> I also address this to Orion because the issue may impact him as well.
>>
>> I confirm the issue here in this simple way.
>>
>> 1. Use ssh -x to login to your own machine without X forwarding
>>
>> 2. Then execute the following:
>>
>> tclsh
>> % package require Itk
>>
>> which errors out with the message:
>>
>> no display name and no $DISPLAY environment variable
>>
>> On the other hand, if you do this with a normal login that allows X,
>> then "package require Itk" works although you do get an annoying blank
>> GUI that comes up, but that disappears again as soon as you exit.
>>
>> The reason this issue impacts our build-system is that logic checks the
>> consistency of Tcl and friends using the "package require" command
>> (including
>> "package require Itk"), see cmake/modules/tcl-related.cmake.
>>
>> So if it appears to be impossible to have X display working properly
>> for some Linux distribution autobuilding environment, then I suggest
>> you implement an option in tcl-related.cmake (which normally defaults
>> to OFF but which would be ON when building Linux distribution packages
>> for PLplot) to skip the part of the logic that automatically
>> determines PLPLOT_ITK_VERSION using "package require Itk" and replace
>> that with some other method such as reading an environment variable
>> that packagers specify that contains the known (for that distribution)
>> Itk version.
>
> The simplest would just be to check if PLPLOT_ITK_VERSION is set, and if it is
> then don't use the test. PLPLOT_ITK_VERSION could then be set as a cmake
> variable by some other means for the auto-build case. I'll look into this.

That idea (when PLPLOT_ITK_VERSION is set don't do the execute_process
and also set ITK_RC to 0) would work.  In fact, it would actually be
slightly more efficient than running execute_process every time CMake
is re-run. But it is a little complicated because the result of the
execute_process command (according to the documentation) is an
ordinary variable so you would have to rename that and then set
PLPLOT_ITK_VERSION to that value as a cached variable.  And then in
the autobuilding case you could set that cached variable initially
(and thus skip the initial execute_process) with
-DPLPLOT_ITK_VERSION:STRING=3.3 (or whatever).

There are a few more complications (especially with the
PLPLOT_IWIDGETS_VERSION case assuming I use the same idea for that
variable and also PLPLOT_ITCL_VERSION for efficiency reasons) so I
think I should probably tackle this myself today.  Which will
give you a bit more free time to work on example 22 propagation.  :-)

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
__________________________

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to