-
Notifications
You must be signed in to change notification settings - Fork 23
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
Replacing date/gdate with perl program #833
Conversation
I can probably delete these lines as well: llvm-backend/nix/llvm-backend.nix Lines 31 to 32 in f3e2923
They were added in #797 to fix an issue of using gdate on MacOS Homebrew.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Perl available by default in Ubuntu and Macs?
Do we need to add it as a dependency to the Dockerfiles?
Yes, Perl seems to be default in Ubuntu Focal (v5.30), Jimmy (v5.34), and MacOS 13 (v5.30)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's see what happens.
Seems ok if we are reasonably sure perl is always present on a system. Otherwise could always add perl as a runtime dependency for the nix built package here: llvm-backend/nix/llvm-backend.nix Line 17 in f3e2923
|
Yes, those should be deleted |
In #833 we changed from the built-in date command to perl for getting the system time in ms; this caused some weird interactions with the OS when installed via `kup`: runtimeverification/kup#80 This PR drops our use of `perl` and instead uses an equivalent `python3` command, which we already depend on when building the backend.
Fixes runtimeverification/k#3610
This PR replaces the use of
date
andgdate
, depending on the user system, to get the current timestamp in milliseconds with a simplePerl
program to improve compatibility across Unix-like systems.This modification is needed due to the following:
date
in MacOS is a FreeBSD version that doesn't support (return) timestamps in milliseconds as we need inllvm-kompile --profile
introduced by Add--profile
option tollvm-kompile
#793.gdate
isn't a default package nor a standalone package to be installed in MacOS. Instead, it's commonly installed withcoreutils
. We do not want to ask our users to install allcoreutils
when we only needgdate
from it and to use it in an optional flag.python time
andbash ${EPOCHREALTIME}
, but this was the simplest to use and with common default dependencies in Unix-like systems.