cmake fails to extract zip file on FAT filesystem


when running cmake -E tar x on a FAT32 filesystem, cmake fails to unpack the fle.
It reports “CMake Error: Problem with archive_write_finish_entry(): Can’t restore time”.

This comes from here:

So libarchive returns ARCHIVE_WARN, not ARCHIVE_FAILED.
Should cmake handle ARCHIVE_WARN really just as a warning and continue ?
It makes my build fail because the zip file is not unpacked.


I didn’t try this, but as another user, I would also expect CMake to only warn and continue extracting in this case. For example, when working with the flash drive on an embedded system would be a typical modern use case.

Any opinions ?
I found around 450 places in libarchive where ARCHIVE_WARN is returned.
I guess we don’t want to simply accept ARCHIVE_WARN as Ok everywhere and proceed.

Maybe accept ARCHIVE_WARN in this place ?

Other ideas ?