Bugzilla – Bug 1228331
Package colord does not build with gcc 14 on i586 because of use of incompatible pointer types
Last modified: 2024-07-25 16:39:44 UTC
Package colord fails to build with GCC 14 on i586 (and probably othr 32bit architectures too) because of various C99 violations which previously just generated warning s but which cause errors with GCC 14 by default. The problem is that there is a misunderstanding between function gmtime_r and its caller whether time is stored in 32 or 64 bits: [ 33s] ../lib/colord/cd-icc.c:1723:32: error: passing argument 1 of ‘gmtime_r’ from incompatible pointer type [-Wincompatible-pointer-types] [ 33s] 1723 | if (!gmtime_r (&priv->creation_time, &creation_time)) { [ 33s] | ^~~~~~~~~~~~~~~~~~~~ [ 33s] | | [ 33s] | gint64 * {aka long long int *} [ 33s] In file included from /usr/include/glib-2.0/glib/gtypes.h:41, [ 33s] from /usr/include/glib-2.0/glib/galloca.h:34, [ 33s] from /usr/include/glib-2.0/glib.h:32, [ 33s] from ../lib/colord/cd-icc.c:30: [ 33s] /usr/include/time.h:155:54: note: expected ‘const time_t * restrict’ {aka ‘const long int * restrict’} but argument is of type ‘gint64 *’ {aka ‘long long int *’}
The issue can be avoided with adding -D_TIME_BITS=64 to compiler options. Because that define also mandates _FILE_OFFSET_BITS=64 I am going to add both.
I have created https://build.opensuse.org/request/show/1189614