Open apprehensions opened 4 weeks ago
Based on https://github.com/microsoft/vcpkg/blob/master/scripts/bootstrap.sh it looks like Toolchain/BuildVcpkg.sh needs to conditionally pass -musl
-- Running vcpkg install
Fetching registry information from https://github.com/microsoft/vcpkg (HEAD)...
Detecting compiler hash for triplet x64-linux...
error: while detecting compiler information:
The log file content at "/home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/buildtrees/detect_compiler/stdout-x64-linux.log" is:
-- Found ninja('1.9') but at least version 1.10.2 is required! Trying to use internal version if possible!
-- Downloading https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip -> ninja-linux-1.10.2.zip...
-- Configuring x64-linux-rel
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
Command failed: /usr/bin/cmake /home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/scripts/detect_compiler -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/packages/detect_compiler_x64-linux -DCMAKE_MAKE_PROGRAM=/home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/downloads/tools/ninja/1.10.2-linux/ninja -DCMAKE_SYSTEM_NAME=Linux -DBUILD_SHARED_LIBS=OFF -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=/home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/scripts/toolchains/linux.cmake -DVCPKG_TARGET_TRIPLET=x64-linux -DVCPKG_SET_CHARSET_FLAG=ON -DVCPKG_PLATFORM_TOOLSET=external -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE -DCMAKE_VERBOSE_MAKEFILE=ON -DVCPKG_APPLOCAL_DEPS=OFF -DCMAKE_TOOLCHAIN_FILE=/home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON -DVCPKG_CXX_FLAGS= -DVCPKG_CXX_FLAGS_RELEASE= -DVCPKG_CXX_FLAGS_DEBUG= -DVCPKG_C_FLAGS= -DVCPKG_C_FLAGS_RELEASE= -DVCPKG_C_FLAGS_DEBUG= -DVCPKG_CRT_LINKAGE=dynamic -DVCPKG_LINKER_FLAGS= -DVCPKG_LINKER_FLAGS_RELEASE= -DVCPKG_LINKER_FLAGS_DEBUG= -DVCPKG_TARGET_ARCHITECTURE=x64 -DCMAKE_INSTALL_LIBDIR:STRING=lib -DCMAKE_INSTALL_BINDIR:STRING=bin -D_VCPKG_ROOT_DIR=/home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg -DZ_VCPKG_ROOT_DIR=/home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg -D_VCPKG_INSTALLED_DIR=/home/sewn/src/ladybird/Build/ladybird/vcpkg_installed -DVCPKG_MANIFEST_INSTALL=OFF
Working Directory: /home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/buildtrees/detect_compiler/x64-linux-rel
Error code: 1
See logs for more information:
/home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/buildtrees/detect_compiler/config-x64-linux-rel-CMakeCache.txt.log
/home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/buildtrees/detect_compiler/config-x64-linux-rel-out.log
/home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/buildtrees/detect_compiler/config-x64-linux-rel-err.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_configure_cmake.cmake:344 (vcpkg_execute_required_process)
scripts/detect_compiler/portfile.cmake:18 (vcpkg_configure_cmake)
scripts/ports.cmake:175 (include)
error: vcpkg was unable to detect the active compiler's information. See above for the CMake failure output.
-- Running vcpkg install - failed
CMake Error at Toolchain/Tarballs/vcpkg/scripts/buildsystems/vcpkg.cmake:899 (message):
vcpkg install failed. See logs for more information:
/home/sewn/src/ladybird/Build/ladybird/vcpkg-manifest-install.log
Call Stack (most recent call first):
/usr/share/cmake-3.29/Modules/CMakeDetermineSystem.cmake:146 (include)
CMakeLists.txt:6 (project)
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
CMake Error at CMakeLists.txt:2 (project):
Running
'/home/sewn/src/ladybird/Toolchain/Tarballs/vcpkg/downloads/tools/ninja/1.10.2-linux/ninja' '--version'
failed with:
no such file or directory
More glibc binaries.
Similar error on Ubuntu 23.10 in WSL2
If modifying our BuildVcpkg.sh script to add --musl
does not produce a working install on Alpine without glibc compat libraries, then that is a bug with upstream vcpkg.
Is it the case that removing Toolchain/Tarballs, Toolchain/Local, and Toolchain/Build, modifying Toolchain/BuildVcpkg.sh to pass --musl
to the vcpkg bootstrap script, and re-running the build still produces binaries that require glibc symbols?
See the my last comment before this one @ADKaster
Noticed this
cat /home/stefano/ladybird/Toolchain/Tarballs/vcpkg/buildtrees/icu/config-x64-linux-dbg-err.log configure: WARNING: unrecognized options: --disable-silent-rules configure: error: 'autoconf-archive' is missing
I installed the package with apt and now it is moving along, I update this comment when the compilation ends
EDIT: Compiled successfully, I forgot to set the env variable so I run like this and it works (created the tmp directory under the user and set permission 0700)
XDG_RUNTIME_DIR=/var/tmp/ladybird ./Meta/ladybird.sh run ladybird
I am on a Linux musl-based distribution, and building Ladybird requires running a binary from Microsoft which is linked against glibc; it causes the following build errors:
A quick check at the binary: