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

🐛 Bug Report: Fails to build on Arch Linux with clang-16 #1689

Closed
kpcyrd opened this issue Feb 18, 2024 · 3 comments
Closed

🐛 Bug Report: Fails to build on Arch Linux with clang-16 #1689

kpcyrd opened this issue Feb 18, 2024 · 3 comments

Comments

@kpcyrd
Copy link

kpcyrd commented Feb 18, 2024

Hello, I'm trying to package workerd for Arch Linux but I'm having trouble compiling it from source:

% bazel build //src/workerd/server:workerd
INFO: From BazelWorkspaceStatusAction stable-status.txt:
Workspace issue detected #1

  It looks like the git config option core.hooksPath is not set. The workerd
  repository uses hooks stored in githooks/ to check for common mistakes
  and prevent production breakages.

  To set up the hooks, please run:

    git config core.hooksPath githooks

DEBUG: /home/user/.cache/bazel/_bazel_user/a193184f430c6db8113bb44037ebe130/external/aspect_rules_ts/ts/private/ts_project.bzl:92:14: WARNING: disabling ts_project workers which are not currently supported with TS >= 5.0.0.
See https://github.com/aspect-build/rules_ts/issues/361 for more details.
DEBUG: /home/user/.cache/bazel/_bazel_user/a193184f430c6db8113bb44037ebe130/external/aspect_rules_ts/ts/private/ts_project.bzl:92:14: WARNING: disabling ts_project workers which are not currently supported with TS >= 5.0.0.
See https://github.com/aspect-build/rules_ts/issues/361 for more details.
INFO: Analyzed target //src/workerd/server:workerd (299 packages loaded, 22319 targets configured).
WARNING: /home/user/.cache/bazel/_bazel_user/a193184f430c6db8113bb44037ebe130/external/npm_typescript/BUILD.bazel:31:17: input 'package' to @@npm_typescript//:.aspect_rules_js/node_modules/typescript is a directory; dependency checking of directories is unsound
ERROR: /home/user/.cache/bazel/_bazel_user/a193184f430c6db8113bb44037ebe130/external/capnp-cpp/src/capnp/BUILD.bazel:136:10: Linking external/capnp-cpp/src/capnp/capnpc-c++ [for tool] failed: (Exit 1): clang-16 failed: error executing CppLink command (from target @@capnp-cpp//src/capnp:capnpc-c++) 
  (cd /home/user/.cache/bazel/_bazel_user/a193184f430c6db8113bb44037ebe130/sandbox/linux-sandbox/777/execroot/workerd && \
  exec env - \
    PATH=/home/user/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin:/home/user/bin:/home/user/.cargo/bin \
    PWD=/proc/self/cwd \
    ZERO_AR_DATE=1 \
  /usr/bin/clang-16 @bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/capnpc-c++-2.params)
# Configuration: 6ae35481471b2019ce0f0adab8512be61daf2b51fdb6b68a910750f12626d5f8
# Execution platform: @@local_config_platform//:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
ld.lld: error: undefined symbol: operator new(unsigned long)
>>> referenced by capnpc-c++.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-c++/capnpc-c++.o:(main)
>>> referenced by arena.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/arena.o:(kj::Arena::allocateBytes(unsigned long, unsigned int, bool))
>>> referenced by array.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/array.o:(kj::_::HeapArrayDisposer::allocateImpl(unsigned long, unsigned long, unsigned long, void (*)(void*), void (*)(void*)))
>>> referenced 67 more times

ld.lld: error: undefined symbol: operator delete(void*)
>>> referenced by capnpc-c++.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-c++/capnpc-c++.o:(main)
>>> referenced by capnpc-c++.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-c++/capnpc-c++.o:(main)
>>> referenced by capnpc-c++.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-c++/capnpc-c++.o:(capnp::(anonymous namespace)::CapnpcCppMain::~CapnpcCppMain())
>>> referenced 129 more times

ld.lld: error: undefined symbol: __cxa_begin_catch
>>> referenced by capnpc-c++.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-c++/capnpc-c++.o:(__clang_call_terminate)
>>> referenced by layout.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/layout.o:(capnp::_::OrphanBuilder::euthanize())
>>> referenced by filesystem-disk-unix.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/filesystem-disk-unix.o:(kj::newDiskFilesystem())
>>> referenced 11 more times

ld.lld: error: undefined symbol: std::terminate()
>>> referenced by capnpc-c++.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-c++/capnpc-c++.o:(__clang_call_terminate)
>>> referenced by exception.cpp.o:(std::rethrow_exception(std::exception_ptr)) in archive /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a

ld.lld: error: undefined symbol: vtable for __cxxabiv1::__class_type_info
>>> referenced by array.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/array.o:(typeinfo for kj::ArrayDisposer)
>>> referenced by time.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/time.o:(typeinfo for kj::Clock)
>>> referenced by io.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/io.o:(typeinfo for kj::InputStream)
>>> referenced 24 more times
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)

ld.lld: error: undefined symbol: vtable for __cxxabiv1::__si_class_type_info
>>> referenced by array.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/array.o:(typeinfo for kj::NullArrayDisposer)
>>> referenced by array.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/array.o:(typeinfo for kj::_::HeapArrayDisposer)
>>> referenced by time.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/time.o:(typeinfo for kj::nullClock()::NullClock)
>>> referenced 73 more times
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)

ld.lld: error: undefined symbol: vtable for std::runtime_error
>>> referenced by stdexcept.cpp.o:(std::runtime_error::runtime_error(char const*)) in archive /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)

ld.lld: error: undefined symbol: std::exception::~exception()
>>> referenced by stdexcept.cpp.o:(std::runtime_error::runtime_error(char const*)) in archive /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a
>>> referenced by exception.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:(kj::ExceptionImpl::~ExceptionImpl())

ld.lld: error: undefined symbol: __cxa_allocate_exception
>>> referenced by hash.cpp.o:(std::__1::__throw_overflow_error[abi:v160006](char const*)) in archive /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a
>>> referenced by main.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/main.o:(kj::TopLevelProcessContext::exit())
>>> referenced by capnpc-c++.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-c++/capnpc-c++.o:(std::__throw_bad_array_new_length[abi:v160006]())
>>> referenced 2 more times

ld.lld: error: undefined symbol: typeinfo for std::overflow_error
>>> referenced by hash.cpp.o:(std::__1::__throw_overflow_error[abi:v160006](char const*)) in archive /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a

ld.lld: error: undefined symbol: std::overflow_error::~overflow_error()
>>> referenced by hash.cpp.o:(std::__1::__throw_overflow_error[abi:v160006](char const*)) in archive /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a

ld.lld: error: undefined symbol: __cxa_throw
>>> referenced by hash.cpp.o:(std::__1::__throw_overflow_error[abi:v160006](char const*)) in archive /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a
>>> referenced by main.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/main.o:(kj::TopLevelProcessContext::exit())
>>> referenced by capnpc-c++.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-c++/capnpc-c++.o:(std::__throw_bad_array_new_length[abi:v160006]())
>>> referenced 2 more times

ld.lld: error: undefined symbol: __cxa_free_exception
>>> referenced by hash.cpp.o:(std::__1::__throw_overflow_error[abi:v160006](char const*)) in archive /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a
>>> referenced by exception.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:(kj::ExceptionCallback::RootExceptionCallback::onRecoverableException(kj::Exception&&))
>>> referenced by exception.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:(kj::ExceptionCallback::RootExceptionCallback::onFatalException(kj::Exception&&))

ld.lld: error: undefined symbol: vtable for std::overflow_error
>>> referenced by hash.cpp.o:(std::overflow_error::overflow_error[abi:v160006](char const*)) in archive /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)

ld.lld: error: undefined symbol: __cxa_uncaught_exceptions
>>> referenced by exception.cpp.o:(std::uncaught_exceptions()) in archive /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a

ld.lld: error: undefined symbol: __cxa_end_catch
>>> referenced by layout.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/layout.o:(capnp::_::OrphanBuilder::euthanize())
>>> referenced by layout.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/layout.o:(capnp::_::OrphanBuilder::euthanize())
>>> referenced by filesystem-disk-unix.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/filesystem-disk-unix.o:(kj::newDiskFilesystem())
>>> referenced 22 more times

ld.lld: error: undefined symbol: vtable for __cxxabiv1::__vmi_class_type_info
>>> referenced by refcount.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/refcount.o:(typeinfo for kj::AtomicRefcounted)
>>> referenced by serialize.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/serialize.o:(typeinfo for capnp::StreamFdMessageReader)
>>> referenced by filesystem.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/filesystem.o:(typeinfo for kj::AppendableFile)
>>> referenced 7 more times
>>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)

ld.lld: error: undefined symbol: __cxa_guard_acquire
>>> referenced by filesystem-disk-unix.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/filesystem-disk-unix.o:(kj::(anonymous namespace)::DiskHandle::mmap(unsigned long, unsigned long) const)
>>> referenced by filesystem-disk-unix.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/filesystem-disk-unix.o:(kj::(anonymous namespace)::MmapDisposer::disposeImpl(void*, unsigned long, unsigned long, unsigned long, void (*)(void*)) const)
>>> referenced by exception.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:(kj::getStackTrace(kj::ArrayPtr<void*>, unsigned int))
>>> referenced 11 more times

ld.lld: error: undefined symbol: __cxa_guard_release
>>> referenced by filesystem-disk-unix.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/filesystem-disk-unix.o:(kj::(anonymous namespace)::DiskHandle::mmap(unsigned long, unsigned long) const)
>>> referenced by filesystem-disk-unix.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/filesystem-disk-unix.o:(kj::(anonymous namespace)::MmapDisposer::disposeImpl(void*, unsigned long, unsigned long, unsigned long, void (*)(void*)) const)
>>> referenced by exception.c++
>>>               bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:(kj::getStackTrace(kj::ArrayPtr<void*>, unsigned int))
>>> referenced 11 more times

ld.lld: error: undefined symbol: __cxa_decrement_exception_refcount
>>> referenced by exception.cpp.o:(std::exception_ptr::~exception_ptr()) in archive /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a

ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
Target //src/workerd/server:workerd failed to build
ERROR: /home/user/repos/github/workerd/src/workerd/jsg/BUILD.bazel:79:20 Compiling src/workerd/jsg/rtti.capnp.c++ failed: (Exit 1): clang-16 failed: error executing CppLink command (from target @@capnp-cpp//src/capnp:capnpc-c++) 
  (cd /home/user/.cache/bazel/_bazel_user/a193184f430c6db8113bb44037ebe130/sandbox/linux-sandbox/777/execroot/workerd && \
  exec env - \
    PATH=/home/user/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin:/home/user/bin:/home/user/.cargo/bin \
    PWD=/proc/self/cwd \
    ZERO_AR_DATE=1 \
  /usr/bin/clang-16 @bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/capnpc-c++-2.params)
# Configuration: 6ae35481471b2019ce0f0adab8512be61daf2b51fdb6b68a910750f12626d5f8
# Execution platform: @@local_config_platform//:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
INFO: Elapsed time: 251.381s, Critical Path: 51.27s
INFO: 826 processes: 57 internal, 757 linux-sandbox, 12 local.
ERROR: Build did NOT complete successfully

The commit/workspace I'm building from:

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

nothing to commit, working tree clean

% git show
commit 4d32cdc6252fc4d93147638243f476d810393611 (HEAD -> main, origin/main, origin/HEAD)
Merge: aab6b473 63a44b96
Author: Kenton Varda <[email protected]>
Date:   Fri Feb 16 17:16:00 2024 -0600

    Merge pull request #1658 from cloudflare/kenton/jsrpc-service-binding
    
    JSRPC: Service bindings and stateless class syntax

% clang --version
clang version 16.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

% pacman -Qi libc++
Name            : libc++
Version         : 16.0.6-1
Description     : LLVM C++ standard library.
Architecture    : x86_64
URL             : https://libcxx.llvm.org/
Licenses        : custom:Apache 2.0 with LLVM Exception
Groups          : None
Provides        : None
Depends On      : libc++abi=16.0.6-1
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 9.89 MiB
Packager        : Evangelos Foutras <[email protected]>
Build Date      : Thu 24 Aug 2023 05:52:02 PM CEST
Install Date    : Thu 15 Feb 2024 01:55:51 PM CET
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

If I can provide any other info please let me know.

Thanks!

@kpcyrd
Copy link
Author

kpcyrd commented Feb 18, 2024

With llvm/clang 15 I get this:

Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
Loading: 
Loading: 4 packages loaded
Analyzing: target //src/workerd/server:workerd (5 packages loaded, 0 targets configured)
Analyzing: target //src/workerd/server:workerd (5 packages loaded, 0 targets configured)
[0 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (99 packages loaded, 1025 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (183 packages loaded, 4775 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (223 packages loaded, 8683 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (249 packages loaded, 13405 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (282 packages loaded, 14472 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (289 packages loaded, 15440 targets configured)
[1 / 1] checking cached actions
DEBUG: /build/.cache/bazel/_bazel_builduser/3c848310b87984ecc494ab8865f776c0/external/aspect_rules_ts/ts/private/ts_project.bzl:92:14: WARNING: disabling ts_project workers which are not currently supported with TS >= 5.0.0.
See https://github.com/aspect-build/rules_ts/issues/361 for more details.
DEBUG: /build/.cache/bazel/_bazel_builduser/3c848310b87984ecc494ab8865f776c0/external/aspect_rules_ts/ts/private/ts_project.bzl:92:14: WARNING: disabling ts_project workers which are not currently supported with TS >= 5.0.0.
See https://github.com/aspect-build/rules_ts/issues/361 for more details.
Analyzing: target //src/workerd/server:workerd (293 packages loaded, 20564 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (295 packages loaded, 21203 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
Analyzing: target //src/workerd/server:workerd (296 packages loaded, 22161 targets configured)
[1 / 1] checking cached actions
INFO: Analyzed target //src/workerd/server:workerd (299 packages loaded, 22341 targets configured).
[1 / 6] [Prepa] Writing file src/workerd/server/workerd-2.params
WARNING: /build/.cache/bazel/_bazel_builduser/3c848310b87984ecc494ab8865f776c0/external/npm_typescript/BUILD.bazel:31:17: input 'package' to @@npm_typescript//:.aspect_rules_js/node_modules/typescript is a directory; dependency checking of directories is unsound
WARNING: /build/workerd/src/workerd-1.20240208.0/BUILD.bazel:17:22: input 'package' to //:.aspect_rules_js/node_modules/[email protected]/pkg is a directory; dependency checking of directories is unsound
WARNING: /build/workerd/src/workerd-1.20240208.0/BUILD.bazel:17:22: input 'package' to //:.aspect_rules_js/node_modules/@[email protected]/pkg is a directory; dependency checking of directories is unsound
[1,261 / 6,151] Creating runfiles tree bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/v8/code_generator.runfiles [for tool]; 0s local ... (96 actions, 95 running)
[1,348 / 6,151] Creating runfiles tree bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/v8/code_generator.runfiles [for tool]; 1s local ... (96 actions, 95 running)
[1,443 / 6,151] Creating runfiles tree bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/dawn/dawn_gpu_info_generator.runfiles [for tool]; 2s local ... (96 actions, 93 running)
[1,497 / 6,151] Compiling src/kj/async-io.c++ [for tool]; 3s processwrapper-sandbox ... (96 actions, 95 running)
INFO: From Compiling src/google/protobuf/stubs/common.cc [for tool]:
external/com_google_protobuf/src/google/protobuf/stubs/common.cc:184:47: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
static std::atomic<int> log_silencer_count_ = ATOMIC_VAR_INIT(0);
                                              ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
1 warning generated.
INFO: From Compiling src/google/protobuf/wrappers.pb.cc [for tool]:
external/com_google_protobuf/src/google/protobuf/wrappers.pb.cc:68:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_BoolValue_google_2fprotobuf_2fwrappers_2eproto}, {}};
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/wrappers.pb.cc:82:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_BytesValue_google_2fprotobuf_2fwrappers_2eproto}, {}};
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/wrappers.pb.cc:96:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_DoubleValue_google_2fprotobuf_2fwrappers_2eproto}, {}};
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/wrappers.pb.cc:110:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_FloatValue_google_2fprotobuf_2fwrappers_2eproto}, {}};
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/wrappers.pb.cc:124:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Int32Value_google_2fprotobuf_2fwrappers_2eproto}, {}};
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/wrappers.pb.cc:138:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Int64Value_google_2fprotobuf_2fwrappers_2eproto}, {}};
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/wrappers.pb.cc:152:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_StringValue_google_2fprotobuf_2fwrappers_2eproto}, {}};
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/wrappers.pb.cc:166:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_UInt32Value_google_2fprotobuf_2fwrappers_2eproto}, {}};
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/wrappers.pb.cc:180:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_UInt64Value_google_2fprotobuf_2fwrappers_2eproto}, {}};
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
9 warnings generated.
[1,586 / 6,151] Compiling src/kj/async-io.c++ [for tool]; 4s processwrapper-sandbox ... (96 actions, 95 running)
INFO: From Compiling src/google/protobuf/type.pb.cc [for tool]:
external/com_google_protobuf/src/google/protobuf/type.pb.cc:57:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_Enum_google_2fprotobuf_2ftype_2eproto}, {
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/type.pb.cc:74:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_EnumValue_google_2fprotobuf_2ftype_2eproto}, {
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/type.pb.cc:89:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Field_google_2fprotobuf_2ftype_2eproto}, {
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/type.pb.cc:104:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Option_google_2fprotobuf_2ftype_2eproto}, {
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
external/com_google_protobuf/src/google/protobuf/type.pb.cc:119:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsscc_info_Type_google_2fprotobuf_2ftype_2eproto}, {
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
5 warnings generated.
[1,704 / 6,151] Compiling src/kj/async-io.c++ [for tool]; 5s processwrapper-sandbox ... (96 actions, 95 running)
INFO: From Compiling src/google/protobuf/any.pb.cc [for tool]:
external/com_google_protobuf/src/google/protobuf/any.pb.cc:36:7: warning: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Wdeprecated-pragma]
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsscc_info_Any_google_2fprotobuf_2fany_2eproto}, {}};
      ^
/usr/include/c++/v1/atomic:2661:43: note: macro marked 'deprecated' here
#  pragma clang deprecated(ATOMIC_VAR_INIT)
                                          ^
1 warning generated.
[1,805 / 6,151] Compiling src/kj/async-io.c++ [for tool]; 6s processwrapper-sandbox ... (96 actions, 95 running)
[1,898 / 6,151] Compiling src/kj/async-io.c++ [for tool]; 7s processwrapper-sandbox ... (96 actions, 95 running)
[1,961 / 6,151] Compiling src/capnp/compiler/capnpc-c++.c++ [for tool]; 7s processwrapper-sandbox ... (96 actions, 95 running)
[2,050 / 6,151] Compiling src/capnp/compiler/capnpc-c++.c++ [for tool]; 8s processwrapper-sandbox ... (96 actions, 95 running)
ERROR: /build/.cache/bazel/_bazel_builduser/3c848310b87984ecc494ab8865f776c0/external/capnp-cpp/src/capnp/BUILD.bazel:147:10: Linking external/capnp-cpp/src/capnp/capnpc-capnp [for tool] failed: (Exit 1): clang-15 failed: error executing CppLink command (from target @@capnp-cpp//src/capnp:capnpc-capnp) 
  (cd /build/.cache/bazel/_bazel_builduser/3c848310b87984ecc494ab8865f776c0/sandbox/processwrapper-sandbox/1025/execroot/workerd && \
  exec env - \
    PATH=/usr/lib/llvm15/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/jvm/default/bin \
    PWD=/proc/self/cwd \
    ZERO_AR_DATE=1 \
  /usr/lib/llvm15/bin/clang-15 @bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/capnpc-capnp-2.params)
# Configuration: 6ae35481471b2019ce0f0adab8512be61daf2b51fdb6b68a910750f12626d5f8
# Execution platform: @@local_config_platform//:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:function main:(.text.main+0xa3): error: undefined reference to 'operator new(unsigned long)'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:function __clang_call_terminate:(.text.__clang_call_terminate+0x2): error: undefined reference to '__cxa_begin_catch'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:function __clang_call_terminate:(.text.__clang_call_terminate+0x7): error: undefined reference to 'std::terminate()'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:function capnp::(anonymous namespace)::CapnpcCapnpMain::nodeName(capnp::Schema, capnp::Schema, capnp::schema::Brand::Reader, kj::Maybe<capnp::InterfaceSchema::Method>):(.text._ZN5capnp12_GLOBAL__N_115CapnpcCapnpMain8nodeNameENS_6SchemaES2_NS_6schema5Brand6ReaderEN2kj5MaybeINS_15InterfaceSchema6MethodEEE+0x2bc): error: undefined reference to 'operator new(unsigned long)'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:function kj::_::Debug::ContextImpl<capnp::(anonymous namespace)::CapnpcCapnpMain::getUnqualifiedName(capnp::Schema)::{lambda()#1}>::~ContextImpl():(.text._ZN2kj1_5Debug11ContextImplIZN5capnp12_GLOBAL__N_115CapnpcCapnpMain18getUnqualifiedNameENS3_6SchemaEEUlvE_ED0Ev+0x17): error: undefined reference to 'operator delete(void*)'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:function kj::_::Debug::ContextImpl<capnp::(anonymous namespace)::CapnpcCapnpMain::getUnqualifiedName(capnp::Schema)::{lambda()#1}>::~ContextImpl():(.text._ZN2kj1_5Debug11ContextImplIZN5capnp12_GLOBAL__N_115CapnpcCapnpMain18getUnqualifiedNameENS3_6SchemaEEUlvE_ED0Ev+0x22): error: undefined reference to 'operator delete(void*)'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:function std::__1::__tree<std::__1::__value_type<unsigned long, capnp::List<capnp::schema::Brand::Binding, (capnp::Kind)3>::Reader>, std::__1::__map_value_compare<unsigned long, std::__1::__value_type<unsigned long, capnp::List<capnp::schema::Brand::Binding, (capnp::Kind)3>::Reader>, std::__1::less<unsigned long>, true>, std::__1::allocator<std::__1::__value_type<unsigned long, capnp::List<capnp::schema::Brand::Binding, (capnp::Kind)3>::Reader> > >::destroy(std::__1::__tree_node<std::__1::__value_type<unsigned long, capnp::List<capnp::schema::Brand::Binding, (capnp::Kind)3>::Reader>, void*>*):(.text._ZNSt3__16__treeINS_12__value_typeImN5capnp4ListINS2_6schema5Brand7BindingELNS2_4KindE3EE6ReaderEEENS_19__map_value_compareImSA_NS_4lessImEELb1EEENS_9allocatorISA_EEE7destroyEPNS_11__tree_nodeISA_PvEE+0x2e): error: undefined reference to 'operator delete(void*)'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:function kj::_::HeapDisposer<kj::Function<kj::MainBuilder::Validity ()>::Impl<kj::_::BoundMethod<capnp::(anonymous namespace)::CapnpcCapnpMain&, capnp::(anonymous namespace)::CapnpcCapnpMain::getMain()::{lambda(auto:1&, (auto:2&&)...)#1}, capnp::(anonymous namespace)::CapnpcCapnpMain::getMain()::{lambda(auto:1&, (auto:2&&)...)#2}> > >::disposeImpl(void*) const:(.text._ZNK2kj1_12HeapDisposerINS_8FunctionIFNS_11MainBuilder8ValidityEvEE4ImplINS0_11BoundMethodIRN5capnp12_GLOBAL__N_115CapnpcCapnpMainEZNSB_7getMainEvEUlRT_DpOT0_E_ZNSB_7getMainEvEUlSE_SH_E0_EEEEE11disposeImplEPv+0xe): error: undefined reference to 'operator delete(void*)'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:typeinfo for kj::Function<kj::MainBuilder::Validity ()>::Iface:(.data.rel.ro._ZTIN2kj8FunctionIFNS_11MainBuilder8ValidityEvEE5IfaceE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:typeinfo for kj::Function<kj::MainBuilder::Validity ()>::Impl<kj::_::BoundMethod<capnp::(anonymous namespace)::CapnpcCapnpMain&, capnp::(anonymous namespace)::CapnpcCapnpMain::getMain()::{lambda(auto:1&, (auto:2&&)...)#1}, capnp::(anonymous namespace)::CapnpcCapnpMain::getMain()::{lambda(auto:1&, (auto:2&&)...)#2}> >:(.data.rel.ro._ZTIN2kj8FunctionIFNS_11MainBuilder8ValidityEvEE4ImplINS_1_11BoundMethodIRN5capnp12_GLOBAL__N_115CapnpcCapnpMainEZNSA_7getMainEvEUlRT_DpOT0_E_ZNSA_7getMainEvEUlSD_SG_E0_EEEE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:typeinfo for kj::_::Debug::ContextImpl<capnp::(anonymous namespace)::CapnpcCapnpMain::getUnqualifiedName(capnp::Schema)::{lambda()#1}>:(.data.rel.ro._ZTIN2kj1_5Debug11ContextImplIZN5capnp12_GLOBAL__N_115CapnpcCapnpMain18getUnqualifiedNameENS3_6SchemaEEUlvE_EE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:typeinfo for kj::Disposer:(.data.rel.ro._ZTIN2kj8DisposerE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:typeinfo for kj::_::HeapDisposer<kj::Function<kj::MainBuilder::Validity ()>::Impl<kj::_::BoundMethod<capnp::(anonymous namespace)::CapnpcCapnpMain&, capnp::(anonymous namespace)::CapnpcCapnpMain::getMain()::{lambda(auto:1&, (auto:2&&)...)#1}, capnp::(anonymous namespace)::CapnpcCapnpMain::getMain()::{lambda(auto:1&, (auto:2&&)...)#2}> > >:(.data.rel.ro._ZTIN2kj1_12HeapDisposerINS_8FunctionIFNS_11MainBuilder8ValidityEvEE4ImplINS0_11BoundMethodIRN5capnp12_GLOBAL__N_115CapnpcCapnpMainEZNSB_7getMainEvEUlRT_DpOT0_E_ZNSB_7getMainEvEUlSE_SH_E0_EEEEEE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnpc-capnp/capnpc-capnp.o:capnpc-capnp.c++:DW.ref.__gxx_personality_v0:(.data.DW.ref.__gxx_personality_v0+0x0): error: undefined reference to '__gxx_personality_v0'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/layout.o:layout.c++:function capnp::_::OrphanBuilder::euthanize():(.text._ZN5capnp1_13OrphanBuilder9euthanizeEv+0x73): error: undefined reference to '__cxa_begin_catch'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/layout.o:layout.c++:function capnp::_::OrphanBuilder::euthanize():(.text._ZN5capnp1_13OrphanBuilder9euthanizeEv+0x149): error: undefined reference to '__cxa_end_catch'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/layout.o:layout.c++:function capnp::_::OrphanBuilder::euthanize():(.text._ZN5capnp1_13OrphanBuilder9euthanizeEv+0x17c): error: undefined reference to '__cxa_end_catch'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/serialize.o:serialize.c++:function capnp::InputStreamMessageReader::~InputStreamMessageReader():(.text._ZN5capnp24InputStreamMessageReaderD2Ev+0xea): error: undefined reference to '__cxa_begin_catch'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/serialize.o:serialize.c++:function capnp::InputStreamMessageReader::~InputStreamMessageReader():(.text._ZN5capnp24InputStreamMessageReaderD2Ev+0xf7): error: undefined reference to '__cxa_end_catch'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/serialize.o:serialize.c++:function capnp::InputStreamMessageReader::~InputStreamMessageReader():(.text._ZN5capnp24InputStreamMessageReaderD2Ev+0x104): error: undefined reference to '__cxa_end_catch'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/serialize.o:serialize.c++:typeinfo for capnp::InputStreamMessageReader:(.data.rel.ro._ZTIN5capnp24InputStreamMessageReaderE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/serialize.o:serialize.c++:typeinfo for capnp::StreamFdMessageReader:(.data.rel.ro._ZTIN5capnp21StreamFdMessageReaderE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/schema-loader.o:schema-loader.c++:function capnp::SchemaLoader::SchemaLoader():(.text._ZN5capnp12SchemaLoaderC2Ev+0x10): error: undefined reference to 'operator new(unsigned long)'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/schema-loader.o:schema-loader.c++:typeinfo for capnp::_::RawSchema::Initializer:(.data.rel.ro._ZTIN5capnp1_9RawSchema11InitializerE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/schema-loader.o:schema-loader.c++:typeinfo for capnp::_::RawBrandedSchema::Initializer:(.data.rel.ro._ZTIN5capnp1_16RawBrandedSchema11InitializerE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/message.o:message.c++:vtable for capnp::MessageReader:(.data.rel.ro._ZTVN5capnp13MessageReaderE+0x20): error: undefined reference to '__cxa_pure_virtual'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/message.o:message.c++:vtable for capnp::MessageBuilder:(.data.rel.ro._ZTVN5capnp14MessageBuilderE+0x20): error: undefined reference to '__cxa_pure_virtual'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/_objs/capnp/arena.o:arena.c++:function capnp::_::ReaderArena::tryGetSegment(kj::Id<unsigned int, capnp::_::Segment>):(.text._ZN5capnp1_11ReaderArena13tryGetSegmentEN2kj2IdIjNS0_7SegmentEEE+0x209): error: undefined reference to 'operator new(unsigned long)'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/debug.o:debug.c++:vtable for kj::_::Debug::Context:(.data.rel.ro._ZTVN2kj1_5Debug7ContextE+0x48): error: undefined reference to '__cxa_pure_virtual'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::getStackTrace(kj::ArrayPtr<void*>, unsigned int):(.text._ZN2kj13getStackTraceENS_8ArrayPtrIPvEEj+0x179): error: undefined reference to '__cxa_guard_acquire'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::getStackTrace(kj::ArrayPtr<void*>, unsigned int):(.text._ZN2kj13getStackTraceENS_8ArrayPtrIPvEEj+0x1ac): error: undefined reference to '__cxa_guard_release'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::getStackTrace(kj::ArrayPtr<void*>, unsigned int):(.text._ZN2kj13getStackTraceENS_8ArrayPtrIPvEEj+0x1c0): error: undefined reference to '__cxa_guard_abort'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::getExceptionCallback():(.text._ZN2kj20getExceptionCallbackEv+0x35): error: undefined reference to '__cxa_guard_acquire'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::getExceptionCallback():(.text._ZN2kj20getExceptionCallbackEv+0x64): error: undefined reference to '__cxa_guard_release'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::getExceptionCallback():(.text._ZN2kj20getExceptionCallbackEv+0x75): error: undefined reference to '__cxa_guard_abort'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::stringifyStackTrace(kj::ArrayPtr<void* const>):(.text._ZN2kj19stringifyStackTraceENS_8ArrayPtrIKPvEE+0x56a): error: undefined reference to '__cxa_guard_acquire'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::stringifyStackTrace(kj::ArrayPtr<void* const>):(.text._ZN2kj19stringifyStackTraceENS_8ArrayPtrIKPvEE+0x59d): error: undefined reference to '__cxa_guard_release'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::stringifyStackTrace(kj::ArrayPtr<void* const>):(.text._ZN2kj19stringifyStackTraceENS_8ArrayPtrIKPvEE+0x5b6): error: undefined reference to '__cxa_guard_abort'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::printStackTraceOnCrash():(.text._ZN2kj22printStackTraceOnCrashEv+0x1f3): error: undefined reference to 'std::set_terminate(void (*)())'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::(anonymous namespace)::terminateHandler():(.text._ZN2kj12_GLOBAL__N_116terminateHandlerEv+0x27f): error: undefined reference to '__cxa_begin_catch'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::ExceptionCallback::ExceptionCallback():(.text._ZN2kj17ExceptionCallbackC2Ev+0x63): error: undefined reference to '__cxa_guard_acquire'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::ExceptionCallback::ExceptionCallback():(.text._ZN2kj17ExceptionCallbackC2Ev+0x92): error: undefined reference to '__cxa_guard_release'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::ExceptionCallback::ExceptionCallback():(.text._ZN2kj17ExceptionCallbackC2Ev+0xa3): error: undefined reference to '__cxa_guard_abort'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::getCaughtExceptionAsKj():(.text._ZN2kj22getCaughtExceptionAsKjEv+0x25): error: undefined reference to '__cxa_rethrow'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::getCaughtExceptionAsKj():(.text._ZN2kj22getCaughtExceptionAsKjEv+0x3cf): error: undefined reference to '__cxa_rethrow'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::getCaughtExceptionAsKj():(.text._ZN2kj22getCaughtExceptionAsKjEv+0x3d6): error: undefined reference to '__cxa_rethrow'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::getCaughtExceptionType():(.text._ZN2kj22getCaughtExceptionTypeEv+0x1e): error: undefined reference to '__cxa_current_exception_type'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::getCaughtExceptionType():(.text._ZN2kj22getCaughtExceptionTypeEv+0x37): error: undefined reference to '__cxa_demangle'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::ExceptionImpl::~ExceptionImpl():(.text._ZN2kj13ExceptionImplD2Ev+0xcf): error: undefined reference to 'std::exception::~exception()'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::ExceptionCallback::RootExceptionCallback::onRecoverableException(kj::Exception&&):(.text._ZN2kj17ExceptionCallback21RootExceptionCallback22onRecoverableExceptionEONS_9ExceptionE+0x39): error: undefined reference to '__cxa_allocate_exception'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::ExceptionCallback::RootExceptionCallback::onRecoverableException(kj::Exception&&):(.text._ZN2kj17ExceptionCallback21RootExceptionCallback22onRecoverableExceptionEONS_9ExceptionE+0x5d): error: undefined reference to '__cxa_throw'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::ExceptionCallback::RootExceptionCallback::onRecoverableException(kj::Exception&&):(.text._ZN2kj17ExceptionCallback21RootExceptionCallback22onRecoverableExceptionEONS_9ExceptionE+0x68): error: undefined reference to '__cxa_free_exception'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::ExceptionCallback::RootExceptionCallback::onFatalException(kj::Exception&&):(.text._ZN2kj17ExceptionCallback21RootExceptionCallback16onFatalExceptionEONS_9ExceptionE+0x10): error: undefined reference to '__cxa_allocate_exception'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::ExceptionCallback::RootExceptionCallback::onFatalException(kj::Exception&&):(.text._ZN2kj17ExceptionCallback21RootExceptionCallback16onFatalExceptionEONS_9ExceptionE+0x34): error: undefined reference to '__cxa_throw'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:function kj::ExceptionCallback::RootExceptionCallback::onFatalException(kj::Exception&&):(.text._ZN2kj17ExceptionCallback21RootExceptionCallback16onFatalExceptionEONS_9ExceptionE+0x3f): error: undefined reference to '__cxa_free_exception'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:typeinfo for kj::ExceptionImpl:(.data.rel.ro._ZTIN2kj13ExceptionImplE+0x0): error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o:exception.c++:typeinfo for kj::ExceptionImpl:(.data.rel.ro._ZTIN2kj13ExceptionImplE+0x28): error: undefined reference to 'typeinfo for std::exception'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o(.data+0x18): error: undefined reference to 'typeinfo for std::bad_alloc'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/exception.o(.data+0x20): error: undefined reference to 'typeinfo for std::exception'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/main.o:main.c++:function kj::TopLevelProcessContext::exit():(.text._ZN2kj22TopLevelProcessContext4exitEv+0x1d): error: undefined reference to '__cxa_allocate_exception'
bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/kj/_objs/kj/main.o:main.c++:function kj::TopLevelProcessContext::exit():(.text._ZN2kj22TopLevelProcessContext4exitEv+0x30): error: undefined reference to '__cxa_throw'
/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a(exception.cpp.o):function std::uncaught_exceptions():(.text._ZSt19uncaught_exceptionsv+0x6): error: undefined reference to '__cxa_uncaught_exceptions'
/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a(exception.cpp.o):function std::exception_ptr::~exception_ptr():(.text._ZNSt13exception_ptrD2Ev+0x9): error: undefined reference to '__cxa_decrement_exception_refcount'
/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a(exception.cpp.o):function std::exception_ptr::exception_ptr(std::exception_ptr const&):(.text._ZNSt13exception_ptrC2ERKS_+0xf): error: undefined reference to '__cxa_increment_exception_refcount'
/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a(exception.cpp.o):function std::current_exception():(.text._ZSt17current_exceptionv+0xa): error: undefined reference to '__cxa_current_primary_exception'
/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a(exception.cpp.o):function std::rethrow_exception(std::exception_ptr):(.text._ZSt17rethrow_exceptionSt13exception_ptr+0xa): error: undefined reference to '__cxa_rethrow_primary_exception'
/usr/lib64/gcc/x86_64-pc-linux-gnu/13.2.1/../../../../lib64/libc++.a(exception.cpp.o):function std::rethrow_exception(std::exception_ptr):(.text._ZSt17rethrow_exceptionSt13exception_ptr+0x10): error: undefined reference to 'std::terminate()'
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
Target //src/workerd/server:workerd failed to build
ERROR: /build/workerd/src/workerd-1.20240208.0/src/workerd/jsg/BUILD.bazel:79:20 Compiling src/workerd/jsg/rtti.capnp.c++ failed: (Exit 1): clang-15 failed: error executing CppLink command (from target @@capnp-cpp//src/capnp:capnpc-capnp) 
  (cd /build/.cache/bazel/_bazel_builduser/3c848310b87984ecc494ab8865f776c0/sandbox/processwrapper-sandbox/1025/execroot/workerd && \
  exec env - \
    PATH=/usr/lib/llvm15/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/jvm/default/bin \
    PWD=/proc/self/cwd \
    ZERO_AR_DATE=1 \
  /usr/lib/llvm15/bin/clang-15 @bazel-out/k8-opt-exec-ST-13d3ddad9198/bin/external/capnp-cpp/src/capnp/capnpc-capnp-2.params)
# Configuration: 6ae35481471b2019ce0f0adab8512be61daf2b51fdb6b68a910750f12626d5f8
# Execution platform: @@local_config_platform//:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
INFO: Elapsed time: 99.325s, Critical Path: 8.83s
INFO: 2167 processes: 1218 internal, 54 local, 895 processwrapper-sandbox.
ERROR: Build did NOT complete successfully

Reading the README again I'm suspecting I'd need a libc++15 package (the clang15 build was still with libc++ 16.0.6).

@fhanau
Copy link
Collaborator

fhanau commented Feb 19, 2024

Hi, I don't have a definite answer here but some ideas:

  • In the first output, there are missing symbols listed for libc++.a itself, so it's either linking to the wrong library file or libc++ itself has dependencies. The symbols that are missing appear to be symbols defined in libc++abi. On Debian/Ubuntu the static libc++.a library contains libc++abi, that might not be the case on Arch. In that case running something like bazel build --action_env=BAZEL_LINKLIBS='-l%:libc++.a -l%:libc++abi.a -lm -static-libgcc' prepended might help.
  • One difference between the two build logs is that one uses ld.lld and the other one uses ld.gold. The build should work with both, although I have only used lld when building workerd, IIRC bazel uses lld to link when compiling with clang with gold as a fallback option.
  • The only non-standard configuration we use to link workerd is overwriting a bazel-defined variable to statically link libc++ instead of linking dynamically/statically linking libstdc++, which would be difficult to do by just adding link options. We prefer static linkage in this case to ensure backwards compatibility. If you uncomment the line with build:linux --action_env=BAZEL_LINKLIBS='-l%:libc++.a -lm -static-libgcc' in .bazelrc that could resolve issues these issues, although bazel will likely end up using shared linkage.

@kpcyrd
Copy link
Author

kpcyrd commented Feb 19, 2024

Thanks, the first suggestion worked! There's now packages for:

Please feel free to reach out if you have any feedback.

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

2 participants