Bug 1225792 - Package kbuild does not build with gcc14 because of all sorts of C99 violations
Summary: Package kbuild does not build with gcc14 because of all sorts of C99 violations
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Development (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-06-02 08:43 UTC by Martin Jambor
Modified: 2024-06-07 11:35 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-06-02 08:43:32 UTC
Gcc 14 newly by default treats as errors a number of situations which
before were only warnings.  For more information see
https://gcc.gnu.org/gcc-14/porting_to.html and meta bug #1220571.

Because of this, package kbuild fails to compile.  This can be seen online
at:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/kbuild/standard/x86_64

It can be reproduced locally with command: osc build --clean
--alternative-project home:rguenther:nextgcc

We probably need what Fedore did and what is listed at:
https://gitlab.com/fweimer-rh/fedora-modernc/-/blob/main/pkg/k/kBuild.md?ref_type=heads


The error (that halts the build) is:

[   24s] /home/abuild/rpmbuild/BUILD/kbuild-0.1.9998svn3427/src/kmk/loadapi.c: In function ‘gmk_eval’:
[   24s] /home/abuild/rpmbuild/BUILD/kbuild-0.1.9998svn3427/src/kmk/loadapi.c:62:51: error: passing argument 3 of ‘eval_buffer’ makes pointer from integer without a cast [-Wint-conversion]
[   24s]    62 |   eval_buffer (s, flp IF_WITH_VALUE_LENGTH_PARAM (strlen (s) /** @todo suboptimal */));
[   24s]       |                                                   ^~~~~~~~~~
[   24s]       |                                                   |
[   24s]       |                                                   size_t {aka long unsigned int}
[   24s] /home/abuild/rpmbuild/BUILD/kbuild-0.1.9998svn3427/src/kmk/makeint.h:265:51: note: in definition of macro ‘IF_WITH_VALUE_LENGTH_PARAM’
[   24s]   265 | # define IF_WITH_VALUE_LENGTH_PARAM(a_Expr)     , a_Expr
[   24s]       |                                                   ^~~~~~
[   24s] /home/abuild/rpmbuild/BUILD/kbuild-0.1.9998svn3427/src/kmk/dep.h:175:83: note: expected ‘char *’ but argument is of type ‘size_t’ {aka ‘long unsigned int’}
[   24s]   175 | void eval_buffer (char *buffer, const floc *floc IF_WITH_VALUE_LENGTH(COMMA char *eos));
[   24s]       |                                                                             ~~~~~~^~~
[   24s] /home/abuild/rpmbuild/BUILD/kbuild-0.1.9998svn3427/src/kmk/makeint.h:264:49: note: in definition of macro ‘IF_WITH_VALUE_LENGTH’
[   24s]   264 | # define IF_WITH_VALUE_LENGTH(a_Expr)           a_Expr
[   24s]       |                                                 ^~~~~~
Comment 1 Martin Jambor 2024-06-06 07:30:50 UTC
I'm having a look.
Comment 2 Martin Jambor 2024-06-07 11:35:19 UTC
I have submitted https://build.opensuse.org/request/show/1179185