-
Notifications
You must be signed in to change notification settings - Fork 575
Closed
Labels
building-systemRelated to building sytemRelated to building sytemenhancementNew features or enhancements of existing onesNew features or enhancements of existing ones
Description
I'm attempting to get MEGASync built from source on Raspberry Pi OS Bookworm ARM64 on a Raspberry Pi 5, as currently configured the build breaks because there is no ARM64 Linux target for CMake inside the SDK. I whipped up a quick CMake triplet file that does build with default options, cmake/vcpkg_overlay_triplets/arm64-linux.cmake:
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
if(PORT MATCHES "ffmpeg")
# build this library as dynamic (usually because it is LGPL licensed)
set(VCPKG_LIBRARY_LINKAGE dynamic)
else()
# build this library statically (much simpler installation, debugging, etc)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
As well as the necessary edit to cmake/modules/vcpkg_management.cmake:
--- a/cmake/modules/vcpkg_management.cmake
+++ b/cmake/modules/vcpkg_management.cmake
@@ -28,6 +28,8 @@ macro(process_vcpkg_libraries overlays_path)
else()
if (CMAKE_SYSTEM_PROCESSOR MATCHES "armv7l" OR (NOT CMAKE_SYSTEM_PROCESSOR AND HOST_ARCH MATCHES "armv7l"))
set(VCPKG_TARGET_TRIPLET "arm-linux")
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64" OR (NOT CMAKE_SYSTEM_PROCESSOR AND HOST_ARCH MATCHES "aarch64"))
+ set(VCPKG_TARGET_TRIPLET "arm64-linux")
else()
set(VCPKG_TARGET_TRIPLET "x64-linux-mega")
endif()
In order for this to build the only deviations from the README instructions are to:
- Preface the build command with VCPKG_FORCE_SYSTEM_BINARIES, i.e.
VCPKG_FORCE_SYSTEM_BINARIES=1 cmake -DVCPKG_ROOT=vcpkg -DCMAKE_BUILD_TYPE=Release -S sdk -B build_dir - Install additional prerequisites of
cmakeandninja-buildbecause of above; I also installed kernel headers just in case.
Without the force system binaries VCPKG complains that it's necessary on ARM and S390 platforms.
Build output attached.
cmake_config.txt
cmake_make.txt
Metadata
Metadata
Assignees
Labels
building-systemRelated to building sytemRelated to building sytemenhancementNew features or enhancements of existing onesNew features or enhancements of existing ones