Skip to content

std.zig.system: use both PATH and hardcoded locations to find env - #21540

Merged
andrewrk merged 2 commits into
ziglang:masterfrom
BratishkaErik:search-env-in-path
Jan 21, 2025
Merged

std.zig.system: use both PATH and hardcoded locations to find env#21540
andrewrk merged 2 commits into
ziglang:masterfrom
BratishkaErik:search-env-in-path

Conversation

@BratishkaErik

@BratishkaErikBratishkaErik commented Sep 28, 2024

Copy link
Copy Markdown
Contributor

Should help systems that have main env binary in different location than hardcoded /usr/bin/envduring build (not neccessarily always), like Nix/Guix, Termux, Gentoo Prefix etc.

Theoretically should close following issues, but it needs more testing from affected users:
#12156
#14146
#14577
#15898

Source for logic: #14146 (comment)

@alexrp

Copy link
Copy Markdown
Member

This has a merge conflict that looks to stem from #21430.

@BratishkaErik

Copy link
Copy Markdown
ContributorAuthor

This has a merge conflict that looks to stem from #21430.

Thanks, fixed :)

Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
Should help systems that have main `env` binary in different location
than hardcoded `/usr/bin/env` **during build** (not neccessarily always),
like Nix/Guix, Termux, Gentoo Prefix etc.
Related:
https://www.github.com/ziglang/zig/issues/12156https://www.github.com/ziglang/zig/issues/14146https://www.github.com/ziglang/zig/issues/14577https://www.github.com/ziglang/zig/issues/15898
Source for logic: https://www.github.com/ziglang/zig/issues/14146#issuecomment-2308984936
Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
@andrewrk
andrewrk merged commit 0595feb into ziglang:masterJan 21, 2025
@andrewrk

Copy link
Copy Markdown
Member

Thanks.

@andrewrkandrewrk added the release notes This PR should be mentioned in the release notes. label Jan 21, 2025
@alexrpalexrp mentioned this pull request Jan 21, 2025
andrewrk added a commit that referenced this pull request Jan 21, 2025
It caused an assertion failure when building Zig from source.
This reverts commit 0595feb, reversing
changes made to 744771d.
closes#22566closes#22568
@andrewrk

Copy link
Copy Markdown
Member

Reverted in 0bacb79

Fri3dNstuff pushed a commit to Fri3dNstuff/zig that referenced this pull request Jan 27, 2025
…v-in-path"
It caused an assertion failure when building Zig from source.
This reverts commit 0595feb, reversing
changes made to 744771d.
closesziglang#22566closesziglang#22568
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notesThis PR should be mentioned in the release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@BratishkaErik@alexrp@andrewrk