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

build-gnu.sh: /usr/bin/timeout should not be hardcoded to /usr/bin location #5193

Closed
zhitkoff opened this issue Aug 22, 2023 · 1 comment · Fixed by #5194
Closed

build-gnu.sh: /usr/bin/timeout should not be hardcoded to /usr/bin location #5193

zhitkoff opened this issue Aug 22, 2023 · 1 comment · Fixed by #5194

Comments

@zhitkoff
Copy link
Contributor

sed -i 's|^"\$@|/usr/bin/timeout 600 "\$@|' build-aux/test-driver

On MacOS Ventura (Version 13.5 (22G74), Apple Silicon) the timeout utility does not exist in /usr/bin and it is not possible to add it there (either by symlink or copy binary) without disabling system protection. This would probably be the case for most MacOS variants.
It is possible to add it to /usr/local/bin, but since build-gnu.sh hardcodes it to /usr/bin/timeout - that would not help.
Would it be better to either let shell to find timeout via PATH or check a couple system locations first and pick one that exists (i.e. check /usr/bin , /usr/local/bin ) ?
Workaround for now is to just edit build-aux/test-driver after it was generated or modify build-gnu.sh in local before running

@tertsdiepraam
Copy link
Member

That might indeed be better. We just need to make sure that we're using the system timeout not the uutils one. I suspect that's why it's written this way.

For context the absolute path was introduced here: #1766

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 a pull request may close this issue.

2 participants