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

cc-wrapper: Resolve mktemp and rm path statically #271339

Closed
wants to merge 3 commits into from
Closed

cc-wrapper: Resolve mktemp and rm path statically #271339

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 1, 2023

This commit converts cc-wrapper.sh into a .nix file consisting of
one large string.  This will allow future commits to hoist
conditionals out of bash code, into Nix code.  This allows to add or
remove conditional code from the cc-wrapper **without causing
rebuilds on platforms where the condition is false**.
@ghost ghost marked this pull request as ready for review December 1, 2023 01:53
@ghost ghost requested a review from Ericson2314 as a code owner December 1, 2023 01:53
@ghost ghost requested a review from malt3 December 1, 2023 01:55
Adam Joseph and others added 2 commits November 30, 2023 18:15
Without this, mktemp (and rm) from the host environment is picked up.
This may result in mktemp behaving differently (on darwin) or mktemp / rm not being found at all.

Adapted from:

  77c5993

Co-Authored-By: Malte Poll <[email protected]>
@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Dec 1, 2023
@ghost ghost closed this Jan 23, 2024
@ghost ghost deleted the pr/cc-wrapper/mktemp branch January 23, 2024 06:47
@aherrmann
Copy link
Member

Was this closed in favor of another PR or merged in another way? If not, may I ask why this was closed?

As I understand it this change would resolve the issue that #271159 aimed to resolve, see also #258607 (comment) for another relevant thread.

I recently encountered the same issue when running a Nix provided GHC in a restricted environment on MacOS. In that case mktemp was not found in the restricted environment. The Nix provided GHC invokes cc-wrapper as part of compilation, which then fails to execute mktemp.

cc @avdv

@katexochen
Copy link
Contributor

@aherrmann @malt3 I think the closing of this PR happened in in the light of #50105 (comment).

Maybe you can cherry-pick and open a new PR or wait some days until things have calmed a little.

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

Successfully merging this pull request may close these issues.

2 participants