Skip to content

Unable to build workerd on Ubuntu 22.04.1 #41

@jonasclaes

Description

@jonasclaes

Expected outcome

workerd should build fine using bazel.

Current outcome

When I try to compile workerd, it fails with the following error message:

jonas@jonas-asus:~/repos/clones/cloudflare/workerd$ bazel build -c opt //src/workerd/server:workerd
INFO: Analyzed target //src/workerd/server:workerd (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/jonas/.cache/bazel/_bazel_jonas/c86f39fb6ae3f61b12a0ae374033648e/external/capnp-cpp/src/kj/BUILD.bazel:5:11: Compiling src/kj/source-location.c++ failed: undeclared inclusion(s) in rule '@capnp-cpp//src/kj:kj':
this rule is missing dependency declarations for the following files included by 'src/kj/source-location.c++':
  '/usr/lib/llvm-14/include/c++/v1/initializer_list'
  '/usr/lib/llvm-14/include/c++/v1/__config'
  '/usr/lib/llvm-14/include/c++/v1/__config_site'
  '/usr/lib/llvm-14/include/c++/v1/cstddef'
  '/usr/lib/llvm-14/include/c++/v1/version'
  '/usr/lib/llvm-14/include/c++/v1/__nullptr'
  '/usr/lib/llvm-14/include/c++/v1/stddef.h'
  '/usr/lib/llvm-14/include/c++/v1/cstring'
  '/usr/lib/llvm-14/include/c++/v1/string.h'
Target //src/workerd/server:workerd failed to build
INFO: Elapsed time: 1.298s, Critical Path: 0.52s
INFO: 18 processes: 17 internal, 1 linux-sandbox.
FAILED: Build did NOT complete successfully

Tries

I have tried the following:

  • Install clang-14 using apt
  • Install libc++-dev using apt
  • Install libc++abi-dev using apt

OS info

jonas@jonas-asus:~/repos/clones/cloudflare/workerd$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbuild

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions