You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Zig doesn't expect this, it breaks out of the loop described here and doesn't properly add the header paths.
Possible Solutions:
Zig should adds support for passing -frandom-seed. Should be the ideal fix? Should just be about working on that loop mentioned above.
Also, idk if Zig is supposed to have feature parity with Clang, but frandom-seed seems to be mentioned here.
According to NixOS/nixpkgs#109033, NixOS currently lacks a way to disable this flag from being added.
As such, for people who just want to "ignore" the problem, they can add something like this to the shell.nix file:
# This is a workaround that needs to be revised
shellHook = ''
NIX_CFLAGS_COMPILE="$(echo "$NIX_CFLAGS_COMPILE" | sed -e "s/-frandom-seed=[^-]*//")"
'';
The text was updated successfully, but these errors were encountered:
I'm having a similar issue while building a zig 0.13 project inside of the devshell provided by github:Cloudef/zig2nix on macos. zig build worked fine until I added exe.linkSystemLibrary("libgit2"); to the build.zig file. Then it started erroring with
error: warning: Unrecognized C flag from NIX_CFLAGS_COMPILE: -isysroot
warning: Unrecognized C flag from NIX_CFLAGS_COMPILE: /nix/store/7n8zp0cpbnf1rf7d3dc7gi0x43iadqn3-sdkroot-11.0/MacOSX11.0.sdk
Problem:
NixOS fails to detect system header locations on Unstable, accompanied by the following error:
Tested on:
How to reproduce:
nix-shell
to install the required dependencies (raylib
in this case).zig build-exe cimport.zig -lc -lraylib
as per the code comment).The cause:
NixOS/nixpkgs#102251 added
-frandom-seed
as one of the flags ofNIX_CFLAGS_COMPILE
.An example of what happens after running
nix-shell -p raylib
:Since Zig doesn't expect this, it breaks out of the loop described here and doesn't properly add the header paths.
Possible Solutions:
Zig should adds support for passing
-frandom-seed
. Should be the ideal fix? Should just be about working on that loop mentioned above.Also, idk if Zig is supposed to have feature parity with Clang, but
frandom-seed
seems to be mentioned here.According to NixOS/nixpkgs#109033, NixOS currently lacks a way to disable this flag from being added.
As such, for people who just want to "ignore" the problem, they can add something like this to the
shell.nix
file:The text was updated successfully, but these errors were encountered: