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

idris's wrapper should set IDRIS_CC to reduce the risk of accidentally using the wrong CC version #42785

Closed
catern opened this issue Jun 29, 2018 · 0 comments · Fixed by #42855

Comments

@catern
Copy link
Contributor

catern commented Jun 29, 2018

Idris requires a C compiler to function. To find a C compiler, it first checks IDRIS_CC, as implemented here: https://github.com/idris-lang/Idris-dev/blob/master/src/IRTS/System.hs#L63 and then searches PATH.

The current wrapper for the "idris" compiler binary appends /nix/store/...-gcc-wrapper/bin to the PATH. This unfortunately makes idris quite fragile: When my PATH has some bad program named "cc" on it, such as some ancient compiler that I've installed for whatever reason, idris will break. It's also a fairly unnecessary impurity.

We should set IDRIS_CC in the wrapper instead, when it is not already set. This allows the user to still override the C compiler that is used if they want to, while significantly lowering the chance that things will be unexpectedly broken.

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.

1 participant