Skip to content

plugins/language: Fix linking against accountsservice

In Nixpkgs, I see the following when trying to open the Languages page:

file:///nix/store/6zzcknr28hfn1yhsyfkbsx11qdksma8w-lomiri-ui-toolkit-1.3.5011/lib/qt-5.15.12/qml/Lomiri/Components/1.3/AdaptivePageLayout.qml:708:9: QML PageWrapper: (file:///nix/store/9gy7illzcmjn0pwdy38nc12gpp9bb6sr-lomiri-system-settings-1.0.2/share/lomiri-system-settings/qml-plugins/language/PageComponent.qml:30:1: plugin cannot be loaded for module "Lomiri.SystemSettings.LanguagePlugin": Cannot load library /nix/store/9gy7illzcmjn0pwdy38nc12gpp9bb6sr-lomiri-system-settings-1.0.2/lib/lomiri-system-settings/private/Lomiri/SystemSettings/LanguagePlugin/libLomiriLanguagePlugin.so: (/nix/store/9gy7illzcmjn0pwdy38nc12gpp9bb6sr-lomiri-system-settings-1.0.2/lib/lomiri-system-settings/private/Lomiri/SystemSettings/LanguagePlugin/libLomiriLanguagePlugin.so: undefined symbol: _Z28act_user_manager_get_defaultv)

Using --unresolved-symbols=report-all at buildtime complains:

[100%] Linking CXX shared module libLomiriLanguagePlugin.so
/nix/store/xdqs45iclhp9dz8zz9pvn5zivjbhid1a-binutils-2.40/bin/ld: CMakeFiles/LomiriLanguagePlugin.dir/language-plugin.cpp.o: in function `LanguagePlugin::userLoaded()':
language-plugin.cpp:(.text+0x3f9): undefined reference to `act_user_is_loaded(_ActUser*)'
/nix/store/xdqs45iclhp9dz8zz9pvn5zivjbhid1a-binutils-2.40/bin/ld: CMakeFiles/LomiriLanguagePlugin.dir/language-plugin.cpp.o: in function `LanguagePlugin::managerLoaded()':
language-plugin.cpp:(.text+0x4c3): undefined reference to `act_user_manager_get_user_by_id(_ActUserManager*, unsigned int)'
/nix/store/xdqs45iclhp9dz8zz9pvn5zivjbhid1a-binutils-2.40/bin/ld: language-plugin.cpp:(.text+0x4dd): undefined reference to `act_user_is_loaded(_ActUser*)'
/nix/store/xdqs45iclhp9dz8zz9pvn5zivjbhid1a-binutils-2.40/bin/ld: CMakeFiles/LomiriLanguagePlugin.dir/language-plugin.cpp.o: in function `LanguagePlugin::LanguagePlugin(QObject*)':
language-plugin.cpp:(.text+0x49b4): undefined reference to `act_user_manager_get_default()'
collect2: error: ld returned 1 exit status

This seems to make it work: It links, and the page can now be opened without issues.

Merge request reports