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 failure on s390x #135

Closed
ajaygtm71 opened this issue Jun 28, 2018 · 17 comments
Closed

Build failure on s390x #135

ajaygtm71 opened this issue Jun 28, 2018 · 17 comments
Assignees

Comments

@ajaygtm71
Copy link

ajaygtm71 commented Jun 28, 2018

I'm trying to use Abseil-cpp which is dependency of Istio-proxy on big endian by following https://abseil.io/docs/cpp/quickstart but its failing with the following error:

ERROR: /home/ajay/.cache/bazel/_bazel_ajay/05774821e5b6d73b3dae6e2f79bcee31/external/com_google_absl/absl/base/BUILD.bazel:80:1: C++ compilation of rule '//absl/base:malloc_internal' failed (Exit 1)
In file included from absl/base/internal/low_level_alloc.cc:26:0:
./absl/base/internal/direct_mmap.h: In function 'void* absl::base_internal::DirectMmap(void*, size_t, int, int, int, off64_t)':
./absl/base/internal/direct_mmap.h:96:39: error: cast from 'void*' to 'uint32_t {aka unsigned int}' loses precision [-fpermissive]
       reinterpret_cast<uint32_t>(start), static_cast<uint32_t>(length),
                                       ^
./absl/base/internal/direct_mmap.h:99:10: error: 'reintrepret_cast' was not declared in this scope
   return reintrepret_cast<void*>(syscall(SYS_mmap, buf));
          ^
./absl/base/internal/direct_mmap.h:99:27: error: expected primary-expression before 'void'
   return reintrepret_cast<void*>(syscall(SYS_mmap, buf));
                           ^
./absl/base/internal/direct_mmap.h:99:27: error: expected ';' before 'void'
./absl/base/internal/direct_mmap.h:99:32: error: expected unqualified-id before '>' token
   return reintrepret_cast<void*>(syscall(SYS_mmap, buf));
                                ^
./absl/base/internal/direct_mmap.h:99:32: error: expected initializer before '>' token
./absl/base/internal/direct_mmap.h:95:12: warning: unused variable 'buf' [-Wunused-variable]
   uint32_t buf[6] = {
            ^
INFO: Elapsed time: 72.279s, Critical Path: 2.16s
INFO: 14 processes, linux-sandbox.
FAILED: Build did NOT complete successfully
//absl/algorithm:algorithm_benchmark                                  NO STATUS
//absl/algorithm:algorithm_test                                       NO STATUS
//absl/algorithm:container_test                                       NO STATUS
//absl/base:atomic_hook_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:exception_safety_testing_test                             NO STATUS
//absl/base:inline_variable_test                                      NO STATUS
//absl/base:invoke_test                                               NO STATUS
//absl/base:low_level_alloc_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_benchmark                                 NO STATUS
//absl/base:thread_identity_test                                      NO STATUS
//absl/base:throw_delegate_test                                       NO STATUS
//absl/container:fixed_array_benchmark                                NO STATUS
//absl/container:fixed_array_exception_safety_test                    NO STATUS
//absl/container:fixed_array_test                                     NO STATUS
//absl/container:fixed_array_test_noexceptions                        NO STATUS
//absl/container:inlined_vector_benchmark                             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:demangle_test                                        NO STATUS
//absl/debugging:disabled_leak_check_test                             NO STATUS
//absl/debugging:failure_signal_handler_test                          NO STATUS
//absl/debugging:leak_check_no_lsan_test                              NO STATUS
//absl/debugging:leak_check_test                                      NO STATUS
//absl/debugging:stack_consumption_test                               NO STATUS
//absl/debugging:symbolize_test                                       NO STATUS
//absl/memory:memory_exception_safety_test                            NO STATUS
//absl/memory:memory_test                                             NO STATUS
//absl/meta:type_traits_test                                          NO STATUS
//absl/numeric:int128_benchmark                                       NO STATUS
//absl/numeric:int128_test                                            NO STATUS
//absl/strings:ascii_test                                             NO STATUS
//absl/strings:char_map_benchmark                                     NO STATUS
//absl/strings:char_map_test                                          NO STATUS
//absl/strings:charconv_benchmark                                     NO STATUS
//absl/strings:charconv_bigint_test                                   NO STATUS
//absl/strings:charconv_parse_test                                    NO STATUS
//absl/strings:charconv_test                                          NO STATUS
//absl/strings:escaping_benchmark                                     NO STATUS
//absl/strings:escaping_test                                          NO STATUS
//absl/strings:match_test                                             NO STATUS
//absl/strings:memutil_benchmark                                      NO STATUS
//absl/strings:memutil_test                                           NO STATUS
//absl/strings:numbers_benchmark                                      NO STATUS
//absl/strings:numbers_test                                           NO STATUS
//absl/strings:ostringstream_benchmark                                NO STATUS
//absl/strings:ostringstream_test                                     NO STATUS
//absl/strings:resize_uninitialized_test                              NO STATUS
//absl/strings:str_cat_benchmark                                      NO STATUS
//absl/strings:str_cat_test                                           NO STATUS
//absl/strings:str_format_arg_test                                    NO STATUS
//absl/strings:str_format_bind_test                                   NO STATUS
//absl/strings:str_format_checker_test                                NO STATUS
//absl/strings:str_format_convert_test                                NO STATUS
//absl/strings:str_format_extension_test                              NO STATUS
//absl/strings:str_format_output_test                                 NO STATUS
//absl/strings:str_format_parser_test                                 NO STATUS
//absl/strings:str_format_test                                        NO STATUS
//absl/strings:str_join_benchmark                                     NO STATUS
//absl/strings:str_join_test                                          NO STATUS
//absl/strings:str_replace_benchmark                                  NO STATUS
//absl/strings:str_replace_test                                       NO STATUS
//absl/strings:str_split_benchmark                                    NO STATUS
//absl/strings:str_split_test                                         NO STATUS
//absl/strings:string_view_benchmark                                  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:blocking_counter_test                          NO STATUS
//absl/synchronization:graphcycles_benchmark                          NO STATUS
//absl/synchronization:graphcycles_test                               NO STATUS
//absl/synchronization:lifetime_test                                  NO STATUS
//absl/synchronization:mutex_benchmark                                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_benchmark                                            NO STATUS
//absl/time:time_test                                                 NO STATUS
//absl/time/internal/cctz:cctz_benchmark                              NO STATUS
//absl/time/internal/cctz:civil_time_test                             NO STATUS
//absl/time/internal/cctz:time_zone_format_test                       NO STATUS
//absl/time/internal/cctz:time_zone_lookup_test                       NO STATUS
//absl/types:any_exception_safety_test                                NO STATUS
//absl/types:any_test                                                 NO STATUS
//absl/types:any_test_noexceptions                                    NO STATUS
//absl/types:optional_exception_safety_test                           NO STATUS
//absl/types:optional_test                                            NO STATUS
//absl/types:span_test                                                NO STATUS
//absl/types:span_test_noexceptions                                   NO STATUS
//absl/types:variant_benchmark                                        NO STATUS
//absl/types:variant_exception_safety_test                            NO STATUS
//absl/types:variant_test                                             NO STATUS
//absl/utility:utility_test                                           NO STATUS

FAILED: Build did NOT complete successfully  

I also tried build the source using cmake . && make but got same error. Is it not supported on big endian. What could be the issue here?

@derekmauro derekmauro self-assigned this Jun 28, 2018
@derekmauro
Copy link
Member

I think uint32_t should actually be unsigned long in that function, but I don't have a way of testing on s390x. I can make the change, but if you could try testing it first that would be very helpful.

absl-federation-github pushed a commit that referenced this issue Jun 28, 2018
--
6769c6ebe79804063d68d70a5623a1475d63aeff by Alex Strelnikov <strel@google.com>:

Import of CCTZ from GitHub.

PiperOrigin-RevId: 202500218

--
c65cc4af08b8c48ca65f0816c1d2f59c7de7b0a5 by Derek Mauro <dmauro@google.com>:

Fix DirectMMap on s390x (GitHub #135).
This is *untested* because no s390x system is available.

PiperOrigin-RevId: 202484458

--
0ae7b628d7859cb3af169d007c29efd7917bb3ea by Abseil Team <absl-team@google.com>:

Changes the Holder's compile-type type decision making to a std::conditional for improved readability

PiperOrigin-RevId: 202340646
GitOrigin-RevId: 6769c6ebe79804063d68d70a5623a1475d63aeff
Change-Id: I8f9d049ee279b1b1e3381fdf7e6fe9a4ea228306
@astrelni
Copy link
Contributor

Changes uploaded with ba8d6cf. Please test these out and let us know.

@ajaygtm71
Copy link
Author

Now getting below error:

In file included from /home/test/abseil-cpp/absl/debugging/stacktrace.cc:43:0:
/home/test/abseil-cpp/absl/debugging/internal/stacktrace_config.h:71:2: error: #error Not supported yet
 #error Not supported yet
  ^
/home/test/abseil-cpp/absl/debugging/stacktrace.cc:48:3: error: #error Cannot calculate stack trace: will need to write for your environment
 # error Cannot calculate stack trace: will need to write for your environment
   ^
In file included from /home/test/abseil-cpp/absl/debugging/stacktrace.cc:54:0:
/home/test/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc:40:66: fatal error: windows.h: No such file or directory
compilation terminated.
absl/debugging/CMakeFiles/absl_stacktrace.dir/build.make:62: recipe for target 'absl/debugging/CMakeFiles/absl_stacktrace.dir/stacktrace.cc.o' failed
make[2]: *** [absl/debugging/CMakeFiles/absl_stacktrace.dir/stacktrace.cc.o] Error 1
CMakeFiles/Makefile2:546: recipe for target 'absl/debugging/CMakeFiles/absl_stacktrace.dir/all' failed
make[1]: *** [absl/debugging/CMakeFiles/absl_stacktrace.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

@ajaygtm71 ajaygtm71 reopened this Jun 29, 2018
@ajaygtm71 ajaygtm71 changed the title abseil-cpp failure on s390x abseil-cpp failure on big endian Jun 29, 2018
@derekmauro
Copy link
Member

A fix should be submitted early next week.

@derekmauro derekmauro changed the title abseil-cpp failure on big endian Build failure on s390x Jun 29, 2018
absl-federation-github pushed a commit that referenced this issue Jul 12, 2018
--
898e99cae89ca4cc27f86f719148f020d521dd58 by Abseil Team <absl-team@google.com>:

Update comment.

PiperOrigin-RevId: 204323401

--
b9d14db8b8a9dfb0e1cfb5967aaa0de1c4e94c42 by Abseil Team <absl-team@google.com>:

Internal change

PiperOrigin-RevId: 204178059

--
f3b5a667611a588aa06fea9168e997ef5cffa7ac by Abseil Team <absl-team@google.com>:

Fix a potential reinterpret_cast compile error in absl::InlinedVector

The current code will trigger a reinterpret_cast error enhanced by llvm r336738.

PiperOrigin-RevId: 204131536

--
cc87d7a8302ad4471c1a25781d6ec19c2ce1524e by Abseil Team <absl-team@google.com>:

Internal change.

PiperOrigin-RevId: 203979040

--
bc5cae3cfc72af1d3e786d5a3b59a47e205afec9 by Gennadiy Rozental <rogeeff@google.com>:

Internal: add internal logging hooks

PiperOrigin-RevId: 203850605

--
503655c248f557f677c920078613522b010e73c8 by Derek Mauro <dmauro@google.com>:

Cleanup stacktrace_config.h

Instead of listing the platforms that aren't supported, list the ones
we do support, and fallback to stacktrace_unimplemented-inl.inc at the
end. Previously any platform that wasn't listed gets "#error Not supported yet".

GitHub issue #135

PiperOrigin-RevId: 203823079

--
cb69925c4cacc14558cf103a09f218c37f466a16 by Abseil Team <absl-team@google.com>:

Fix a minor typo in absl::variant documentation.

PiperOrigin-RevId: 203679877

--
23a0e4db10039011fa5fd879fb73d2f2bbd17301 by Abseil Team <absl-team@google.com>:

Format .bzl files with buildifier

PiperOrigin-RevId: 203461813

--
1ad02616bdb715dfdc7f1a73313e383f4ededa03 by Abseil Team <absl-team@google.com>:

Make the absl::SleepFor() tests treat any successful retry within
a 48x deadline as a total success, thereby reducing flakiness.

PiperOrigin-RevId: 203401603

--
b3dccbbc6563ea0173527076a3fff21433d48f47 by Abseil Team <absl-team@google.com>:

Replace config_setting.values{"compiler"} with config_setting.flag_values{"@bazel_tools//tools/cpp:compiler"}

Due to changes in Bazel we need to change the way "compiler" is specified in config_setting. This will not change the behavior of the config_setting itself.

PiperOrigin-RevId: 203345693

--
170f1692537460a4ba1756d34852275899c2339b by Matt Armstrong <marmstrong@google.com>:

Address test flakiness in the TimeoutTest.

The basic idea is to loop forever until the expected
scheduling delays are observed (within reasonable bounds),
and only then assert the other invariants.

PiperOrigin-RevId: 203188162
GitOrigin-RevId: 898e99cae89ca4cc27f86f719148f020d521dd58
Change-Id: Ie853ec050afa3a04c519393afe666bc03e11dc87
@zhangxy988
Copy link
Contributor

0268795 should fix this. Please confirm.

@ajaygtm71
Copy link
Author

Here is the error from make:

[ 61%] Building CXX object absl/debugging/CMakeFiles/absl_examine_stack.dir/internal/examine_stack.cc.o
/home/test/abseil-cpp/absl/debugging/internal/examine_stack.cc:59:2: error: #error "Undefined Architecture."
 #error "Undefined Architecture."
  ^
make[2]: *** [absl/debugging/CMakeFiles/absl_examine_stack.dir/internal/examine_stack.cc.o] Error 1
make[1]: *** [absl/debugging/CMakeFiles/absl_examine_stack.dir/all] Error 2
make: *** [all] Error 2

@derekmauro
Copy link
Member

Another patch is coming. In the mean time, can you post the output with bazel build -k? The -k means bazel will keep going after an error so that we can see if anything else also needs to be fixed. I wish I had a machine I could just test this on myself.

derekmauro added a commit to derekmauro/abseil-cpp that referenced this issue Jul 13, 2018
This is UNTESTED - Abseil GitHub issue abseil#135
@derekmauro
Copy link
Member

Actually, can you give my s390x branch a try before I commit it here? https://github.com/derekmauro/abseil-cpp/tree/s390x

@ajaygtm71
Copy link
Author

output of bazel build -k on both master and derek's s390x branch:

Starting local Bazel server and connecting to it...
.....................
Loading:
Loading: 0 packages loaded
Analyzing: 0 targets (0 packages loaded)
Analyzing: 0 targets (2 packages loaded)
INFO: Analysed 0 targets (2 packages loaded).
INFO: Found 0 targets...
[0 / 1] [-----] BazelWorkspaceStatusAction stable-status.txt
INFO: Elapsed time: 2.509s, Critical Path: 0.01s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action

output of make -k on both master and derek's s390x branch:

[test@a87fc788a350 build]$ make -k
[  1%] Built target absl_dynamic_annotations
[  3%] Built target absl_malloc_internal
[  5%] Built target absl_spinlock_wait
[ 12%] Built target absl_base
[ 14%] Built target absl_throw_delegate
[ 15%] Built target absl_algorithm
[ 17%] Built target absl_container
[ 19%] Built target test_instance_tracker_lib
[ 21%] Built target absl_stack_consumption
[ 25%] Built target absl_stacktrace
[ 31%] Built target absl_symbolize
[ 33%] Built target absl_leak_check
[ 46%] Built target absl_strings
[ 47%] Built target absl_int128
[ 60%] Built target absl_time
[ 61%] Building CXX object absl/debugging/CMakeFiles/absl_examine_stack.dir/internal/examine_stack.cc.o
/home/test/derel-absiel/absl/debugging/internal/examine_stack.cc:59:2: error: #error "Undefined Architecture."
 #error "Undefined Architecture."
  ^
make[2]: *** [absl/debugging/CMakeFiles/absl_examine_stack.dir/internal/examine_stack.cc.o] Error 1
make[2]: Target `absl/debugging/CMakeFiles/absl_examine_stack.dir/build' not remade because of errors.
make[1]: *** [absl/debugging/CMakeFiles/absl_examine_stack.dir/all] Error 2
Scanning dependencies of target absl_synchronization
[ 61%] Building CXX object absl/synchronization/CMakeFiles/absl_synchronization.dir/barrier.cc.o
[ 62%] Building CXX object absl/synchronization/CMakeFiles/absl_synchronization.dir/blocking_counter.cc.o
[ 63%] Building CXX object absl/synchronization/CMakeFiles/absl_synchronization.dir/internal/create_thread_identity.cc.o
[ 64%] Building CXX object absl/synchronization/CMakeFiles/absl_synchronization.dir/internal/per_thread_sem.cc.o
[ 65%] Building CXX object absl/synchronization/CMakeFiles/absl_synchronization.dir/internal/waiter.cc.o
[ 66%] Building CXX object absl/synchronization/CMakeFiles/absl_synchronization.dir/internal/graphcycles.cc.o
[ 67%] Building CXX object absl/synchronization/CMakeFiles/absl_synchronization.dir/notification.cc.o
[ 67%] Building CXX object absl/synchronization/CMakeFiles/absl_synchronization.dir/mutex.cc.o
[ 68%] Linking CXX static library libabsl_synchronization.a
[ 68%] Built target absl_synchronization
Scanning dependencies of target absl_debugging
[ 69%] Building CXX object absl/debugging/CMakeFiles/absl_debugging.dir/absl_debugging_header_only_dummy.cc.o
[ 70%] Linking CXX static library libabsl_debugging.a
[ 70%] Built target absl_debugging
Scanning dependencies of target absl_memory
[ 71%] Building CXX object absl/memory/CMakeFiles/absl_memory.dir/absl_memory_header_only_dummy.cc.o
[ 72%] Linking CXX static library libabsl_memory.a
[ 72%] Built target absl_memory
Scanning dependencies of target absl_meta
[ 72%] Building CXX object absl/meta/CMakeFiles/absl_meta.dir/absl_meta_header_only_dummy.cc.o
[ 73%] Linking CXX static library libabsl_meta.a
[ 73%] Built target absl_meta
Scanning dependencies of target absl_numeric
[ 74%] Building CXX object absl/numeric/CMakeFiles/absl_numeric.dir/absl_numeric_header_only_dummy.cc.o
[ 75%] Linking CXX static library libabsl_numeric.a
[ 75%] Built target absl_numeric
Scanning dependencies of target absl_utility
[ 76%] Building CXX object absl/utility/CMakeFiles/absl_utility.dir/absl_utility_header_only_dummy.cc.o
[ 77%] Linking CXX static library libabsl_utility.a
[ 77%] Built target absl_utility
Scanning dependencies of target str_format_extension_internal
[ 78%] Building CXX object absl/strings/CMakeFiles/str_format_extension_internal.dir/internal/str_format/extension.cc.o
[ 79%] Building CXX object absl/strings/CMakeFiles/str_format_extension_internal.dir/internal/str_format/output.cc.o
[ 80%] Linking CXX static library libstr_format_extension_internal.a
[ 80%] Built target str_format_extension_internal
Scanning dependencies of target absl_span
[ 81%] Building CXX object absl/types/CMakeFiles/absl_span.dir/absl_span_header_only_dummy.cc.o
[ 81%] Linking CXX static library libabsl_span.a
[ 81%] Built target absl_span
Scanning dependencies of target str_format_internal
[ 82%] Building CXX object absl/strings/CMakeFiles/str_format_internal.dir/internal/str_format/arg.cc.o
[ 83%] Building CXX object absl/strings/CMakeFiles/str_format_internal.dir/internal/str_format/bind.cc.o
[ 83%] Building CXX object absl/strings/CMakeFiles/str_format_internal.dir/internal/str_format/extension.cc.o
[ 84%] Building CXX object absl/strings/CMakeFiles/str_format_internal.dir/internal/str_format/float_conversion.cc.o
[ 85%] Building CXX object absl/strings/CMakeFiles/str_format_internal.dir/internal/str_format/output.cc.o
[ 86%] Building CXX object absl/strings/CMakeFiles/str_format_internal.dir/internal/str_format/parser.cc.o
[ 87%] Linking CXX static library libstr_format_internal.a
[ 87%] Built target str_format_internal
Scanning dependencies of target absl_str_format
[ 88%] Building CXX object absl/strings/CMakeFiles/absl_str_format.dir/absl_str_format_header_only_dummy.cc.o
[ 89%] Linking CXX static library libabsl_str_format.a
[ 89%] Built target absl_str_format
Scanning dependencies of target absl_variant
[ 89%] Building CXX object absl/types/CMakeFiles/absl_variant.dir/bad_variant_access.cc.o
[ 90%] Linking CXX static library libabsl_variant.a
[ 90%] Built target absl_variant
Scanning dependencies of target absl_bad_any_cast
[ 91%] Building CXX object absl/types/CMakeFiles/absl_bad_any_cast.dir/bad_any_cast.cc.o
[ 92%] Linking CXX static library libabsl_bad_any_cast.a
[ 92%] Built target absl_bad_any_cast
Scanning dependencies of target absl_any
[ 93%] Building CXX object absl/types/CMakeFiles/absl_any.dir/absl_any_header_only_dummy.cc.o
[ 94%] Linking CXX static library libabsl_any.a
[ 94%] Built target absl_any
Scanning dependencies of target absl_bad_optional_access
[ 94%] Building CXX object absl/types/CMakeFiles/absl_bad_optional_access.dir/bad_optional_access.cc.o
[ 95%] Linking CXX static library libabsl_bad_optional_access.a
[ 95%] Built target absl_bad_optional_access
Scanning dependencies of target absl_optional
[ 96%] Building CXX object absl/types/CMakeFiles/absl_optional.dir/optional.cc.o
[ 97%] Linking CXX static library libabsl_optional.a
[ 97%] Built target absl_optional
make[1]: Target `all' not remade because of errors.
make: *** [all] Error 2
make: Target `default_target' not remade because of errors.

@derekmauro
Copy link
Member

Sorry, I should have been more explicit. I wanted the output of bazel build -k absl/...

It also doesn't look like this is the output my s390x branch, it looks like the output of my master branch. Be sure to switch to the s390x branch (git checkout s390x).

@ajaygtm71
Copy link
Author

output of bazel build -k absl/... on master:

[test@a87fc788a350 abseil-cpp]$ bazel build -k absl/...
Starting local Bazel server and connecting to it...
..........................................................................................
INFO: Analysed 157 targets (25 packages loaded).
INFO: Found 157 targets...
ERROR: /home/test/abseil-cpp/absl/base/BUILD.bazel:324:1: Couldn't build file absl/base/_objs/endian_test/absl/base/internal/endian_test.pic.o: C++ compilation of rule '//absl/base:endian_test' failed (Exit 1)
absl/base/internal/endian_test.cc:41:25: error: 'k8Value' was not declared in this scope
 const uint8_t k8ValueLE{k8Value};
                         ^~~~~~~
absl/base/internal/endian_test.cc:53:25: error: 'k8Value' was not declared in this scope
 const uint8_t k8ValueBE{k8Value};
                         ^~~~~~~
cc1plus: warning: unrecognized command line option '-Wno-unused-private-field'
INFO: From Compiling absl/debugging/symbolize_test.cc:
/tmp/ccuZhDRN.s: Assembler messages:
/tmp/ccuZhDRN.s:2407: Warning: ignoring changed section attributes for .text
ERROR: /home/test/abseil-cpp/absl/debugging/BUILD.bazel:79:1: Couldn't build file absl/debugging/_objs/examine_stack/absl/debugging/internal/examine_stack.pic.o: C++ compilation of rule '//absl/debugging:examine_stack' failed (Exit 1)
absl/debugging/internal/examine_stack.cc:59:2: error: #error "Undefined Architecture."
 #error "Undefined Architecture."
  ^~~~~
absl/debugging/internal/examine_stack.cc: In function 'void* absl::debugging_internal::GetProgramCounter(void*)':
absl/debugging/internal/examine_stack.cc:41:17: warning: unused variable 'context' [-Wunused-variable]
     ucontext_t* context = reinterpret_cast<ucontext_t*>(vuc);
                 ^~~~~~~
INFO: Elapsed time: 228.388s, Critical Path: 42.85s
INFO: 488 processes: 102 local, 386 processwrapper-sandbox.
FAILED: Build did NOT complete successfully

output on derek's s390x branch:

Starting local Bazel server and connecting to it...
....................................
INFO: Analysed 157 targets (25 packages loaded).
INFO: Found 157 targets...
INFO: From Compiling absl/debugging/symbolize_test.cc:
/tmp/cc5DY5px.s: Assembler messages:
/tmp/cc5DY5px.s:2407: Warning: ignoring changed section attributes for .text
ERROR: /home/test/derel-absiel/absl/base/BUILD.bazel:324:1: Couldn't build file absl/base/_objs/endian_test/absl/base/internal/endian_test.pic.o: C++ compilation of rule '//absl/base:endian_test' failed (Exit 1)
absl/base/internal/endian_test.cc:41:25: error: 'k8Value' was not declared in this scope
 const uint8_t k8ValueLE{k8Value};
                         ^~~~~~~
absl/base/internal/endian_test.cc:53:25: error: 'k8Value' was not declared in this scope
 const uint8_t k8ValueBE{k8Value};
                         ^~~~~~~
cc1plus: warning: unrecognized command line option '-Wno-unused-private-field'
INFO: Elapsed time: 210.561s, Critical Path: 41.36s
INFO: 492 processes: 102 local, 390 processwrapper-sandbox.
FAILED: Build did NOT complete successfully

@derekmauro
Copy link
Member

Thanks. I pushed another commit to my s390x branch to address the error in endian_test.cc. Can you sync that branch and post the output of bazel test -k absl/...? Hopefully this is the last time I'll need you to do this.

@ajaygtm71
Copy link
Author

Build was successful on recent s390x branch, output of bazel test -k absl/... :

INFO: Build completed, 22 tests FAILED, 105 total actions
//absl/algorithm:algorithm_test                                          PASSED in 0.0s
//absl/algorithm:container_test                                          PASSED in 0.0s
//absl/base:atomic_hook_test                                             PASSED in 0.0s
//absl/base:bit_cast_test                                                PASSED in 0.0s
//absl/base:call_once_test                                               PASSED in 0.1s
//absl/base:config_test                                                  PASSED in 0.7s
//absl/base:endian_test                                                  PASSED in 0.6s
//absl/base:exception_safety_testing_test                                PASSED in 0.0s
//absl/base:inline_variable_test                                         PASSED in 0.2s
//absl/base:invoke_test                                                  PASSED in 0.1s
//absl/base:low_level_alloc_test                                         PASSED in 4.3s
//absl/base:raw_logging_test                                             PASSED in 0.6s
//absl/base:spinlock_test                                                PASSED in 0.8s
//absl/base:thread_identity_test                                         PASSED in 0.2s
//absl/base:throw_delegate_test                                          PASSED in 0.1s
//absl/container:fixed_array_exception_safety_test                       PASSED in 0.1s
//absl/container:fixed_array_test                                        PASSED in 3.3s
//absl/container:fixed_array_test_noexceptions                           PASSED in 3.3s
//absl/container:inlined_vector_test                                     PASSED in 0.3s
//absl/container:inlined_vector_test_noexceptions                        PASSED in 0.3s
//absl/container:test_instance_tracker_test                              PASSED in 0.1s
//absl/debugging:demangle_test                                           PASSED in 0.1s
//absl/debugging:disabled_leak_check_test                                PASSED in 0.1s
//absl/debugging:failure_signal_handler_test                             PASSED in 2.4s
//absl/debugging:leak_check_no_lsan_test                                 PASSED in 0.1s
//absl/debugging:leak_check_test                                         PASSED in 0.1s
//absl/debugging:stack_consumption_test                                  PASSED in 0.1s
//absl/debugging:symbolize_test                                          PASSED in 0.1s
//absl/memory:memory_exception_safety_test                               PASSED in 0.1s
//absl/memory:memory_test                                                PASSED in 0.2s
//absl/meta:type_traits_test                                             PASSED in 0.1s
//absl/numeric:int128_test                                               PASSED in 0.5s
//absl/strings:ascii_test                                                PASSED in 0.1s
//absl/strings:char_map_test                                             PASSED in 0.3s
//absl/strings:charconv_bigint_test                                      PASSED in 0.6s
//absl/strings:charconv_parse_test                                       PASSED in 0.1s
//absl/strings:charconv_test                                             PASSED in 21.8s
//absl/strings:escaping_test                                             PASSED in 0.2s
//absl/strings:match_test                                                PASSED in 0.2s
//absl/strings:memutil_test                                              PASSED in 0.2s
//absl/strings:numbers_test                                              PASSED in 22.7s
//absl/strings:ostringstream_test                                        PASSED in 0.1s
//absl/strings:resize_uninitialized_test                                 PASSED in 0.5s
//absl/strings:str_cat_test                                              PASSED in 1.4s
//absl/strings:str_format_arg_test                                       PASSED in 0.1s
//absl/strings:str_format_bind_test                                      PASSED in 0.1s
//absl/strings:str_format_checker_test                                   PASSED in 0.2s
//absl/strings:str_format_convert_test                                   PASSED in 6.4s
//absl/strings:str_format_extension_test                                 PASSED in 0.1s
//absl/strings:str_format_output_test                                    PASSED in 0.1s
//absl/strings:str_format_parser_test                                    PASSED in 0.2s
//absl/strings:str_format_test                                           PASSED in 1.5s
//absl/strings:str_join_test                                             PASSED in 0.2s
//absl/strings:str_replace_test                                          PASSED in 0.1s
//absl/strings:str_split_test                                            PASSED in 12.7s
//absl/strings:string_view_test                                          PASSED in 12.8s
//absl/strings:strip_test                                                PASSED in 0.1s
//absl/strings:substitute_test                                           PASSED in 0.7s
//absl/strings:utf8_test                                                 PASSED in 0.1s
//absl/synchronization:barrier_test                                      PASSED in 1.0s
//absl/synchronization:blocking_counter_test                             PASSED in 1.1s
//absl/synchronization:graphcycles_test                                  PASSED in 5.1s
//absl/synchronization:lifetime_test                                     PASSED in 0.1s
//absl/synchronization:mutex_test                                        PASSED in 125.4s
//absl/synchronization:notification_test                                 PASSED in 0.2s
//absl/synchronization:per_thread_sem_test                               PASSED in 4.3s
//absl/time:time_test                                                    PASSED in 7.3s
//absl/time/internal/cctz:civil_time_test                                PASSED in 0.1s
//absl/time/internal/cctz:time_zone_format_test                          PASSED in 0.9s
//absl/time/internal/cctz:time_zone_lookup_test                          PASSED in 3.0s
//absl/types:any_exception_safety_test                                   PASSED in 0.1s
//absl/types:any_test                                                    PASSED in 0.1s
//absl/types:any_test_noexceptions                                       PASSED in 0.1s
//absl/types:optional_exception_safety_test                              PASSED in 0.1s
//absl/types:optional_test                                               PASSED in 0.0s
//absl/types:span_test                                                   PASSED in 0.1s
//absl/types:span_test_noexceptions                                      PASSED in 0.1s
//absl/types:variant_exception_safety_test                               PASSED in 0.1s
//absl/types:variant_test                                                PASSED in 0.1s
//absl/utility:utility_test                                              PASSED in 0.0s
//absl/algorithm:algorithm_benchmark                                     FAILED in 2.3s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/algorithm/algorithm_benchmark/test.log
//absl/base:sysinfo_test                                                 FAILED in 1.3s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/base/sysinfo_test/test.log
//absl/base:thread_identity_benchmark                                    FAILED in 0.3s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/base/thread_identity_benchmark/test.log
//absl/container:fixed_array_benchmark                                   FAILED in 0.3s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/container/fixed_array_benchmark/test.log
//absl/container:inlined_vector_benchmark                                FAILED in 0.3s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/container/inlined_vector_benchmark/test.log
//absl/numeric:int128_benchmark                                          FAILED in 0.4s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/numeric/int128_benchmark/test.log
//absl/strings:char_map_benchmark                                        FAILED in 0.4s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/strings/char_map_benchmark/test.log
//absl/strings:charconv_benchmark                                        FAILED in 0.5s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/strings/charconv_benchmark/test.log
//absl/strings:escaping_benchmark                                        FAILED in 0.7s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/strings/escaping_benchmark/test.log
//absl/strings:memutil_benchmark                                         FAILED in 0.7s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/strings/memutil_benchmark/test.log
//absl/strings:numbers_benchmark                                         FAILED in 0.8s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/strings/numbers_benchmark/test.log
//absl/strings:ostringstream_benchmark                                   FAILED in 0.5s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/strings/ostringstream_benchmark/test.log
//absl/strings:str_cat_benchmark                                         FAILED in 0.5s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/strings/str_cat_benchmark/test.log
//absl/strings:str_join_benchmark                                        FAILED in 0.4s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/strings/str_join_benchmark/test.log
//absl/strings:str_replace_benchmark                                     FAILED in 0.7s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/strings/str_replace_benchmark/test.log
//absl/strings:str_split_benchmark                                       FAILED in 0.6s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/strings/str_split_benchmark/test.log
//absl/strings:string_view_benchmark                                     FAILED in 0.6s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/strings/string_view_benchmark/test.log
//absl/synchronization:graphcycles_benchmark                             FAILED in 0.3s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/synchronization/graphcycles_benchmark/test.log
//absl/synchronization:mutex_benchmark                                   FAILED in 0.3s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/synchronization/mutex_benchmark/test.log
//absl/time:time_benchmark                                               FAILED in 0.3s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/time/time_benchmark/test.log
//absl/time/internal/cctz:cctz_benchmark                                 FAILED in 0.3s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/time/internal/cctz/cctz_benchmark/test.log
//absl/types:variant_benchmark                                           FAILED in 0.4s
  /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/types/variant_benchmark/test.log

Executed 102 out of 102 tests: 80 tests pass and 22 fail locally.
INFO: Build completed, 22 tests FAILED, 105 total actions

@derekmauro
Copy link
Member

Glad the it builds, I'll get these fixes committed to the main repository soon.

We should try to deal with the test failures though. Since all but one of the test failures is a benchmark, there is probably a single cause to all of those failures. Can you post the test log file for one of the benchmark failures?

Also, //absl/base:sysinfo_test is the only non-benchmark test that is failing. Can you post that log as well?

To get the logs, you may have to re-run the test command. The log for sysinfo_test, for example, is /home/test/.cache/bazel/_bazel_test/bebead0d3439847fa452d4aab3f3a5c1/execroot/com_google_absl/bazel-out/s390x-fastbuild/testlogs/absl/base/sysinfo_test/test.log in the output you posted above.

@ajaygtm71
Copy link
Author

sysinfo_test/test.log

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //absl/base:sysinfo_test
-----------------------------------------------------------------------------
[----------] Global test environment set-up.
[----------] 4 tests from SysinfoTest
[ RUN      ] SysinfoTest.NumCPUs
[       OK ] SysinfoTest.NumCPUs (0 ms)
[ RUN      ] SysinfoTest.NominalCPUFrequency
absl/base/internal/sysinfo_test.cc:41: Failure
Expected: (NominalCPUFrequency()) >= (1000.0), actual: 1 vs 1000
NominalCPUFrequency() did not return a reasonable value
[  FAILED  ] SysinfoTest.NominalCPUFrequency (0 ms)
[ RUN      ] SysinfoTest.GetTID
[       OK ] SysinfoTest.GetTID (1231 ms)
[ RUN      ] SysinfoTest.LinuxGetTID
[       OK ] SysinfoTest.LinuxGetTID (0 ms)
[----------] 4 tests from SysinfoTest (1232 ms total)

[----------] Global test environment tear-down
[==========] 4 tests from 1 test case ran. (1232 ms total)
[  PASSED  ] 3 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] SysinfoTest.NominalCPUFrequency

 1 FAILED TEST

thread_identity_benchmark/test.log

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //absl/base:thread_identity_benchmark
-----------------------------------------------------------------------------
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi

algorithm_benchmark/test.log

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //absl/algorithm:algorithm_benchmark
-----------------------------------------------------------------------------
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi

numbers_benchmark/test.log

exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //absl/strings:numbers_benchmark
-----------------------------------------------------------------------------
terminate called after throwing an instance of 'std::invalid_argument'
  what():  stoi

absl-federation-github pushed a commit that referenced this issue Jul 17, 2018
--
ffe43f972f956e3f9a8fb7b68993d243ba8f79fb by Abseil Team <absl-team@google.com>:

Replace usage of soon-to-be-deprecated http_archive rule with Skylark equivalent
#138

PiperOrigin-RevId: 204939972

--
24021d7aec96ed013333760fba590eba5a9ddf63 by Abseil Team <absl-team@google.com>:

Remove incorrect constraint that StrSplit only works on std::strings; rather, it works on anything string-like.

PiperOrigin-RevId: 204761431

--
ce61d3b0ac163caa1156817f3d1a997d9376a3f3 by Derek Mauro <dmauro@google.com>:

Support s390/s390x in examine_stack.cc (GitHub issue #135).
This is UNTESTED (no machine to test on).

PiperOrigin-RevId: 204756692

--
68ecab659a95d713c4342fe9e8008c4cdf6abfc1 by Derek Mauro <dmauro@google.com>:

Update WORKSPACE.bazel Gogole Test dependency, remove the unused RE2 dependency.

PiperOrigin-RevId: 204741814

--
891e185522f0934e3b48a75617be5fc859d75dbd by Derek Mauro <dmauro@google.com>:

Fix endian_test.cc on big endian platforms.
GitHub issue #135

PiperOrigin-RevId: 204738726

--
9becfa12fbb525cd97e5695b94677bd3ea3f61b0 by Abseil Team <absl-team@google.com>:

Improve error messages in absl::variant by splitting up the conditions in the valid type static_assert.

This makes it slightly easier to determine what type is causing issues.

PiperOrigin-RevId: 204508430
GitOrigin-RevId: ffe43f972f956e3f9a8fb7b68993d243ba8f79fb
Change-Id: Icc5e4e8cd1a4cea98dfbed794cd992b734812e1d
@derekmauro
Copy link
Member

Thanks. This should build now on s390x at e0def74.

The tests don't look like something I'm going to be able to fix without either a machine to test on, or a lot of back and forth, but I think it should still be safe to use Abseil.

I'm going to close this now that the build is fixed. We will don't officially support s390x, but let us know if something breaks and I will look into it.

@ajaygtm71
Copy link
Author

Thanks @derekmauro and Abseil Team for your efforts and patience into making the build pass on s390x even without having and actual machine to test on.

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