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

[windows] Fix C++17 support on developer windows machines #19088

Merged
merged 1 commit into from
Oct 5, 2021

Conversation

pcmoritz
Copy link
Contributor

@pcmoritz pcmoritz commented Oct 5, 2021

Why are these changes needed?

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@pcmoritz
Copy link
Contributor Author

pcmoritz commented Oct 5, 2021

fixes #19070

@mattip
Copy link
Contributor

mattip commented Oct 5, 2021

Hmm. I get a few errors that I can move past, but then one I don't know how to fix. Is this because I am using bazel 3.6.0 ( the docs recommend 3.2)?

First, I get

    ERROR: BUILD.bazel:619:11: undeclared inclusion(s) in rule '//:stats_lib':
    this rule is missing dependency declarations for the following files included by 'src/ray/stats/metric_exporter.cc':
      'bazel-out/x64_windows-opt/bin/_virtual_includes/stats_lib/ray/stats/metric.h'
      'bazel-out/x64_windows-opt/bin/_virtual_includes/stats_lib/ray/stats/tag_defs.h'

which this fixed:

diff --git a/BUILD.bazel b/BUILD.bazel
index e36cd7f78..089161acd 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -627,6 +627,8 @@ cc_library(
         "src/ray/stats/metric_exporter.h",
         "src/ray/stats/metric_exporter_client.h",
         "src/ray/stats/stats.h",
+        "src/ray/stats/metric.h",
+        "src/ray/stats/tag_defs.h",
     ],
     copts = COPTS,
     linkopts = select({

Then, I got errors about missing directories, so I needed to

> mkdir python\ray\streaming\generated
> mkdir python\ray\serve\generated

Third, I needed to copy redis-server.exe

> mkdir python\ray\core\src\ray\thirdparty\redis\src
>copy bazel-ray-git\external\com_github_tporadowski_redis_bin\redis-server.exe python\ray\core\src\ray\thirdparty\redis\src```

But I was stumped by this one

 error: [Errno 2] No such file or directory: 'ray\\_raylet.pyd'

It seems something is getting skipped by bazel. I remember over 3500 build steps, but now I see less than 400.

@mattip
Copy link
Contributor

mattip commented Oct 5, 2021

OK, my bad. TL;DR: the fix works.

If I manually delete bazel-git/bazel-out (why doesn't git clean & git submodule foreach --recursive git clean -xfdd do it for me?), the build finishes and produces a wheel. I do see some worrying warnings about -std=c99:

 INFO: From Compiling external/com_github_grpc_grpc/third_party/address_sorting/address_sorting.c:
  cl : Command line warning D9002 : ignoring unknown option '-std=c99'
  INFO: From Compiling external/com_google_absl/absl/strings/internal/utf8.cc:
  cl : Command line warning D9025 : overriding '/W3' with '/w'
  INFO: From Compiling external/com_github_grpc_grpc/third_party/address_sorting/address_sorting_posix.c:
  cl : Command line warning D9002 : ignoring unknown option '-std=c99'

@pcmoritz pcmoritz merged commit 53f1d5d into ray-project:master Oct 5, 2021
@pcmoritz pcmoritz deleted the fix-windows-compilation branch October 5, 2021 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants