Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error installing: CMake Error: Problem with archive_write_finish_entry(): Can't restore time #10

Closed
sjackman opened this issue Aug 3, 2015 · 14 comments

Comments

@sjackman
Copy link
Contributor

sjackman commented Aug 3, 2015

I get the following error when installing salmon:

cd /var/tmp/sjackman/salmon20150803-27338-1qoka2g/salmon-0.4.2/external && /gsc/btl/linuxbrew/Cellar/cmake/3.3.0/bin/cmake -P /var/tmp/sjackman/salmon20150803-27338-1qoka2g/salmon-0.4.2/libcereal-prefix/src/libcereal-stamp/extract-libcereal.cmake
-- extracting...
     src='/var/tmp/sjackman/salmon20150803-27338-1qoka2g/salmon-0.4.2/external/cereal-v1.0.0.tgz'
     dst='/var/tmp/sjackman/salmon20150803-27338-1qoka2g/salmon-0.4.2/external/cereal-1.0.0'
-- extracting... [tar xfz]
CMake Error: Problem with archive_write_finish_entry(): Can't restore time
CMake Error: Problem extracting tar: /var/tmp/sjackman/salmon20150803-27338-1qoka2g/salmon-0.4.2/external/cereal-v1.0.0.tgz
-- extracting... [error clean up]
CMake Error at /var/tmp/sjackman/salmon20150803-27338-1qoka2g/salmon-0.4.2/libcereal-prefix/src/libcereal-stamp/extract-libcereal.cmake:33 (message):
  error: extract of
  '/var/tmp/sjackman/salmon20150803-27338-1qoka2g/salmon-0.4.2/external/cereal-v1.0.0.tgz'
  failed

Is it possible to compile salmon with its external dependencies provided externally rather than vendored into salmon? What is cereal?

@sjackman
Copy link
Contributor Author

sjackman commented Aug 3, 2015

This cmake issue appears to be a bug in Linuxbrew. See Linuxbrew/legacy-linuxbrew#391

@rob-p
Copy link
Collaborator

rob-p commented Aug 3, 2015

Interesting! cereal is a C++ serialization library. Is the problem related to a specific version of cmake within Linuxbrew?

@sjackman
Copy link
Contributor Author

sjackman commented Aug 3, 2015

My guess, and this is a long shot, is that it's a bug in the tar library of cmake, that's made evident because my system at work has up-to-date Linux headers and glibc but is running an eight-year-old Linux kernel (CentOS 5.10). I can upgrade everything with Linuxbrew except the running kernel. I've seen this situation show bugs before when the software uses compile time kernel feature checks like HAVE_PIPE2 when it should be using a run time check, namely checking whether the call to pipe2 fails with ENOSYS.

@sjackman
Copy link
Contributor Author

sjackman commented Aug 3, 2015

Note that I do (now) have cereal installed, so there is no need for salmon to download and build it. It would be nice if this were an option to use the system-provided cereal library.

@rob-p
Copy link
Collaborator

rob-p commented Aug 3, 2015

Noted --- I'll add an option to look for it locally first.

@sjackman
Copy link
Contributor Author

sjackman commented Aug 3, 2015

Thanks, Rob!

No smart dashes in GFM? Shame. If you're on a Mac, Option-hyphen and Option-Shift-hyphen produce en- and em- dashes respectively. Option-semicolon produces an ellipsis. I use these three shortcuts all the time. Great for Twitter with limited characters.

@sjackman
Copy link
Contributor Author

sjackman commented Mar 8, 2016

I'm still experiencing this cmake error:

-- extracting... [tar xfz]
CMake Error: Problem with archive_write_finish_entry(): Can't restore time
CMake Error: Problem extracting tar: /var/tmp/sjackman/salmon20160307-4399-1vksuoo/salmon-0.6.0/external/libdivsufsort.zip
-- extracting... [error clean up]
CMake Error at /var/tmp/sjackman/salmon20160307-4399-1vksuoo/salmon-0.6.0/libdivsufsort-prefix/src/libdivsufsort-stamp/extract-libdivsufsort.cmake:33 (message):
  error: extract of
  '/var/tmp/sjackman/salmon20160307-4399-1vksuoo/salmon-0.6.0/external/libdivsufsort.zip'
  failed

Here's a gist of the logs:
https://gist.github.com/sjackman/2bbfcf212c555fb20505#file-02-make-L397-L404

@sjackman
Copy link
Contributor Author

sjackman commented Mar 8, 2016

Where does extract-libdivsufsort.cmake live? I don't find it in the salmon repository. Is it generated automatically by cmake? The following patch/hack using unzip works around the cmake -E tar xfz bug for me. It seems to only affect extracting the libdivsufsort.zip, perhaps because it's a .zip. If that is the case, and there's a .tar.gz distribution of libdivsufsort, then there may be a simple fix.

--- libdivsufsort-prefix/src/libdivsufsort-stamp/extract-libdivsufsort.cmake.orig   2016-03-07 22:02:35.000000000 -0800
+++ libdivsufsort-prefix/src/libdivsufsort-stamp/extract-libdivsufsort.cmake    2016-03-07 22:06:49.000000000 -0800
@@ -23,7 +23,7 @@
 # Extract it:
 #
 message(STATUS "extracting... [tar xfz]")
-execute_process(COMMAND ${CMAKE_COMMAND} -E tar xfz ${filename}
+execute_process(COMMAND unzip ${filename}
   WORKING_DIRECTORY ${ut_dir}
   RESULT_VARIABLE rv)

@rob-p
Copy link
Collaborator

rob-p commented Mar 8, 2016

extract-libdivsufsort.cmake is auto-generated during configuration. However, the zip itself is grabbed as part of RapMap (specifically, it resides here). I can take a look at what would be required to make it a tarball there (or, conversely, if there is a way to force CMake to use unzip rather than cmake -E tar xfz.

@sjackman
Copy link
Contributor Author

sjackman commented Mar 8, 2016

Here's the official tarball release of libdivsufsort:
https://github.com/y-256/libdivsufsort/archive/2.0.1.tar.gz

@rob-p
Copy link
Collaborator

rob-p commented Mar 8, 2016

I prefer to have it bundled within RapMap (but am willing to hear argument against this). Specifically, this allows that I have control over the availability (i.e. if the official repo disappears, RapMap will continue to build). Of course, the bundled zip was from a slightly updated version of the official libdivsufsort that incorporates a fix into the CMakeLists.txt file where the original failed. It would certainly be easy to just move the bundled version into a tarball rather than a zip without any hassle.

@sjackman
Copy link
Contributor Author

sjackman commented Mar 8, 2016

It's still only a hypothesis that moving to a tarball would fix my issue. I noticed that once I hacked around this one error by using unzip instead, it seems to be working. Still, I think using a tarball rather than zip file is good style anyway.

@sjackman
Copy link
Contributor Author

sjackman commented Mar 9, 2016

The cmake archive_write_finish_entry(): Can't restore time issue affects both .zip files and .tar.gz files.

@sjackman
Copy link
Contributor Author

sjackman commented Mar 9, 2016

I've found a workaround that works for me! cmake -E fails wth Linux 2.6.18 (CentOS 5.11) but succeeds with Linux 2.6.32 (CentOS 6.6). So I'm building Salmon on a newer box, then I can run it on our cluster running ancient OS. Closing.

@sjackman sjackman closed this as completed Mar 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants