fx build
WARNING: Please opt in or out of fx metrics collection.
You will receive this warning until an option is selected.
To check what data we collect, run `fx metrics`
To opt in or out, run `fx metrics <enable|disable>
ninja: Entering directory `/Users/vimalkansal/fuchsia/out/default.zircon'
[2/11358] ACTION //kernel/lib/version:version-string.bin(//public/gn/toolchain:stub)
FAILED: kernel-version-string.bin
/usr/bin/env ../../zircon/kernel/lib/version/git-version-string.sh kernel-version-string.bin ../.. true
[13/11358] CC host-x64-mac-clang/obj/ABS_PATH/Users/vimalkansal/fuchsia/third_party/boringssl/src/crypto/fipsmodule/aes/libboringssl.aes_nohw.c.o
ninja: build stopped: subcommand failed.
Hint: run `fx build` with the option `--log LOGFILE` to generate a debug log if you are reporting a bug.
Can somebody please help ?
--
All posts must follow the Fuchsia Code of Conduct https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
---
You received this message because you are subscribed to the Google Groups "discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@fuchsia.dev.
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/discuss/25ac1469-2c1f-4214-8ec5-70430ad3c0a9n%40fuchsia.dev.
Hint: run `fx build` with the option `--log LOGFILE` to generate a debug log if you are reporting a bug.
I get this :(base) vimalkansal@Vimals-MBP fuchsia % bash --verbose zircon/kernel/lib/version/git-version-string.sh kernel-version-string.bin . true
#!/bin/bash
# Copyright 2016 The Fuchsia Authors
# Copyright (c) 2015 Travis Geiselbrecht
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT
readonly OUTFILE="$1"
readonly CHECKOUT_DIR="$2"
readonly DIRTY_CHECK="$3"
set -e
GIT_REV="git-$(git -C "$CHECKOUT_DIR" rev-parse HEAD 2>/dev/null)"
git -C "$CHECKOUT_DIR" rev-parse HEAD 2>/dev/null
if $DIRTY_CHECK && [ -n "$(git -C "$CHECKOUT_DIR" status --porcelain --untracked-files=no 2>/dev/null)" ]; then
GIT_REV+="-dirty"
fi
git -C "$CHECKOUT_DIR" status --porcelain --untracked-files=no 2>/dev/null
# Update the existing file only if it's changed.
if [ ! -r "$OUTFILE" ] || [ "$(<"$OUTFILE")" != "$GIT_REV" ]; then
# Make sure not to include a trailing newline!
printf '%s' "$GIT_REV" > "$OUTFILE"
fi
<"$OUTFILE"
(base) vimalkansal@Vimals-MBP fuchsia % cd out/default.zircon
(base) vimalkansal@Vimals-MBP default.zircon % bash -x ../../zircon/kernel/lib/version/git-version-string.sh kernel-version-string.bin ../.. true
+ readonly OUTFILE=kernel-version-string.bin
+ OUTFILE=kernel-version-string.bin
+ readonly CHECKOUT_DIR=../..
+ CHECKOUT_DIR=../..
+ readonly DIRTY_CHECK=true
+ DIRTY_CHECK=true
+ set -e
++ git -C ../.. rev-parse HEAD
+ GIT_REV=git-d6410119ff75ff6867707223944b43187867fd03
+ true
++ git -C ../.. status --porcelain --untracked-files=no
+ '[' -n '' ']'
+ '[' '!' -r kernel-version-string.bin ']'
+ printf %s git-d6410119ff75ff6867707223944b43187867fd03
Thx
Vimal
To view this discussion on the web visit https://groups.google.com/a/fuchsia.dev/d/msgid/discuss/CAK0PkCHh-yCveU%3D7%3Db9%2Buobffi3oBJ%2BHCRLEkxW4S8a%2BZs486w%40mail.gmail.com.
Which default shell are you using exactly? Looking at the git-version-string.sh script, it uses "$(< file)" which is Bash-specific, and may not be supported by zsh.
Gabriel
(base) vimalkansal@Vimals-MBP fuchsia % git diff
diff --git a/zircon/kernel/lib/version/git-version-string.sh b/zircon/kernel/lib/version/git-version-string.sh
index 6aba03b1bd9..708485fbc64 100755
--- a/zircon/kernel/lib/version/git-version-string.sh
+++ b/zircon/kernel/lib/version/git-version-string.sh
@@ -20,7 +20,7 @@ if $DIRTY_CHECK && [ -n "$(git -C "$CHECKOUT_DIR" status --porcelain --untracked
fi
# Update the existing file only if it's changed.
-if [ ! -r "$OUTFILE" ] || [ "$(<"$OUTFILE")" != "$GIT_REV" ]; then
+if [ ! -r "$OUTFILE" ] || [ "$(cat \"$OUTFILE\")" != "$GIT_REV" ]; then
# Make sure not to include a trailing newline!
printf '%s' "$GIT_REV" > "$OUTFILE"
fi
(base) vimalkansal@Vimals-MBP fuchsia %