Building on Fedora 41 on an x86_64 machine is currently running into a patchelf related build failure.
Reported upstream here at vcpkg: microsoft/vcpkg#41576
And here at nixos/patchelf: NixOS/patchelf#568
The issue can be worked around by the following steps:
rm -rf Build/vcpkg
rm -rf Build/release
(and any other Build/ directories)diff --git a/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake b/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake
index a43a4493d6..caa2ee7a1e 100644
--- a/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake
+++ b/Meta/CMake/vcpkg/generate_vcpkg_toolchain_variables.cmake
@@ -8,4 +8,6 @@ if (NOT "${CMAKE_CXX_COMPILER}" STREQUAL "")
string(APPEND EXTRA_VCPKG_VARIABLES "set(ENV{CXX} ${CMAKE_CXX_COMPILER})\n")
endif()
+string(APPEND EXTRA_VCPKG_VARIABLES "set(ENV{LDFLAGS} -Wl,-z,noseparate-code)\n")
+
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/build-vcpkg-variables.cmake" "${EXTRA_VCPKG_VARIABLES}")
./Meta/ladybird.sh run
Linux
Successful build
A build failure similar to the following:
CMake Error at /home/jmansfield/src/github/serenityos/ladybird/Build/ladybird/vcpkg_installed/x64-linux/share/vcpkg-pkgconfig-get-modules/x_vcpkg_pkgconfig_get_modules.cmake:31 (execute_process):
execute_process failed command indexes:
1: "Abnormal exit with child return code: Segmentation fault"
Call Stack (most recent call first):
buildtrees/versioning_/versions/skia/76a242d24e0e810ad8c78e3deaef69d4b634e8fc/skia-functions.cmake:92 (x_vcpkg_pkgconfig_get_modules)
buildtrees/versioning_/versions/skia/76a242d24e0e810ad8c78e3deaef69d4b634e8fc/skia-functions.cmake:73 (third_party_from_pkgconfig)
buildtrees/versioning_/versions/skia/76a242d24e0e810ad8c78e3deaef69d4b634e8fc/portfile.cmake:242 (get_externals)
scripts/ports.cmake:192 (include)
error: building skia:x64-linux failed with: BUILD_FAILED
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