From a5273ec98a5f4466bbf2a9ad0e0ef3071d3df84b Mon Sep 17 00:00:00 2001 From: mateoalfaro Date: Thu, 8 Oct 2026 16:15:12 -0600 Subject: [PATCH] fix(meson): link libm into the wallpaper test executables dynamic_wallpaper.vala's sun-elevation math gets sin(x)+cos(x) pairs folded into sincos() by GCC at -O2. sincos/sin/cos/acos/fmod are in libm, which these targets didn't link. On x86_64 some dependency's DT_NEEDED chain resolves them transitively, but on aarch64-linux the closure provides no libm and the three links fail with "undefined reference to `sincos'". Add cc.find_library('m'), matching the other math-using targets in this file (recorder-plan-test, the main shell binary). Assisted-by: opencode:GLM-5.3-Flash AI-Scope: Applied the validated arm-libm.patch from the upstream fix report (adds cc.find_library('m') to the three wallpaper test executables in meson.build); patch and suggested commit message provided by the report at the user's request. --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 65b37ac..5789d22 100644 --- a/meson.build +++ b/meson.build @@ -904,7 +904,7 @@ install_data('data/icons/singularity-account-secure-mail.svg', wallpaper_collections_test = executable('wallpaper-collections-test', sources: ['src/core/wallpaper_collections.vala', 'src/core/dynamic_wallpaper.vala', 'tests/wallpaper_collections_test.vala'], - dependencies: [dependency('gobject-2.0'), dependency('glib-2.0'), dependency('gio-2.0'), gee_dep, json_dep], + dependencies: [dependency('gobject-2.0'), dependency('glib-2.0'), dependency('gio-2.0'), gee_dep, json_dep, cc.find_library('m')], ) test('wallpaper-collections', wallpaper_collections_test) @@ -916,14 +916,14 @@ test('wallpaper-rotation-state', wallpaper_rotation_state_test) wallpaper_gallery_test = executable('wallpaper-gallery-test', sources: ['src/core/wallpaper_gallery.vala', 'src/core/dynamic_wallpaper.vala', 'tests/wallpaper_gallery_test.vala'], - dependencies: [dependency('gobject-2.0'), dependency('gio-2.0'), gee_dep, json_dep], + dependencies: [dependency('gobject-2.0'), dependency('gio-2.0'), gee_dep, json_dep, cc.find_library('m')], ) test('wallpaper-gallery', wallpaper_gallery_test) wallpaper_rotator_test = executable('wallpaper-rotator-test', sources: ['src/core/wallpaper_collections.vala', 'src/core/wallpaper_gallery.vala', 'src/core/dynamic_wallpaper.vala', 'src/core/wallpaper_rotation_state.vala', 'src/core/wallpaper_rotator.vala', 'tests/wallpaper_rotator_test.vala'], - dependencies: [dependency('gobject-2.0'), dependency('glib-2.0'), dependency('gio-2.0'), gee_dep, json_dep], + dependencies: [dependency('gobject-2.0'), dependency('glib-2.0'), dependency('gio-2.0'), gee_dep, json_dep, cc.find_library('m')], ) test('wallpaper-rotator', wallpaper_rotator_test)