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

Build and test CI on windows #73

Open
Shikugawa opened this issue Apr 28, 2021 · 3 comments
Open

Build and test CI on windows #73

Shikugawa opened this issue Apr 28, 2021 · 3 comments
Labels
help wanted Extra attention is needed tech debt technical debts

Comments

@Shikugawa
Copy link
Member

Shikugawa commented Apr 28, 2021

This issue is the follow-up of #71. Introduce CI for test on Windows. cc @makefriend8

@Shikugawa Shikugawa added the tech debt technical debts label Apr 28, 2021
@Shikugawa Shikugawa added the help wanted Extra attention is needed label May 25, 2021
@kezhenxu94
Copy link
Member

kezhenxu94 commented May 25, 2021

@Shikugawa I tried ever on MacOS and it seems to fail too, maybe we need another issue "Build and test CI on macOS"?

@Shikugawa
Copy link
Member Author

@kezhenxu94 Sounds good. But I'm not sure how to fail build on MacOS. Could you provide logs?

@kezhenxu94
Copy link
Member

kezhenxu94 commented May 25, 2021

There are multiple failed cases:

With Nothing Modified

git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
bazel build //...
ERROR: /private/var/tmp/_bazel_kezhenxu94/bbbd327888796972ebba4112d3e70ebd/external/upb/BUILD:127:18: in upb_proto_library rule @upb//:descriptor_upb_proto: 
Traceback (most recent call last):
	File "/private/var/tmp/_bazel_kezhenxu94/bbbd327888796972ebba4112d3e70ebd/external/upb/bazel/upb_proto_library.bzl", line 168, column 36, in _upb_proto_rule_impl
		if type(cc_info.linking_context.libraries_to_link) == "list":
Error: 'LinkingContext' value has no field or method 'libraries_to_link'
ERROR: Analysis of target '//cpp2sky/internal:async_client_interface' failed; build aborted: Analysis of target '@upb//:descriptor_upb_proto' failed
INFO: Elapsed time: 0.144s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 1 target configured)
    Fetching @remotejdk11_macos; fetching

With the following patch

diff --git a/.bazelrc b/.bazelrc
index b5e0104..a056e59 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,4 +1,7 @@
 build --enable_platform_specific_config
+build --incompatible_require_linker_input_cc_api=false
+build --features=-supports_dynamic_linker
+build:macos --cxxopt=-std=c++17
 build:linux --cxxopt=-std=c++17
 build:windows --cxxopt=-std:c++17
bazel build //...
INFO: Build options --cxxopt and --features have changed, discarding analysis cache.
INFO: Analyzed 24 targets (71 packages loaded, 4088 targets configured).
INFO: Found 24 targets...
ERROR: /Users/kezhenxu94/workspace/cpp2sky/test/BUILD:17:8: Linking test/propagation_test failed: (Exit 1): cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-fastbuild/bin/test/propagation_test-2.params

Use --sandbox_debug to see verbose messages from the sandbox cc_wrapper.sh failed: error executing command external/local_config_cc/cc_wrapper.sh @bazel-out/darwin-fastbuild/bin/test/propagation_test-2.params

Use --sandbox_debug to see verbose messages from the sandbox
duplicate symbol 'cpp2sky::createSpanContext(std::__1::basic_string_view<char, std::__1::char_traits<char> >)' in:
    bazel-out/darwin-fastbuild/bin/test/_objs/propagation_test/propagation_test.o
    bazel-out/darwin-fastbuild/bin/source/libcpp2sky_lib.a(propagation_impl.o)
duplicate symbol 'cpp2sky::createSpanContextExtension(std::__1::basic_string_view<char, std::__1::char_traits<char> >)' in:
    bazel-out/darwin-fastbuild/bin/test/_objs/propagation_test/propagation_test.o
    bazel-out/darwin-fastbuild/bin/source/libcpp2sky_lib.a(propagation_impl.o)
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
INFO: Elapsed time: 19.792s, Critical Path: 0.97s
INFO: 11 processes: 11 internal.
FAILED: Build did NOT complete successfully

It still failed when running bezel build //..., but the patch allows me to run bazel build //source/...

bazel build //source/...
INFO: Analyzed 4 targets (0 packages loaded, 0 targets configured).
INFO: Found 4 targets...
INFO: Elapsed time: 0.159s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action

OS Info

Screen Shot 2021-05-25 at 17 21 46

Screen Shot 2021-05-25 at 17 23 42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed tech debt technical debts
Projects
None yet
Development

No branches or pull requests

2 participants