brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.66k stars 2.3k forks source link

Build failure - ERROR at //build/timestamp.gni:31:19: Script returned non-zero exit code. #8331

Open simonhong opened 4 years ago

simonhong commented 4 years ago

Recently, PR builder failed with this.

21:48:06  ERROR at //build/timestamp.gni:31:19: Script returned non-zero exit code.
21:48:06  build_timestamp = exec_script(compute_build_timestamp,
21:48:06                    ^----------
21:48:06  Current dir: /Users/jenkins/jenkins/workspace/fix_tor_profile_destroyer_dcheck/src/out/Release/
21:48:06  Command: python /Users/jenkins/jenkins/workspace/fix_tor_profile_destroyer_dcheck/src/build/compute_build_timestamp.py official
21:48:06  Returned 1.
21:48:06  stderr:
21:48:06  
21:48:06  Traceback (most recent call last):
21:48:06    File "/Users/jenkins/jenkins/workspace/fix_tor_profile_destroyer_dcheck/src/build/compute_build_timestamp.py", line 127, in <module>
21:48:06      sys.exit(main())
21:48:06    File "/Users/jenkins/jenkins/workspace/fix_tor_profile_destroyer_dcheck/src/build/compute_build_timestamp.py", line 113, in main
21:48:06      last_commit_timestamp = int(open(lastchange_file).read())
21:48:06  IOError: [Errno 2] No such file or directory: '/Users/jenkins/jenkins/workspace/fix_tor_profile_destroyer_dcheck/src/build/util/LASTCHANGE.committime'
21:48:06  
21:48:06  See //base/BUILD.gn:34:1: whence it was imported.
21:48:06  import("//build/timestamp.gni")
21:48:06  ^-----------------------------
21:48:06  See //BUILD.gn:70:5: which caused the file to be included.
21:48:06      "//base:base_perftests",
21:48:06      ^----------------------
21:48:06  null
21:48:06  null
21:48:06  npm ERR! code ELIFECYCLE
21:48:06  npm ERR! errno 1
21:48:06  npm ERR! brave@1.7.2 build: `node ./scripts/commands.js build "Release" "--channel=nightly" "--skip_signing"`
21:48:06  npm ERR! Exit status 1
21:48:06  npm ERR! 
21:48:06  npm ERR! Failed at the brave@1.7.2 build script.
21:48:06  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
NejcZdovc commented 4 years ago

++

AlexanderLanin commented 3 years ago

Just had the same issue (WSL2, Ubuntu 18.04.4) and following workaround works for me:

cd src
build/util/lastchange.py -o build/util/LASTCHANGE