I got exactly the same error in doing something similar:
it is the untar phase based on cmake that seem to fail on some kind of tar:
in the untar phase, externalProject uses cmake -E tar xvf <tar file>
and this is the part that fail.
if I issue the command:

>cmake -E tar xzf boost-1.41.0.cmake0.tar.gz
or unpack and
cmake -E tar xf boost-1.41.0.cmake0.tar

got the same error
CMake Error: Problem with tar_extract_all(): Invalid argument

It seem somehow related to some kind of tar version or content:

for example it happened to me also getting the latest pycrypto http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.1.0.tar.gz

Probably we should issue a bug

HTH

Ben Medina wrote:
I'm trying to get ExternalProject_Add to work, using a tar.gz file as
the source. My experiment thus far is with boost, and my code looks
like this:

    include (ExternalProject)
    set (boost_libs_to_build program_options)
    ExternalProject_Add(
        boost
        URL 
http://sodium.resophonic.com/boost-cmake/1.41.0.cmake0/boost-1.41.0.cmake0.tar.gz
        CMAKE_ARGS -DBUILD_PROJECT=${boost_libs_to_build}
    )

This produces the boost target, as expected, but building the target
results in failure:

2>Performing download step (download and extract) for 'boost'
2>-- downloading...
2>     
src='http://sodium.resophonic.com/boost-cmake/1.41.0.cmake0/boost-1.41.0.cmake0.tar.gz'
2>     
dst='C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz'
2>     timeout='none'
2>-- downloading... done
2>-- extracting...
2>     
src='C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz'
2>     
dst='C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost'
2>-- extracting... [tar xfz]
2>CMake Error: Problem with tar_extract_all(): Invalid argument
2>CMake Error: Problem extracting tar:
C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz
2>-- extracting... [error clean up]
2>CMake Error at boost-stamp/extract-boost.cmake:30 (message):
2>  error: extract of
2>  
'C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz'
2>  failed

Is there any way to know exactly what is going wrong with the extraction?

Thanks,
Ben
_______________________________________________
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://www.cmake.org/mailman/listinfo/cmake



_______________________________________________
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://www.cmake.org/mailman/listinfo/cmake

Reply via email to