jakt icon indicating copy to clipboard operation
jakt copied to clipboard

Building on Ubuntu 22.04 g++-11

Open icojb25 opened this issue 1 year ago • 4 comments

Has anyone been able to build this on Ubuntu 22.04 with either g++11 or clang++14? I have followed the build instructions pretty closely (exactly) as far as I can tell and I still cant get a working compilation.

With clang:

  • complains about ld unable to find stdc++
  • Linking CXX executable cmTC_00879 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_00879.dir/link.txt --verbose=1 /usr/bin/clang++ CMakeFiles/cmTC_00879.dir/testCXXCompiler.cxx.o -o cmTC_00879 /usr/bin/ld: cannot find -lstdc++: No such file or directory

With g++:

  • complains about missing "/usr/lib/llvm-14/lib/libclangBasic.a" even when I specify _DCMAKE_CXX_COMPILER=g++=11
  • on a stock standing install of build-essential etc

Are the instructions up to date? Thanks in advance.

icojb25 avatar Sep 23 '23 16:09 icojb25

Yeah the build instructions are most likely out-of-date.

  • clang 14: not sure about the stdc++ error, but clang-15 is the minimum requirement anyway.
  • g++: I think you're missing libclang's dev package? try apt install libclang-15-dev

alimpfard avatar Sep 23 '23 16:09 alimpfard

Hmm, i think i have gotten this to work by upgrading to a min version of gcc / g++ = 12 and setting -DCMAKE_CXX_COMPILER=g++-12

I was not able to get this to compile with clang, even when upgrading to clang++-15

icojb25 avatar Sep 23 '23 22:09 icojb25

@icojb25 I could sucessfully build Ladybird from AUR in the latest Arch Linux using cmake - see PKGBUILD, so is should be possible to build it in Ubuntu too.

niutech avatar Dec 10 '23 00:12 niutech

Here are the steps to build Ladybird in Ubuntu 22.04:

  1. Upgrade cmake to 3.28 using instructions from https://apt.kitware.com
  2. Install dependencies: sudo apt install build-essential g++-12 cmake ccache libgl1-mesa-dev ninja-build qt6-base-dev qt6-tools-dev-tools qt6-multimedia-dev qt6-wayland
  3. Clone serenity repo: git clone https://github.com/SerenityOS/serenity.git && cd serenity
  4. Run cmake: cmake -GNinja -DCMAKE_CXX_COMPILER=g++-12 -S Ladybird -B Build/ladybird
  5. Build: cmake --build Build/ladybird
  6. Run: ninja -C Build/ladybird run.

Ladybird in Ubuntu 22.04

However, I get the following errors in the console:

Runtime error: Don't know how to load certs!
Runtime error: Don't know how to load certs!
Ladybird(1172): WebContent process crashed!

niutech avatar Dec 21 '23 10:12 niutech