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

builder error for mbedtls when using nix #20518

Open
despiegk opened this issue Jan 13, 2024 · 4 comments
Open

builder error for mbedtls when using nix #20518

despiegk opened this issue Jan 13, 2024 · 4 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@despiegk
Copy link
Contributor

despiegk commented Jan 13, 2024

Describe the bug

image
builder error: In file included from /Users/despiegk1/code/git.ourworld.tf/despiegk/crystaldev/code/v/thirdparty/mbedtls/library/aes.c:26:
/Users/despiegk1/code/git.ourworld.tf/despiegk/crystaldev/code/v/thirdparty/mbedtls/library/common.h:26:10: fatal error: 'mbedtls/build_info.h' file not found
#include "mbedtls/build_info.h"

Reproduction Steps

we have build a reproducible env base don nix see https://git.ourworld.tf/despiegk/crystaldev

this has ps some nice tricks how to get the same env with nothing but nix and vscode installed

Expected Behavior

cant compile, if in sandbox do

code/crystallib/cli/hero/compile_debug.sh

Current Behavior

gives compile error

Possible Solution

No response

Additional Information/Context

No response

V version

newest in nixos

Environment details (OS name and version, etc.)

arm, osx but nixos env (means is prob not using xcode...)

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@despiegk despiegk added the Bug This tag is applied to issues which reports bugs. label Jan 13, 2024
@despiegk
Copy link
Contributor Author

see the shell.nix to add more dependencies in environment, if needed I can make a development environment for you to go into

@despiegk
Copy link
Contributor Author

i just added

    glfw 
    freetype 
    openssl

to the shell.nix

and then I can't even compile v any more

./v1.exe -no-parallel -o v2.exe  cmd/v
==================
In file included from /tmp/v_502/v2.exe.14234125913187763928.tmp.c:1187:
/nix/store/znpzvyfzwjckpbjlaf07mp91nz50albf-gcc-12.3.0/lib/gcc/aarch64-apple-darwin/12.3.0/include/stdatomic.h:40:1: sorry, unimplemented: ‘_Atomic’ in Objective-C
   40 | typedef _Atomic _Bool atomic_bool;
      | ^~~~~~~
/nix/store/znpzvyfzwjckpbjlaf07mp91nz50albf-gcc-12.3.0/lib/gcc/aarch64-apple-darwin/12.3.0/include/stdatomic.h:41:1: sorry, unimplemented: ‘_Atomic’ in Objective-C
   41 | typedef _Atomic char atomic_char;
      | ^~~~~~~
/nix/store/znpzvyfzwjckpbjlaf07mp91nz50albf-gcc-12.3.0/lib/gcc/aarch64-apple-darwin/12.3.0/include/stdatomic.h:42:1: sorry, unimplemented: ‘_Atomic’ in Objective-C
   42 | typedef _Atomic signed char atomic_schar;
      | ^~~~~~~
/nix/store/znpzvyfzwjckpbjlaf07mp91nz50albf-gcc-12.3.0/lib/gcc/aarch64-apple-darwin/12.3.0/include/stdatomic.h:43:1: sorry, unimplemented: ‘_Atomic’ in Objective-C
   43 | typedef _Atomic unsigned char atomic_uchar;
...
==================
(Use `v -cg` to print the entire error message)

@despiegk
Copy link
Contributor Author

ps to recompile you can always, leave the shells, do start.sh again to go back (after changing the shell.nix)

then do

herotools install_v  --reset=true

which will re-compile v

@despiegk
Copy link
Contributor Author

let
  nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-23.11";
  pkgs = import nixpkgs { config = {}; overlays = []; };
in

pkgs.mkShell {
  packages = with pkgs; [
    git
    nushellFull
    mc
    jq
    # libtorrent-rasterbar
    # python311Packages.libtorrent-rasterbar
    python311Full
    python311Packages.ipython
    python311Packages.ipdb
    python311Packages.rq
    rsync
    rustc
    go
    duf
    gdu
    boehmgc
    libb2
    libgcc
    # gcc
    glfw 
    freetype 
    openssl
    # openssl_3_1

    # ustream-ssl-mbedtls //doesn't install
    # mbedtls 
    # mbedtls_2
    

  ];
  
  # BIN_MC = "${pkgs.mc}/bin";

  shellHook = ''
    cd $BASE
    git status
    echo $BASE
    $BASE/hero_shell.sh
  '';
}

this one works for compiling V, the same error for comiling hero, but at least now we know when we ask gcc V doesn't compile any more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

1 participant