Issue 14126 in v8: Bazel build fails

44 views
Skip to first unread message

rahul… via monorail

unread,
Jun 29, 2023, 3:29:48 PM6/29/23
to v8-re...@googlegroups.com
Status: Untriaged
Owner: ----
Type: Bug

New issue 14126 by rahul...@intel.com: Bazel build fails
https://bugs.chromium.org/p/v8/issues/detail?id=14126

Version: a6fe93b43d8e842f2b5ffd3e857723fdbfa6d958 (main branch)
OS: Ubuntu
Architecture: x64

What steps will reproduce the problem?
1. bazel build wee8

What is the expected output?
Builds successfully

What do you see instead?
ERROR: /home/oem/public_repos/mirror-v8/v8/BUILD.bazel:3814:11: Compiling src/execution/isolate.cc failed: (Exit 1): gcc failed: error executing command (from target //:v8_libshared_noicu) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -MD -MF ... (remaining 76 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from ./src/base/macros.h:12,
from ./src/execution/isolate.h:21,
from src/execution/isolate.cc:5:
src/execution/isolate.cc: In member function 'void v8::internal::Isolate::CheckIsolateLayout()':
src/execution/isolate.cc:3444:22: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3444 | CHECK_EQ(OFFSET_OF(Isolate, isolate_data_), 0);
| ^
src/execution/isolate.cc:3445:39: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3445 | CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, isolate_data_.stack_guard_)),
| ^
src/execution/isolate.cc:3447:39: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3447 | CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, isolate_data_.is_marking_flag_)),
| ^
src/execution/isolate.cc:3450:26: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3450 | OFFSET_OF(Isolate, isolate_data_.builtin_tier0_entry_table_)),
| ^
src/execution/isolate.cc:3453:34: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3453 | static_cast<int>(OFFSET_OF(Isolate, isolate_data_.builtin_tier0_table_)),
| ^
src/execution/isolate.cc:3456:34: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3456 | static_cast<int>(OFFSET_OF(Isolate, isolate_data_.new_allocation_info_)),
| ^
src/execution/isolate.cc:3459:34: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3459 | static_cast<int>(OFFSET_OF(Isolate, isolate_data_.old_allocation_info_)),
| ^
src/execution/isolate.cc:3462:26: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3462 | OFFSET_OF(Isolate, isolate_data_.fast_c_call_caller_fp_)),
| ^
src/execution/isolate.cc:3465:26: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3465 | OFFSET_OF(Isolate, isolate_data_.fast_c_call_caller_pc_)),
| ^
src/execution/isolate.cc:3467:39: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3467 | CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, isolate_data_.cage_base_)),
| ^
src/execution/isolate.cc:3470:26: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3470 | OFFSET_OF(Isolate, isolate_data_.long_task_stats_counter_)),
| ^
src/execution/isolate.cc:3472:39: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3472 | CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, isolate_data_.stack_guard_)),
| ^
src/execution/isolate.cc:3476:34: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3476 | static_cast<int>(OFFSET_OF(Isolate, isolate_data_.thread_local_top_)),
| ^
src/execution/isolate.cc:3479:34: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3479 | static_cast<int>(OFFSET_OF(Isolate, isolate_data_.handle_scope_data_)),
| ^
src/execution/isolate.cc:3481:39: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3481 | CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, isolate_data_.embedder_data_)),
| ^
src/execution/isolate.cc:3485:26: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3485 | OFFSET_OF(Isolate, isolate_data_.external_pointer_table_)),
| ^
src/execution/isolate.cc:3489:26: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3489 | OFFSET_OF(Isolate, isolate_data_.api_callback_thunk_argument_)),
| ^
src/execution/isolate.cc:3492:39: error: offsetof within non-standard-layout type 'v8::internal::Isolate' is conditionally-supported [-Werror=invalid-offsetof]
3492 | CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, isolate_data_.roots_table_)),
| ^
At global scope:
cc1plus: error: unrecognized command line option '-Wno-mismatched-new-delete' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-implicit-int-float-conversion' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-builtin-assume-aligned-alignment' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-bitwise-instead-of-logical' [-Werror]
cc1plus: error: unrecognized command line option '-Wno-unknown-warning-option' [-Werror]
cc1plus: all warnings being treated as errors
Target //:wee8 failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 79.643s, Critical Path: 42.92s
INFO: 863 processes: 691 internal, 171 linux-sandbox, 1 local.
FAILED: Build did NOT complete successfully

Please use labels and text to provide additional information.
I tried builds for other bazel targets like d8 as well.

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

rahul… via monorail

unread,
Jun 29, 2023, 5:33:47 PM6/29/23
to v8-re...@googlegroups.com

Comment #1 on issue 14126 by rahul...@intel.com: Bazel build fails
https://bugs.chromium.org/p/v8/issues/detail?id=14126#c1

I have built with clang as well with `CC=clang CXX=clang++ bazel build wee8` but that fails with errors too. Build is successful with GN route. Is there a way to handle which clang versions are required for bazel build?

rahul… via monorail

unread,
Jun 30, 2023, 3:26:10 PM6/30/23
to v8-re...@googlegroups.com

Comment #2 on issue 14126 by rahul...@intel.com: Bazel build fails
https://bugs.chromium.org/p/v8/issues/detail?id=14126#c2

Error is resolved when using clang at "third_party/llvm-build/Release+Asserts/bin".
Reply all
Reply to author
Forward
0 new messages