On 2013-07-11 16:30-0700 Alan W. Irwin wrote:

These commands

file(DOWNLOAD
"http://download.gnome.org/sources/glib/2.32/glib-2.32.1.tar.xz";
"/home/software/plplot_svn/HEAD/plplot_allura/cmake/build_projects/cmake_downloaded_glib-2.32.1.tar.xz"
SHOW_PROGRESS STATUS status)
message(STATUS "Download status = ${status}")

instantly give me the following results:

-- [download 0% complete]
-- Download status = 1;"unsupported protocol"

I looked through the CMake source code for "unsupported protocol" and
it appears in Utilities/cmcurl/strerror.c as a result of error having
the value CURLE_UNSUPPORTED_PROTOCOL (i.e., 1).  But then I looked
further in the code for CURLE_UNSUPPORTED_PROTOCOL, and the places
where it is set (e.g., http protocol not supported) do not seem
relevant.  So I suspect something is getting clobbered so that
an error of 1 is being returned somewhere when that should not
be happening.  I did not find anything relevant to "tar.xz" within
the CMake source code.

I also did another experiment using the file protocol rather than the
http protocol.

software@raven> pwd
/home/software/plplot_svn/HEAD/plplot_allura/cmake/build_projects

software@raven> cat test.cmake
file(DOWNLOAD
"file:///home/software/plplot_svn/HEAD/plplot_allura/cmake/build_projects/glib-2.32.1.tar.xz"
"/home/software/plplot_svn/HEAD/plplot_allura/cmake/build_projects/cmake_downloaded_glib-2.32.1.tar.xz"
SHOW_PROGRESS STATUS status)
message(STATUS "Download status = ${status}")

software@raven> cmake -P test.cmake
-- [download 0% complete]
-- [download 100% complete]
-- Download status = 0;"no error"

software@raven> diff glib-2.32.1.tar.xz cmake_downloaded_glib-2.32.1.tar.xz

with no response indicating the two files are identical.  Thus, the
file protocol works fine for curl with *.tar.xz files, but not the
http protocol.

One further obvious experiment is to try curl (version 7.26.0-1+wheezy3) rather
than an indirect version of curl via cmake.

software@raven> curl -o curl-glib-2.32.1.tar.xz -L 
http://download.gnome.org/sources/glib/2.32/glib-2.32.1.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   332    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0   360    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 5994k  100 5994k    0     0   536k      0  0:00:11  0:00:11 --:--:--  941k

curl (if you use the -L option) deals fine with the http redirects
that wget also dealt with, and the resulting download was identical to
what I had downloaded via wget before.  So whatever the problem is, it
appears to be in the curl part of CMake but not in standalone
curl-7.26.0-1+wheezy3.

So I hope someone else will also try experiments to see if they can
discover _any_ http://*.tar.xz URL that can be downloaded by file(DOWNLOAD...).

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

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

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

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

Reply via email to