Bug 1221006 - GCC 14: linux-atm package fails
Summary: GCC 14: linux-atm package fails
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Jiri Bohac
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: modern_C
  Show dependency treegraph
 
Reported: 2024-03-06 05:41 UTC by Michal Jireš
Modified: 2024-07-12 11:26 UTC (History)
2 users (show)

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 Michal Jireš 2024-03-06 05:41:26 UTC
Building linux-atm with GCC 14 fails here:
https://build.opensuse.org/package/live_build_log/openSUSE:Factory:Staging:Gcc7/linux-atm/standard/x86_64

Due to (exhaustive list of errors):

  100 |         fprintf(stderr,"internal error: len %d %% %d\n",req.length,
conn.c: In function ‘accept_conn’:
conn.c:414:57: error: passing argument 3 of ‘accept’ from incompatible pointer type [-Wincompatible-pointer-types]
  414 |         fd = accept(conn->fd, (struct sockaddr *)&addr, &len);
      |                                                         ^~~~
      |                                                         |
      |                                                         size_t * {aka long unsigned int *}
In file included from ../../src/include/atm.h:10,
                 from conn.c:42:
/usr/include/sys/socket.h:307:42: note: expected ‘socklen_t * restrict’ {aka ‘unsigned int * restrict’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
  307 |                    socklen_t *__restrict __addr_len);
      |                    ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

See the meta bug#1220571 for more info.
Comment 1 Martin Jambor 2024-03-06 10:33:54 UTC
FTR, notes on how Fedora is dealing this should be available here (though the patch there does not seem to fix the pointer incompatibility issue reported here):
https://gitlab.com/fweimer-rh/fedora-modernc/-/blob/main/pkg/l/linux-atm.md?ref_type=heads
Comment 2 Martin Jambor 2024-07-12 11:26:27 UTC
The include that Fedora adds in their package is already present in our package.

The bug is caused by a wrong type being passed to function accept (which IMHO could cause wrong behavior on some big-endian platform), I have created https://build.opensuse.org/request/show/1187046 to address that.