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

Building on Ubuntu 22.04 g++-11 #1483

Open
icojb25 opened this issue Sep 23, 2023 · 4 comments
Open

Building on Ubuntu 22.04 g++-11 #1483

icojb25 opened this issue Sep 23, 2023 · 4 comments

Comments

@icojb25
Copy link

icojb25 commented Sep 23, 2023

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.

@alimpfard
Copy link
Member

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

@icojb25
Copy link
Author

icojb25 commented Sep 23, 2023

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

@niutech
Copy link

niutech commented Dec 10, 2023

@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
Copy link

niutech commented Dec 21, 2023

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!

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

3 participants