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

Would it be possible to get rid of the dependency on GNU coreutils and GNU getopt on macOS? #263

Closed
s3rvac opened this issue Apr 1, 2018 · 4 comments

Comments

@s3rvac
Copy link
Member

s3rvac commented Apr 1, 2018

Currently, we require macOS users to have GNU coreutils and GNU getopt in PATH, with the additional requirement that GNU getopt has to be in PATH before the built-in getopt. I wonder if it would be possible to get rid of these two dependencies and just use the built-in macOS versions of various commands.

Currently, I am aware of the following commands and places where the GNU versions are needed:

  • greadlink in all our scripts inside scripts/ to find the path to the directory where each script is located
  • getopt in multiple scripts inside scripts/ (two retdec-* scripts and scripts in scripts/type_extractor)
  • gtimeout in scripts/retdec-archive-decompiler.sh
  • gsha256sum in cmake/install-share (the use of gsha256sum in there is already optional if you have shasum in your PATH)
@psifertex
Copy link

shasum is included by default in the standard MacOS install, isn't it? That sound solve the last one.

@psifertex
Copy link

"should solve", sorry.

@s3rvac
Copy link
Member Author

s3rvac commented Apr 13, 2018

Yes, the last one (sha256sum) should have already been solved since 0f1281e:

sha256hash()
{
    # To compute the SHA-256 hash, try several alternatives, based on what
    # command is available on the system.
    if command -v gsha256sum >/dev/null 2>&1; then
        gsha256sum "$@"
    elif command -v shasum >/dev/null 2>&1; then
        shasum -a 256 "$@"
    else
        sha256sum "$@"
    fi
}

@PeterMatula
Copy link
Collaborator

Fixed by replacing Bash scripts with Python (#147, #338).

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