Boost logo

Boost Users :

Subject: Re: [Boost-users] Which URL should I use in ExternalProject_Add
From: Fraser Hutchison (fraser.hutchison_at_[hidden])
Date: 2015-02-11 18:47:31



On 11/02/2015 11:07, Yi-Hong Lyu wrote:
Hello all,

I used CMake's ExternalProject_Add to download and build boost in my project. The URL I used is 'http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.zip/download' and it works. However I got an error several days ago like:

CMake Error: Problem with archive_read_open_file(): Unrecognized archive format

It seems that what I download by CMake becomes 'HTML document, ASCII text' rather than 'Zip archive data, at least v2.0 to extract'. Could you tell me which URL should I use in ExternalProject_Add?

Thanks,
Yi-Hong


_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

Hi there,

That URL should work fine.  CMake's ExternalProject_Add function has been able to handle zip files for several years as far as I'm aware.  I'd suggest ensuring you include the checksum in the command (use URL_HASH SHA1=1d479557177c49d74001c904979b60cce8cc2d12 for this particular download) in case the zip file is corrupted.

To try and debug the error more efficiently, you can download a copy of the boost zip file via a browser (check the hash after downloading) and use the full path to that local zip file as the URL in the ExternalProject_Add command.

Having said all that, I'd expect any of the other three compressed types to be a better choice since they're all significantly smaller.  Support for 7z only went in a few months ago, from CMake version 3.0.2 I think.

Cheers,
Fraser.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net