With an Ubuntu single-user install of nix, and updated via nix-channel --update; nix-env --install --attr nixpkgs.nix nixpkgs.cacert
nix (Nix) 2.18.1
Running the command from the Ladybird build docs:
nix --extra-experimental-features nix-command --extra-experimental-features flakes -- develop ./Toolchain#ladybird
and then trying to build ladybird via serenity.sh
./Meta/serenity.sh run lagom ladybird
Gives a bunch of errors about finding libstdc++
[1/2317] Generating Userland/Services/RequestServer/RequestClientEndpoint.h
FAILED: Userland/Services/RequestServer/RequestClientEndpoint.h /home/andrew/serenity/Build/lagom/Userland/Services/RequestServer/RequestClientEndpoint.h
cd /home/andrew/serenity/Build/lagom && /home/andrew/serenity/Build/lagom/bin/IPCCompiler /home/andrew/serenity/Userland/Services/RequestServer/RequestClient.ipc -o Userland/Services/RequestServer/RequestClientEndpoint.h.tmp && /nix/store/vnhl4zdy7igx9gd3q1d548vwzz15a9ma-cmake-3.27.7/bin/cmake -E copy_if_different Userland/Services/RequestServer/RequestClientEndpoint.h.tmp Userland/Services/RequestServer/RequestClientEndpoint.h && /nix/store/vnhl4zdy7igx9gd3q1d548vwzz15a9ma-cmake-3.27.7/bin/cmake -E remove Userland/Services/RequestServer/RequestClientEndpoint.h.tmp
/home/andrew/serenity/Build/lagom/bin/IPCCompiler: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[2/2317] Generating Userland/Services/RequestServer/RequestServerEndpoint.h
FAILED: Userland/Services/RequestServer/RequestServerEndpoint.h /home/andrew/serenity/Build/lagom/Userland/Services/RequestServer/RequestServerEndpoint.h
cd /home/andrew/serenity/Build/lagom && /home/andrew/serenity/Build/lagom/bin/IPCCompiler /home/andrew/serenity/Userland/Services/RequestServer/RequestServer.ipc -o Userland/Services/RequestServer/RequestServerEndpoint.h.tmp && /nix/store/vnhl4zdy7igx9gd3q1d548vwzz15a9ma-cmake-3.27.7/bin/cmake -E copy_if_different Userland/Services/RequestServer/RequestServerEndpoint.h.tmp Userland/Services/RequestServer/RequestServerEndpoint.h && /nix/store/vnhl4zdy7igx9gd3q1d548vwzz15a9ma-cmake-3.27.7/bin/cmake -E remove Userland/Services/RequestServer/RequestServerEndpoint.h.tmp
/home/andrew/serenity/Build/lagom/bin/IPCCompiler: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
[3/2317] Generating Userland/Services/WebSocket/WebSocketClientEndpoint.h
Looking at the RPATH of the created binaries:
~/serenity$ readelf -d Build/lagom/bin/IPCCompiler | grep RUNPATH
0x000000000000001d (RUNPATH) Library runpath: [$ORIGIN:$ORIGIN/../lib:/home/andrew/serenity/outputs/out/lib]
vs one created by g++ manually
~/serenity$ readelf -d a.out | grep RUNPATH
0x000000000000001d (RUNPATH) Library runpath: [/home/andrew/serenity/Toolchain/outputs/out/lib:/nix/store/qn3ggz5sf3hkjs2c797xf7nan3amdxmp-glibc-2.38-27/lib:/nix/store/1z0lkblksl7niy2w5rfv265hw0fn9p1q-gcc-13.2.0-lib/lib]
We are missing the glibc and gcc paths.
So two questions:
The same errors occur with the serenity flake
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too