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
Assumed value of MB_LEN_MAX wrong with clang #26334
Comments
@nagisa Did you ever figure this out? It's stopping me from building rust :/ |
No. You'll have to use GCC.
…On Nov 23, 2017 12:32 PM, "Andrew Cann" ***@***.***> wrote:
@nagisa <https://github.com/nagisa> Did you ever figure this out? It's
stopping me from building rust :/
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#26334 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AApc0ih3_FidtlpXWy4_UybExhECEVhiks5s5UnZgaJpZM4Nu1Gd>
.
|
I can not reproduce this. Could you post the output of |
@orivej the
|
I see, I had I have read this part of the gcc manual:
It seems that there is no |
Triage I guess...I am running into this issue still. |
Somehow I used to bypass this problem but now I'm hitting it too. EDIT: this fails: echo -e '#include <limits.h>\n#include <stdlib.h>' |\
nix-shell -E 'with import <nixpkgs> {}; clangStdenv.mkDerivation { name = "name"; }' \
--run 'clang -ffreestanding -x c -' This works (presumably by lacking some include paths): echo -e '#include <limits.h>\n#include <stdlib.h>' |\
nix run nixpkgs.clang \
-c clang -ffreestanding -x c - EDIT2: so this works! (I had echo -e '#include <limits.h>\n#include <stdlib.h>' |\
nix-shell -E 'with import <nixpkgs> {}; clangStdenv.mkDerivation { name = "name"; }' \
--run 'env -u NIX_HARDENING_ENABLE clang -ffreestanding -x c -' EDIT3: presumably the correct way to do it (in the derivation expression): echo -e '#include <limits.h>\n#include <stdlib.h>' |\
nix-shell -E 'with import <nixpkgs> {}; clangStdenv.mkDerivation { name = "name"; hardeningDisable = [ "all" ]; }' \
--run 'clang -ffreestanding -x c -' |
If you're running into this while building rustc manually:
|
Hello, I'm a bot and I thank you in the name of the community for opening this issue. To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them. Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel. |
Issue description/Steps to reproduce
Compiling following snippet with
clang -ffreestanding foo.c
(and any other way to get clang such ascc
provided byclangStdenv
package):will fail with
This does not happen on Arch Linux, nor does it happen with GCC, nor does it happen without
-ffreestanding
, so I assume it is NixOS’ fault.Technical details
The text was updated successfully, but these errors were encountered: