Bug 1228331 - Package colord does not build with gcc 14 on i586 because of use of incompatible pointer types
Summary: Package colord does not build with gcc 14 on i586 because of use of incompati...
Status: IN_PROGRESS
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Martin Jambor
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: modern_C
  Show dependency treegraph
 
Reported: 2024-07-25 12:09 UTC by Martin Jambor
Modified: 2024-07-25 16:39 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Jambor 2024-07-25 12:09:00 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 *’}
Comment 1 Martin Jambor 2024-07-25 12:10:17 UTC
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.
Comment 2 Martin Jambor 2024-07-25 16:39:44 UTC
I have created https://build.opensuse.org/request/show/1189614