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

Failure to compile on Windows/MSVC #15

Closed
lamarqua opened this issue Sep 28, 2017 · 4 comments
Closed

Failure to compile on Windows/MSVC #15

lamarqua opened this issue Sep 28, 2017 · 4 comments

Comments

@lamarqua
Copy link

lamarqua commented Sep 28, 2017

E:\Home\dev\ext-repos\abseil-cpp
λ bazel.exe test absl/...:all
____Loading package: @local_config_cc//
____Loading complete.  Analyzing...
____Found 40 targets and 54 test targets...
____Building...
ERROR: E:/home/dev/ext-repos/abseil-cpp/absl/numeric/BUILD.bazel:11:1: C++ compilation of rule '//absl/numeric:int128' failed (Exit 2).
cl : Command line error D8021 : invalid numeric argument '/Wextra'
____Elapsed time: 1,210s, Critical Path: 0,07s
//absl/algorithm:algorithm_test                                       NO STATUS
//absl/algorithm:container_test                                       NO STATUS
//absl/base:bit_cast_test                                             NO STATUS
//absl/base:call_once_test                                            NO STATUS
//absl/base:config_test                                               NO STATUS
//absl/base:endian_test                                               NO STATUS
//absl/base:invoke_test                                               NO STATUS
//absl/base:low_level_alloc_test                                      NO STATUS
//absl/base:malloc_extension_system_malloc_test                       NO STATUS
//absl/base:raw_logging_test                                          NO STATUS
//absl/base:spinlock_test                                             NO STATUS
//absl/base:sysinfo_test                                              NO STATUS
//absl/base:thread_identity_test                                      NO STATUS
//absl/base:throw_delegate_test                                       NO STATUS
//absl/container:fixed_array_test                                     NO STATUS
//absl/container:fixed_array_test_noexceptions                        NO STATUS
//absl/container:inlined_vector_test                                  NO STATUS
//absl/container:inlined_vector_test_noexceptions                     NO STATUS
//absl/container:test_instance_tracker_test                           NO STATUS
//absl/debugging:disabled_leak_check_test                             NO STATUS
//absl/debugging:leak_check_no_lsan_test                              NO STATUS
//absl/debugging:leak_check_test                                      NO STATUS
//absl/memory:memory_test                                             NO STATUS
//absl/meta:type_traits_test                                          NO STATUS
//absl/numeric:int128_test                                            NO STATUS
//absl/strings:char_map_test                                          NO STATUS
//absl/strings:escaping_test                                          NO STATUS
//absl/strings:match_test                                             NO STATUS
//absl/strings:memutil_test                                           NO STATUS
//absl/strings:numbers_test                                           NO STATUS
//absl/strings:ostringstream_test                                     NO STATUS
//absl/strings:resize_uninitialized_test                              NO STATUS
//absl/strings:str_cat_test                                           NO STATUS
//absl/strings:str_join_test                                          NO STATUS
//absl/strings:str_replace_test                                       NO STATUS
//absl/strings:str_split_test                                         NO STATUS
//absl/strings:string_view_test                                       NO STATUS
//absl/strings:strip_test                                             NO STATUS
//absl/strings:substitute_test                                        NO STATUS
//absl/strings:utf8_test                                              NO STATUS
//absl/synchronization:barrier_test                                   NO STATUS
//absl/synchronization:blocking_counter_test                          NO STATUS
//absl/synchronization:graphcycles_test                               NO STATUS
//absl/synchronization:mutex_test                                     NO STATUS
//absl/synchronization:notification_test                              NO STATUS
//absl/synchronization:per_thread_sem_test                            NO STATUS
//absl/time:time_test                                                 NO STATUS
//absl/types:any_test                                                 NO STATUS
//absl/types:any_test_noexceptions                                    NO STATUS
//absl/types:optional_test                                            NO STATUS
//absl/types:span_test                                                NO STATUS
//absl/types:span_test_noexceptions                                   NO STATUS
//absl/utility:utility_test                                           NO STATUS

Executed 0 out of 54 tests: 1 fails to build and 53 were skipped.

This is using Visual Studio Community 2017.

It seems that the error "invalid numeric argument /Wextra" comes from the fact that it's a gcc / clang exclusive that's being applied to cl.exe.

@zhangxy988
Copy link
Contributor

Please try bazel.exe test --action_env=TMP=C:\Windows\Temp --cpu=x64_windows_msvc absl/...:all. This worked when I last tried.
The --cpu option is to fix your particular error.
The --action_env is for any death_test which requires creating file in temporary directory and bazel doesn't inherit environment variables.

@fcharlie
Copy link

Why not use vcpkg install abseil, see vcpkg commit:
microsoft/vcpkg@c957331
microsoft/vcpkg@9f9b4bc

@derekmauro
Copy link
Member

@zhangxy988 this is fixed by cc4bed2, correct?

@zhangxy988
Copy link
Contributor

Yes, the --cpu option should no longer be needed.
The --action_env option is probably still needed for death_test to pass, but that's really a bazel-related issue.

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

No branches or pull requests

4 participants