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

LOG_TIME = ['/usr/bin/time', '-v'] in retdec-config.py option "-v" not valid on macOS #383

Closed
bmourit opened this issue Sep 4, 2018 · 3 comments

Comments

@bmourit
Copy link
Contributor

bmourit commented Sep 4, 2018

The version in /usr/bin/time on macOS does not accept the '-v' option. The workaround is to install gnu-time from homebrew which would then be under /usr/local/bin/gtime. If I get time, I may post a fix for this, but for now just reporting the issue.

PeterMatula added a commit that referenced this issue Sep 5, 2018
This is an internal argument that should not be used by the users. It
works only on Linux systems that have /usr/bin/time command.
@PeterMatula
Copy link
Collaborator

This command gets used only with option --generate-log. This is an internal option that was not meant to be used by the users. I hid it in commit d871f1e. We use it in internal tests that run on Linux servers and track decompilator's time and memory consumption. It was never meant to be run on macOS or Windows.

This issue can stay open if someone wants to make it portable to macOS (send a pull request), but we (RetDec team) will not be fixing this ourselves.

@bmourit
Copy link
Contributor Author

bmourit commented Sep 5, 2018

Thanks for the response. I only came across this while debugging. I thought it might be useful for anyone wishing to contribute/develop in the future. Thanks!

@s3rvac
Copy link
Member

s3rvac commented Jan 1, 2019

A note for people who try to fix this issue: Removing the -v parameter on macOS does not represent a full solution as our scripts assume that /usr/bin/time is run with -v. Apart from other information, the -v parameter makes /usr/bin/time produce memory usage of the tracked program, which we then parse in our scripts. Without -v, the used memory will always be 0, which will make results incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants