Skip to content

Conversation

@sauclovian-g
Copy link
Contributor

cp -r is producing inconsistent (and sometimes broken) results.

Fixes #1338.

cp -r is producing inconsistent (and sometimes broken) results.
@sauclovian-g
Copy link
Contributor Author

That seems to have done the trick, the crux-mir build artefacts are all about 60M and the new Ubuntu ones contain the same files as the previous MacOS ones.

@RyanGlScott
Copy link
Contributor

I accidentally ran into the same issue in https://github.com/GaloisInc/crucible/pull/1319/files#r1987985211, although I resolved it in a different way by just not copying them at all.

Alternatively, if we want to restore the previous behavior, we could implement a simpler solution: run cp -Lr instead of cp -r to follow symlinks. (This is what I plan to use in mir-json's CI—see GaloisInc/mir-json@3f91f8c.) I think that would be much simpler than using tar as an intermediate step, as is done here.

@sauclovian-g
Copy link
Contributor Author

sauclovian-g commented Mar 22, 2025

The standard/traditional way to copy a directory tree is tar-to-tar, which behaves reliably (unlike cp, which does not) so it should be this, not cp. cp options vary a lot and don't always behave consistently...

(for example, the macos cp(1) says "-L If the -R option is specified, all symbolic links are followed.")

@sauclovian-g
Copy link
Contributor Author

(anyway for the moment we need a bindist that has the rlibs in it, even though #1319 is the way forward)

@RyanGlScott
Copy link
Contributor

unlike cp, which does not

Can you elaborate more on this? Under what circumstances does cp -L not work reliably? I could certainly believe that it is not portable across operating systems, although I haven't seen as much in my CI testing in GaloisInc/mir-json@3f91f8c.

@sauclovian-g
Copy link
Contributor Author

The MacOS man page suggests (but doesn't clearly state) that -L only works with -R. We could probably use -LR (rather than -Lr) since we don't need to care about running on legacy systems. But tar is really the standard way to do this...

@sauclovian-g sauclovian-g merged commit e70ab88 into master Mar 24, 2025
32 checks passed
@sauclovian-g sauclovian-g deleted the 1338-ci-fix-rlibs branch March 24, 2025 18:46
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

Successfully merging this pull request may close these issues.

Ubuntu crux-mir builds are broken

4 participants