jakt
jakt copied to clipboard
Building on Ubuntu 22.04 g++-11
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.
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
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 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.
Here are the steps to build Ladybird in Ubuntu 22.04:
- Upgrade cmake to 3.28 using instructions from https://apt.kitware.com
- 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
- Clone serenity repo:
git clone https://github.com/SerenityOS/serenity.git && cd serenity
- Run cmake:
cmake -GNinja -DCMAKE_CXX_COMPILER=g++-12 -S Ladybird -B Build/ladybird
- Build:
cmake --build Build/ladybird
- Run:
ninja -C Build/ladybird run
.
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!