~motiejus/bazel-zig-cc

1

Re: bazel-zig-cc + rust

Details
Message ID
<CAFVMu-pvNx+peQYdge_fvmSGrHDmn78VmoYwTxkDgMjbzfVAwQ@mail.gmail.com>
DKIM signature
missing
Download raw message
On Tue, Aug 30, 2022 at 6:58 AM Kevin King <4kevinking@gmail.com> wrote:
>
> The error I get is
>
> linking with `/private/var/tmp/_bazel_kevin/c782d9784982eee1866a2e1ae5f6f353/external/zig_sdk/tools/c++` failed: exit status: 127
> [...]
>  = note: env: sh: No such file or directory
>
> This appears to mean /usr/bin/env is executed correctly, but env itself can't find sh. Linking succeeds when I change the zig wrapper to use /bin/sh directly, leading me to believe rust does not pass PATH down to the linker.

I asked in #zig:libera.chat, and Andrew pointed out that `/bin/sh` and
`/usr/bin/env` are the only two files in `/bin` and `/usr/bin`
respectively. So `#!/bin/sh` will work both NixOS and in your case,
since it's an absolute path.

I will make the change in bazel-zig-cc later today.

Motiejus

Re: bazel-zig-cc + rust

Details
Message ID
<CAMqOJrgjV8LLmJ8uLZNGN9NXhsSKhHR=b1_CsW_DRG9fGoOrdg@mail.gmail.com>
In-Reply-To
<CAFVMu-pvNx+peQYdge_fvmSGrHDmn78VmoYwTxkDgMjbzfVAwQ@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
Oh perfect! I'm glad there was a simple fix :)
Reply to thread Export thread (mbox)