Bug 1219909

Summary: [gcc14] accountsservice fails to build due to local suse patch
Product: [openSUSE] openSUSE Tumbleweed Reporter: Dominique Leuenberger <dimstar>
Component: GNOMEAssignee: xiaoguang wang <xiaoguang.wang>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: gnome-bugs, yfjiang
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Dominique Leuenberger 2024-02-14 10:12:00 UTC
When using GCC 14 to build accountsservice, we run into this build error:

[   10s] ../src/gdm-sysconfig.c: In function ‘gdm_sysconfig_save_file’:
[   10s] ../src/gdm-sysconfig.c:382:47: error: passing argument 2 of ‘save_settings_file’ from incompatible pointer type [-Wincompatible-pointer-types]
[   10s]   382 |         return save_settings_file (file_name, sysconfig);
[   10s]       |                                               ^~~~~~~~~
[   10s]       |                                               |
[   10s]       |                                               const gchar ** {aka const char **}
[   10s] ../src/gdm-sysconfig.c:91:53: note: expected ‘gchar **’ {aka ‘char **’} but argument is of type ‘const gchar **’ {aka ‘const char **’}
[   10s]    91 | save_settings_file (const gchar *file_name, gchar **lines)
[   10s]       |                                             ~~~~~~~~^~~~~
[   10s] ../src/gdm-sysconfig.c: In function ‘gdm_sysconfig_load_value’:
[   10s] ../src/gdm-sysconfig.c:458:28: error: passing argument 1 of ‘get_value’ from incompatible pointer type [-Wincompatible-pointer-types]
[   10s]   458 |         value = get_value (lines, key);
[   10s]       |                            ^~~~~
[   10s]       |                            |
[   10s]       |                            gchar ** {aka char **}
[   10s] ../src/gdm-sysconfig.c:271:26: note: expected ‘const gchar **’ {aka ‘const char **’} but argument is of type ‘gchar **’ {aka ‘char **’}
[   10s]   271 | get_value (const gchar **lines, const gchar *key)
[   10s]       |            ~~~~~~~~~~~~~~^~~~~

The code comes from a local SUSE patch: accountsservice-sysconfig.patch
Comment 1 Dominique Leuenberger 2024-02-14 10:41:51 UTC
there was also an upstream-issue in the mocklibc-1.0 subproject tarball - but that has already been addressed in GNOME:Next
Comment 3 xiaoguang wang 2024-02-29 07:33:38 UTC
https://build.opensuse.org/request/show/1152023

Fixed.