Skip to content

Invalid file links in 1.4 release candidate #2046

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

Closed
drwells opened this issue Feb 21, 2019 · 14 comments
Closed

Invalid file links in 1.4 release candidate #2046

drwells opened this issue Feb 21, 2019 · 14 comments

Comments

@drwells
Copy link
Contributor

drwells commented Feb 21, 2019

I downloaded a copy of the 1.4 release candidate earlier and noticed some odd errors:

tar: libmesh-1.4.0-rc1/contrib/tecplot/binary/lib/x86_64-apple-darwin12.5.0/tecio.a:
Cannot hard link to ‘libmesh-1.4.0-rc1/contrib/tecplot/binary/lib/x86_64-apple-darwin13.1.0/tecio.a’:
Invalid cross-device link
tar: Exiting with failure status due to previous errors

This only occurs for some of the tecio.a archives: I see tar errors for (Darwin) 10.8.0, 12.2.0, 11.4.2, 12.2.1, 10.7.0, and 12.5.0 and x86_64-pc-linux-gnu. I believe the rest are fine (i.e., I found 16 archives but expected 23).

For the record: I am using AFS.

@jwpeterson
Copy link
Member

Thanks for this report! I will try and look into this and fix it before the next RC... Do you get this for all three of the file formats (gz, bz2, xz)? Do you get the same thing for the tarball provided by GitHub?

@drwells
Copy link
Contributor Author

drwells commented Feb 21, 2019

@jwpeterson
Copy link
Member

Number 1 is a tarball generated by GitHub itself, numbers 2-4 we generate ourselves by running "make dist" and upload to the release manually. So it at least makes sense that all the broken ones came from the same source... also since you had the same problem with each I'm fairly certain the issue is with the underlying tar format and not the compression applied on top of it.

I have definitely seen problems in the past with tarballs generated by running "make dist" on OSX, so we always generate them on a Linux box now. I haven't seen a case where a Mac has trouble opening a tarball created under Linux. I also don't have a Mac handy at the moment for testing (and all of these untar for me just fine under Ubuntu) so I might need your help in tracking down the problem...

@drwells
Copy link
Contributor Author

drwells commented Feb 21, 2019

I can only reproduce this issue on my workstation; its likely due to something strange AFS is doing.

@jwpeterson
Copy link
Member

OK, well it's good there is the one working tarball from GitHub I guess... if I come across anything relevant I'll try and post on this issue. If anyone else out there on a Mac using AFS or not (maybe @milljm has a second to try this) wants to try unpacking one of these tarballs, that would also be awesome!

@drwells
Copy link
Contributor Author

drwells commented Feb 21, 2019

I think we may be talking about two different things: the AFS I am using is the distributed Linux file system, not the new Mac one.

@jwpeterson
Copy link
Member

Ha, indeed we were... the apple one is APFS.

@milljm
Copy link

milljm commented Feb 21, 2019

The files listed as having errors, extracts okay for me on Mojave with APSF.
But I see you guys have already figured that out...

John knows I have plenty of systems at my disposal. I wouldn't mind doing some testing.

@jwpeterson
Copy link
Member

Thanks @milljm!

If we are to believe this old forum post, it's possible that "The AFS filesystem doesn't do hard links between directories." That would explain why the tarball from GitHub works on your system, as it contains only symbolic links (which AFS does support) while the "make dist" tarballs turn all those symbolic links into hard links for some reason. I'm not sure whether it's possible to control this behavior within the automake build system.

@drwells
Copy link
Contributor Author

drwells commented Feb 21, 2019

Yup, thats definitely it: all the missing archives are hard-linked across directories.

@jwpeterson
Copy link
Member

FYI, I believe I've tracked this issue down to the command that "make dist" runs to create the tarballs, i.e.

tardir=libmesh-1.4.0-pre && tar --format=ustar -chf - "$tardir" | XZ_OPT=${XZ_OPT--e} xz -c >libmesh-1.4.0-pre.tar.xz

In particular, the -h flag they use, which does the following:

-h, --dereference
       Follow symlinks; archive and dump the files they point to.

I don't know exactly what they mean by "dump" but apparently it results in making a hard link in the tar archive. I can kind of see why they would use this option by default, so that you wouldn't accidentally make a tarball with a broken/dangling symbolic link to something outside the main repo, but I don't think we really need it for libmesh. If it's possible to control the tar options used by autoconf, I'd definitely consider removing the -h...

jwpeterson added a commit to jwpeterson/libmesh that referenced this issue Feb 21, 2019
jwpeterson added a commit to jwpeterson/libmesh that referenced this issue Feb 21, 2019
Instead of setting TAR_OPTIONS, I also tried calling
AC_SUBST(am__tar,[tar --hard-dereference]) but unforunately this
alternate approach did not work, perhaps the AC_SUBST comes too late
in the process to take effect or perhaps it is simply not possible to
do this. It was an off-hand remark in a mailing list [0], not an
officially sanctioned way of doing things.

[0]: http://gnu-automake.7480.n7.nabble.com/bug-19616-dist-tarball-contains-hardlinks-td21667.html

Refs libMesh#2046.
Refs libMesh#2029.
jwpeterson added a commit that referenced this issue Feb 22, 2019
Instead of setting TAR_OPTIONS, I also tried calling
AC_SUBST(am__tar,[tar --hard-dereference]) but unforunately this
alternate approach did not work, perhaps the AC_SUBST comes too late
in the process to take effect or perhaps it is simply not possible to
do this. It was an off-hand remark in a mailing list [0], not an
officially sanctioned way of doing things.

[0]: http://gnu-automake.7480.n7.nabble.com/bug-19616-dist-tarball-contains-hardlinks-td21667.html

Refs #2046.
Refs #2029.
@jwpeterson
Copy link
Member

@drwells would you mind giving the RC2 release tarballs a try? They should not contain any hard links, so hopefully they will work on AFS now. Thanks.

@drwells
Copy link
Contributor Author

drwells commented Feb 22, 2019

It works: thanks a lot!

@jwpeterson
Copy link
Member

OK, good to know. The tarballs got about 10% bigger due to this change, but I think the extra portability is worth it.

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

3 participants