Skip to content

Conversation

@mattsoulanille
Copy link
Member

@mattsoulanille mattsoulanille commented Aug 4, 2021

Some recent Bazel changes missed updating the browserstack-benchmark's build-deps script. This PR updates it.

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

Copy link
Collaborator

@lina128 lina128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ClaireXP
Copy link
Contributor

ClaireXP commented Aug 4, 2021

LGTM! I can send a followup PR so that the cloudbuild and yarn command use these local dependencies.

@gyagp
Copy link

gyagp commented Aug 26, 2021

After applying this PR, I'm still blocked at a later stage with below error messages (not related to this change):

1b0bda7dd/wasm-binaries.tbz2 failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
ERROR: An error occurred during the fetch of repository 'emscripten_bin_win':
Traceback (most recent call last):
File "C:/users/ygu5/_bazel_ygu5/qpnosdr3/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://storage.googleapis.com/webassembly/emscripten-releases-builds/win/89202930a98fe7f9ed59b574469a9471b0bda7dd/wasm-binaries.tbz2] to C:/users/ygu5/_bazel_ygu5/qpnosdr3/external/emscripten_bin_win/temp3704532630047136415/wasm-binaries.tbz2.tar.bz2: GET returned 404 Not Found
ERROR: Error fetching repository: Traceback (most recent call last):
File "C:/users/ygu5/_bazel_ygu5/qpnosdr3/external/bazel_tools/tools/build_defs/repo/http.bzl", line 111, column 45, in _http_archive_impl
download_info = ctx.download_and_extract(
Error in download_and_extract: java.io.IOException: Error downloading [https://storage.googleapis.com/webassembly/emscripten-releases-builds/win/89202930a98fe7f9ed59b574469a9471b0bda7dd/wasm-binaries.tbz2] to C:/users/ygu5/_bazel_ygu5/qpnosdr3/external/emscripten_bin_win/temp3704532630047136415/wasm-binaries.tbz2.tar.bz2: GET returned 404 Not Found
Analyzing: target //tfjs-backend-wasm/src/cc:tfjs-backend-wasm (1 packages loaded, 326 targets configured)
Fetching @emscripten_npm_win; Restarting.
Fetching @clog; fetching
Fetching @pthreadpool; fetching

Copy link
Collaborator

@lina128 lina128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mattsoulanille
Copy link
Member Author

I've updated this PR to make the browserstack-benchmark tool compatible with the latest Bazel changes.

@gyagp, the error you're seeing is caused by the Bazel emsdk toolchain not working on Windows yet: emscripten-core/emsdk#814 (because the browserstack-benchmark tool depends on tfjs-backend-wasm). I'll take another look at that issue, since it also blocks any Windows build that depends on tfjs-backend-wasm.

@haoyunfeix
Copy link
Contributor

With the fixed emscripten toolchain (using #5998), I still got error as below:

$ ./scripts/build-wasm.sh
+ yarn bazel build --symlink_prefix=wasm-dist/ -c opt //tfjs-backend-wasm/src/cc:tfjs-backend-wasm
yarn run v1.22.4
$ C:\workplace\submit\tfjs\tfjs-backend-wasm\node_modules\.bin\bazel build --symlink_prefix=wasm-dist/ -c opt //tfjs-backend-wasm/src/cc:tfjs-backend-wasm
INFO: Analyzed target //tfjs-backend-wasm/src/cc:tfjs-backend-wasm (1 packages loaded, 2 targets configured).
INFO: Found 1 target...
ERROR: C:/workplace/submit/tfjs/tfjs-backend-wasm/src/cc/BUILD:35:10: Linking tfjs-backend-wasm/src/cc/tfjs-backend-wasm.js failed: (Exit 1): emcc_link.bat failed: error ex
a2/bin/tfjs-backend-wasm/src/cc/tfjs-backend-wasm.js-2.params
emcc: warning: EXTRA_EXPORTED_RUNTIME_METHODS is deprecated, please use EXPORTED_RUNTIME_METHODS instead [-Wdeprecated]
Traceback (most recent call last):
  File "external\emsdk\emscripten_toolchain\link_wrapper.py", line 164, in <module>
    os.rename(os.path.join(outdir, 'tmp.tar'), output_file)
FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'bazel-out\\wasm-opt-ST-95dcf5f511a2\\bin\\tfjs-backend-wasm\\src\\cc\\tmp.tar' -> 'baze
Target //tfjs-backend-wasm/src/cc:tfjs-backend-wasm failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 8.511s, Critical Path: 5.28s
INFO: 2 processes: 2 internal.
FAILED: Build did NOT complete successfully
error Command failed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants