Re: [cmake-developers] PLplot contract test

2017-11-08 Thread Alan W. Irwin

On 2017-11-08 16:14-0500 Ben Boeckel wrote:


On Wed, Nov 08, 2017 at 12:39:15 -0800, Alan W. Irwin wrote:

software@raven> time (nice -19 ctest -S 
~/cmake/Dashboards/Scripts/CMakeScripts/my_dashboard.cmake -VV >& ctest.out16)
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.

The only thing I can find in ctest.out16 corresponding to these
warnings is

264: application-specific initialization failed: couldn't connect to display 
"localhost:10.0"
264: Error in startup script: couldn't connect to display "localhost:10.0"


The Xauthority file is not available to the nightly build job.


Hi Ben:

Note the above issue is for an Experimental test and not for a Nightly
one, i.e., the above errors occurred for a command-line environment
where X authentication normally just works (i.e., I can fire up
another konsole or xterm, run "xauth list", etc. without issues).  The
corresponding X authority file is located at
/home/software/.Xauthority.

Following up on another comment you made concerning the
XAUTHORITY environment variable I decided to try setting
that environment variable using

macro(dashboard_hook_build)

set(ENV{XAUTHORITY} /home/software/.Xauthority)

endmacro()

within my Scripts/CMakeScripts/my_dashboard.cmake
file following how I set other environment variables
for this contract test.

That change completely solved the above Experimental X authority
issues and the Tk-related components of PLplot built for that
particular test.

So thanks very much for that XAUTHORITY idea!

Changing topics back to the Nightly case where the job is started in a
crontab environment rather than on the normal desktop command line as
above, further research indicates it is possible to set DISPLAY for
such environments (assuming that DISPLAY exists at the time the
crontab job fires as is typical for my case).  So I am going to try
that to see if that change plus the above setting of XAUTHORITY solves
the Nightly issue as well.

@Brad:

I still have no idea why setting XAUTHORITY to the file that is used
in any case should be needed, and I am therefore pretty sure doing
that as above merely works around an issue with contract tests (or
deeper) where it is possible not enough care is being used to
propagate X authority.

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
__
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] PLplot contract test

2017-11-08 Thread Ben Boeckel
On Wed, Nov 08, 2017 at 12:39:15 -0800, Alan W. Irwin wrote:
> software@raven> time (nice -19 ctest -S 
> ~/cmake/Dashboards/Scripts/CMakeScripts/my_dashboard.cmake -VV >& ctest.out16)
> X11 connection rejected because of wrong authentication.
> X11 connection rejected because of wrong authentication.
> X11 connection rejected because of wrong authentication.
> X11 connection rejected because of wrong authentication.
> X11 connection rejected because of wrong authentication.
> X11 connection rejected because of wrong authentication.
> X11 connection rejected because of wrong authentication.
> 
> The only thing I can find in ctest.out16 corresponding to these
> warnings is
> 
> 264: application-specific initialization failed: couldn't connect to display 
> "localhost:10.0"
> 264: Error in startup script: couldn't connect to display "localhost:10.0"

The Xauthority file is not available to the nightly build job. You can
share it using the XAUTHORITY environment variable and putting it in a
place that both the user running the X server and the job know about and
can access.

See also the `xhost` tool for managing the file itself. You may need to
authorize other users to use the X server, but I've only needed that for
a setup here where the host provides a VNC server for a Docker image to
use (which also needs cross-host authentication allowances).

--Ben
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] PLplot contract test

2017-11-08 Thread Alan W. Irwin

On 2017-11-08 06:54-0500 Brad King wrote:

[...]

I've updated the test.  Change the name from _ARGS to _FLAGS:

```
CMake_TEST_CONTRACT_PLplot_CMAKE_FLAGS:STRING=-DBUILD_TEST=ON -DBUILD_DOC=ON 
-DBUILD_DOX_DOC=ON
```

[...]

I've added an option:

```
CMake_TEST_CONTRACT_PLplot_GIT_TAG:STRING=plplot-5.12.0
```

The value can be anything that `git checkout` understands
(tag, branch, commit sha1, etc.).


Hi Brad:

Thanks for these changes which all work well (see
 for
details).  The Contracts.PLplot test (for the current PLplot master
branch HEAD) passed in < 10 minutes (even with
all the extra documentation building I have configured) which is
acceptable when compared to the total length of this test.

As far as I can tell there is only one issue left which
is I get the following X11 authentication warnings when running this test in
Experimental mode.

# Check DISPLAY environment variable
software@raven> printenv |grep DISPLAY
DISPLAY=localhost:10.0

software@raven> time (nice -19 ctest -S 
~/cmake/Dashboards/Scripts/CMakeScripts/my_dashboard.cmake -VV >& ctest.out16)
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.

The only thing I can find in ctest.out16 corresponding to these
warnings is

264: application-specific initialization failed: couldn't connect to display 
"localhost:10.0"
264: Error in startup script: couldn't connect to display "localhost:10.0"

As a result of that error, the PLplot build system concludes Tk does
not work for the given platform and as a result it disables building
all Tk-related components of PLplot for this contract test.  Which
makes this contract test not quite as powerful as it should be.

What is going on behind the scenes is the PLplot build system executes
the Tk "wish" command to simply confirm version consistency.  So it is
used in a noninteractive way even though by default wish momentarily
displays a blank GUI before wish exits with the required version
information.

That works fine when I run cmake by hand to configure PLplot since for
those cases I never get the above X11 authentication errors.  And I
can launch any X application I like (such as wish or xterm) without
such authentication errors as well.  In other words, my X11
authentication environment is just fine.  As a result for my
interactive desktop environment, running wish with execute_process
and configuring PLplot always "just works".

But in Nightly mode, a crontab environment obviously does not include
a DISPLAY variable so any attempt to configure PLplot in that
environment would encounter this same error.  So I plan to
drop the wish version consistency check that is currently implemented
whenever the DISPLAY environment variable is not set, and I
am virtually positive that will fix this issue for the Nightly case.

However, it appears this planned change will NOT fix the issue for the
above Experimental case because I am pretty sure DISPLAY was defined
internally when the above ctest command was being executed (because
the error message referred to "localhost:10.0" which is the same as
the DISPLAY environment variable set before the above ctest command
was executed).  So if that proves to be the case, I also plan to drop
the wish-based version consistency checks when a particular PLplot
build-system option is set, and also set that option for the
Experimental case.  Of course, if that additional fix (beyond the
DISPLAY check) is necessary it smacks of a workaround for some X11
authentication issue for the CMake contract testing environment for
the Experimental case so I thought I should bring that issue to your
attention just in case there is an easy solution you could implement
for that issue.

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
__
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.

Re: [cmake-developers] PLplot contract test

2017-11-08 Thread Brad King
On 11/07/2017 03:50 PM, Alan W. Irwin wrote:
>> # Do build of PLplot as a ctest of CMake.
>> set(CMake_TEST_CONTRACT_PLplot:BOOL=ON)
>
> Why could I set garbage in the cache
> file as above with the result that that garbage was read
> and ignored with no error message?  Isn't that a CMake bug?

The `#` is a comment whiel the `//` is documentation.
The format of the cache entries themselves is *very* tolerant.
Your line set a variable called "set(CMake_TEST_CONTRACT_PLplot"
to the value "ON)".

> CMake_TEST_CONTRACT_PLplot_CMAKE_ARGS:STRING=-DBUILD_TEST=ON -DBUILD_DOC=ON 
> -DBUILD_DOX_DOC=ON

I've updated the test.  Change the name from _ARGS to _FLAGS:

```
CMake_TEST_CONTRACT_PLplot_CMAKE_FLAGS:STRING=-DBUILD_TEST=ON -DBUILD_DOC=ON 
-DBUILD_DOX_DOC=ON
```

> Finally, how can I change the default tag currently used
> ("plplot-5.13.0") for checking out PLplot?

I've added an option:

```
CMake_TEST_CONTRACT_PLplot_GIT_TAG:STRING=plplot-5.12.0
```

The value can be anything that `git checkout` understands
(tag, branch, commit sha1, etc.).

-Brad
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers