vere
vere copied to clipboard
nix: fix vere compilation
Resolves #628
I would need someone on normal linux and mac to double check, if the avahi --with-distro=none
does not break builds. nixpkgs sets this, however, because avahi's configure does not support detecting nixos, or falling back to "none".
vere-devenv-chrootenv:chorus@devm-ckerr-tuxedo:~/repos/vere$ bazel build urbit
INFO: Analyzed target //:urbit (74 packages loaded, 12407 targets configured).
INFO: Found 1 target...
WARNING: /home/chorus/repos/vere/BUILD.bazel:174:8: input '.git' to //:version_str is a directory; dependency checking of directories is unsound
ERROR: /home/chorus/repos/vere/BUILD.bazel:174:8: Executing genrule //:version_str failed: (Exit 127): bash failed: error executing command (from target //:version_str) /nix/store/d7g21r3h111v3lcpm7pm2ngd51f6xw2h-bash/bin/bash -c ... (remaining 1 argument skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
/nix/store/a1s263pmsci9zykm5xcdf7x9rv26w6d5-bash-5.2p26/bin/bash: line 4: git: command not found
Target //pkg/vere:urbit failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 6.141s, Critical Path: 0.34s
INFO: 29 processes: 23 internal, 6 linux-sandbox.
FAILED: Build did NOT complete successfully
Consider .gitattributes
with ident
ident
When the attribute ident is set for a path, Git replaces $Id$ in the blob object with $Id:, followed by the 40-character hexadecimal blob object name,
followed by a dollar sign $ upon checkout. Any byte sequence that begins with $Id: and ends with $ in the worktree file is replaced with $Id$ upon
check-in.
chorus@devm-ckerr-tuxedo ~/r/vere (nix-build-fix)> nix develop
vere-devenv-chrootenv:chorus@devm-ckerr-tuxedo:~/repos/vere$ bazel build :urbit
INFO: Analyzed target //:urbit (1 packages loaded, 45 targets configured).
INFO: Found 1 target...
WARNING: /home/chorus/repos/vere/BUILD.bazel:174:8: input '.git' to //:version_str is a directory; dependency checking of directories is unsound
ERROR: /home/chorus/repos/vere/BUILD.bazel:174:8: Executing genrule //:version_str failed: (Exit 127): bash failed: error executing command (from target //:version_str) /nix/store/d7g21r3h111v3lcpm7pm2ngd51f6xw2h-bash/bin/bash -c ... (remaining 1 argument skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
/nix/store/a1s263pmsci9zykm5xcdf7x9rv26w6d5-bash-5.2p26/bin/bash: line 4: git: command not found
Target //pkg/vere:urbit failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 1.059s, Critical Path: 0.60s
INFO: 19 processes: 16 internal, 3 linux-sandbox.
FAILED: Build did NOT complete successfully
vere-devenv-chrootenv:chorus@devm-ckerr-tuxedo:~/repos/vere$ type git
git is /usr/bin/git
@resonant-riches this does not appear to be related to the changes in this PR. Would need to test this on a fresh install of nixos.
Also, the second case, after I added git to the flake.nix, may have been caused by the fact that bazel server lingers even when you close the devshell. So I would try again, and see if it works.
Also, the second case, after I added git to the flake.nix, may have been caused by the fact that bazel server lingers even when you close the devshell. So I would try again, and see if it works.
I tried again and got a different error: You need Perl 5
chorus@devm-ckerr-tuxedo ~/r/vere (nix-build-fix)> nix develop --command fish
vere-devenv-chrootenv:chorus@devm-ckerr-tuxedo:~/repos/vere$ bazel build :urbit
Starting local Bazel server and connecting to it...
INFO: Analyzed target //:urbit (75 packages loaded, 12407 targets configured).
INFO: Found 1 target...
WARNING: /home/chorus/repos/vere/BUILD.bazel:174:8: input '.git' to //:version_str is a directory; dependency checking of directories is unsound
ERROR: /home/chorus/.cache/bazel/_bazel_chorus/cb3f819785a86e2b88d412c18704e095/external/openssl/BUILD.bazel:8:15: Foreign Cc - Configure: Building openssl failed: (Exit 1): bash failed: error executing command (from target @openssl//:openssl) /nix/store/d7g21r3h111v3lcpm7pm2ngd51f6xw2h-bash/bin/bash -c bazel-out/k8-opt/bin/external/openssl/openssl_foreign_cc/wrapper_build_script.sh
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
rules_foreign_cc: Build failed!
rules_foreign_cc: Keeping temp build directory and dependencies directory for debug.
rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag.
rules_foreign_cc: Printing build logs:
_____ BEGIN BUILD LOGS _____
Bazel external C/C++ Rules. Building library openssl
Environment:______________
BUILD_SCRIPT=bazel-out/k8-opt/bin/external/openssl/openssl_foreign_cc/build_script.sh
EXT_BUILD_ROOT=/home/chorus/.cache/bazel/_bazel_chorus/cb3f819785a86e2b88d412c18704e095/sandbox/linux-sandbox/91/execroot/__main__
BUILD_LOG=bazel-out/k8-opt/bin/external/openssl/openssl_foreign_cc/Configure.log
PWD=/home/chorus/.cache/bazel/_bazel_chorus/cb3f819785a86e2b88d412c18704e095/sandbox/linux-sandbox/91/execroot/__main__
BUILD_WRAPPER_SCRIPT=bazel-out/k8-opt/bin/external/openssl/openssl_foreign_cc/wrapper_build_script.sh
TMPDIR=/tmp/nix-shell.MftQeK
EXT_BUILD_DEPS=/home/chorus/.cache/bazel/_bazel_chorus/cb3f819785a86e2b88d412c18704e095/sandbox/linux-sandbox/91/execroot/__main__/bazel-out/k8-opt/bin/external/openssl/openssl.ext_build_deps
BUILD_TMPDIR=/home/chorus/.cache/bazel/_bazel_chorus/cb3f819785a86e2b88d412c18704e095/sandbox/linux-sandbox/91/execroot/__main__/bazel-out/k8-opt/bin/external/openssl/openssl.build_tmpdir
SHLVL=2
BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
LD_LIBRARY_PATH=/run/opengl-driver/lib:/run/opengl-driver-32/lib
INSTALLDIR=/home/chorus/.cache/bazel/_bazel_chorus/cb3f819785a86e2b88d412c18704e095/sandbox/linux-sandbox/91/execroot/__main__/bazel-out/k8-opt/bin/external/openssl/openssl
PATH=/home/chorus/.cache/bazel/_bazel_chorus/cb3f819785a86e2b88d412c18704e095/sandbox/linux-sandbox/91/execroot/__main__:/nix/store/a1s263pmsci9zykm5xcdf7x9rv26w6d5-bash-5.2p26/bin:/nix/store/ifzwv2xqwdnv1gz87rxkizi67py5p3vj-coreutils-9.4/bin:/nix/store/ksyif7fp4p0baafvdm5szd375s7qf6cz-diffutils-3.10/bin:/nix/store/crlgnl1sdb0kkm30sq7ayis4d1mkhnik-file-5.45/bin:/nix/store/jg2i1qj5js5ckzvfq5b9p9j1gcv69750-findutils-4.9.0/bin:/nix/store/2s1h0q7xhk33nsw90l0g53bxax0d19ih-gawk-5.2.2/bin:/nix/store/avqi5nnx7qydr078ssgifc2hgzqipqgx-gnugrep-3.11/bin:/nix/store/bf9rz7vvxannxp15wfi7x0bx5b68ky7z-patch-2.7.6/bin:/nix/store/237dff1igc3v09p9r23a37yw8dr04bv6-gnused-4.9/bin:/nix/store/xwvgwr85gghbl66kj30sp19p2y1cypqv-gnutar-1.35/bin:/nix/store/vnfi66rm1dykn8gwwy5i4f48bhbk9x6x-gzip-1.13/bin:/nix/store/gd3shnza1i50zn8zs04fa729ribr88m9-python3-3.11.8/bin:/nix/store/ln17rjrvivr9b9306lc8r42mxvq9isyq-unzip-6.0/bin:/nix/store/xjmigm1527vc53dvd4a60fx0qj783lgs-which-2.21/bin:/nix/store/dpgvvvzgd8gwd948w0db1anrwdjzkz6j-zip-3.0/bin:/nix/store/a1s263pmsci9zykm5xcdf7x9rv26w6d5-bash-5.2p26/bin:/nix/store/ifzwv2xqwdnv1gz87rxkizi67py5p3vj-coreutils-9.4/bin:/nix/store/ksyif7fp4p0baafvdm5szd375s7qf6cz-diffutils-3.10/bin:/nix/store/crlgnl1sdb0kkm30sq7ayis4d1mkhnik-file-5.45/bin:/nix/store/jg2i1qj5js5ckzvfq5b9p9j1gcv69750-findutils-4.9.0/bin:/nix/store/2s1h0q7xhk33nsw90l0g53bxax0d19ih-gawk-5.2.2/bin:/nix/store/avqi5nnx7qydr078ssgifc2hgzqipqgx-gnugrep-3.11/bin:/nix/store/bf9rz7vvxannxp15wfi7x0bx5b68ky7z-patch-2.7.6/bin:/nix/store/237dff1igc3v09p9r23a37yw8dr04bv6-gnused-4.9/bin:/nix/store/xwvgwr85gghbl66kj30sp19p2y1cypqv-gnutar-1.35/bin:/nix/store/vnfi66rm1dykn8gwwy5i4f48bhbk9x6x-gzip-1.13/bin:/nix/store/gd3shnza1i50zn8zs04fa729ribr88m9-python3-3.11.8/bin:/nix/store/ln17rjrvivr9b9306lc8r42mxvq9isyq-unzip-6.0/bin:/nix/store/xjmigm1527vc53dvd4a60fx0qj783lgs-which-2.21/bin:/nix/store/dpgvvvzgd8gwd948w0db1anrwdjzkz6j-zip-3.0/bin:/run/wrappers/bin:/usr/bin:/usr/sbin:/nix/store/43n2dxi419b1jgv2bq1xg7y6n8k66xpb-patchelf-0.15.0/bin:/nix/store/ifzwv2xqwdnv1gz87rxkizi67py5p3vj-coreutils-9.4/bin:/nix/store/jg2i1qj5js5ckzvfq5b9p9j1gcv69750-findutils-4.9.0/bin:/nix/store/ksyif7fp4p0baafvdm5szd375s7qf6cz-diffutils-3.10/bin:/nix/store/237dff1igc3v09p9r23a37yw8dr04bv6-gnused-4.9/bin:/nix/store/avqi5nnx7qydr078ssgifc2hgzqipqgx-gnugrep-3.11/bin:/nix/store/2s1h0q7xhk33nsw90l0g53bxax0d19ih-gawk-5.2.2/bin:/nix/store/xwvgwr85gghbl66kj30sp19p2y1cypqv-gnutar-1.35/bin:/nix/store/vnfi66rm1dykn8gwwy5i4f48bhbk9x6x-gzip-1.13/bin:/nix/store/3bdjxil2cz8dkd6l5sf4qalla762m99d-bzip2-1.0.8-bin/bin:/nix/store/pg3wkw0as88676ib4ckbibrfwy5c5vzg-gnumake-4.4.1/bin:/nix/store/a1s263pmsci9zykm5xcdf7x9rv26w6d5-bash-5.2p26/bin:/nix/store/bf9rz7vvxannxp15wfi7x0bx5b68ky7z-patch-2.7.6/bin:/nix/store/jdg5lv2j7d765h8pn73qz72lilxrcb5x-xz-5.4.6-bin/bin:/nix/store/j3f0hag67n4piz2avqgf07gja8a2ifn6-file-5.45/bin:/home/chorus/.nix-profile/bin:/home/chorus/.local/bin:/home/chorus/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/nix/store/crlgnl1sdb0kkm30sq7ayis4d1mkhnik-file-5.45/bin:/nix/store/gd3shnza1i50zn8zs04fa729ribr88m9-python3-3.11.8/bin:/nix/store/ln17rjrvivr9b9306lc8r42mxvq9isyq-unzip-6.0/bin:/nix/store/xjmigm1527vc53dvd4a60fx0qj783lgs-which-2.21/bin:/nix/store/dpgvvvzgd8gwd948w0db1anrwdjzkz6j-zip-3.0/bin
_=/nix/store/ifzwv2xqwdnv1gz87rxkizi67py5p3vj-coreutils-9.4/bin/env
__________________________
+ mkdir -p /home/chorus/.cache/bazel/_bazel_chorus/cb3f819785a86e2b88d412c18704e095/sandbox/linux-sandbox/91/execroot/__main__/bazel-out/k8-opt/bin/external/openssl/openssl.build_tmpdir/openssl
+ ARFLAGS=rcsD
+ AR_FLAGS=rcsD
+ ASFLAGS=-O3
+ CFLAGS='-static --sysroot=/usr/local/x86_64-linux-musl -O3'
+ CXXFLAGS=-O3
+ LDFLAGS=--sysroot=/usr/local/x86_64-linux-musl
+ AR=/usr/local/x86_64-linux-musl/bin/x86_64-linux-musl-gcc-ar
+ CC=/usr/local/x86_64-linux-musl/bin/x86_64-linux-musl-gcc
+ CXX=/usr/local/x86_64-linux-musl/bin/x86_64-linux-musl-gcc
+ RANLIB=:
+ CPPFLAGS=
+ /home/chorus/.cache/bazel/_bazel_chorus/cb3f819785a86e2b88d412c18704e095/sandbox/linux-sandbox/91/execroot/__main__/external/openssl/config --prefix=/home/chorus/.cache/bazel/_bazel_chorus/cb3f819785a86e2b88d412c18704e095/sandbox/linux-sandbox/91/execroot/__main__/bazel-out/k8-opt/bin/external/openssl/openssl.build_tmpdir/openssl no-shared
Operating system: x86_64-whatever-linux2
You need Perl 5.
_____ END BUILD LOGS _____
rules_foreign_cc: Build wrapper script location: bazel-out/k8-opt/bin/external/openssl/openssl_foreign_cc/wrapper_build_script.sh
rules_foreign_cc: Build script location: bazel-out/k8-opt/bin/external/openssl/openssl_foreign_cc/build_script.sh
rules_foreign_cc: Build log location: bazel-out/k8-opt/bin/external/openssl/openssl_foreign_cc/Configure.log
Target //pkg/vere:urbit failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /home/chorus/repos/vere/pkg/vere/BUILD.bazel:155:12 Linking pkg/vere/urbit failed: (Exit 1): bash failed: error executing command (from target @openssl//:openssl) /nix/store/d7g21r3h111v3lcpm7pm2ngd51f6xw2h-bash/bin/bash -c bazel-out/k8-opt/bin/external/openssl/openssl_foreign_cc/wrapper_build_script.sh
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
INFO: Elapsed time: 12.975s, Critical Path: 7.12s
INFO: 265 processes: 14 internal, 251 linux-sandbox.
FAILED: Build did NOT complete successfully