Bug 263530 - devel/elfutils: Fails to build with GCC 11: ebl_syscall_abi.c:37:64: error: argument 5 of type 'int *' declared as a pointer [-Werror=array-parameter=]
Summary: devel/elfutils: Fails to build with GCC 11: ebl_syscall_abi.c:37:64: error: a...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Conrad Meyer
URL: http://package18.nyi.freebsd.org/data...
Keywords:
: 264085 (view as bug list)
Depends on: 263594
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-24 19:05 UTC by Lorenzo Salvadore
Modified: 2023-09-20 12:06 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (cem)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2022-04-24 19:05:47 UTC
Building port with GCC 11 gives the following error message (full log in URL):

ebl_syscall_abi.c:37:64: error: argument 5 of type 'int *' declared as a pointer [-Werror=array-parameter=]
   37 | ebl_syscall_abi (Ebl *ebl, int *sp, int *pc, int *callno, int *args)
      |                                                           ~~~~~^~~~
In file included from ./libeblP.h:34,
                 from ebl_syscall_abi.c:33:
./libebl.h:248:46: note: previously declared as an array 'int[6]'
  248 |                             int *callno, int args[6]);
      |                                          ~~~~^~~~~~~
cc1: all warnings being treated as errors
Comment 1 Gerald Pfeifer freebsd_committer freebsd_triage 2022-04-24 19:23:03 UTC
Note, this blocks the update of GCC_DEFAULT from GCC 10 to GCC 11 (where
GCC 12 is going to be released soon).

Also, maybe once this is addressed USE_GCC can be removed in favor of 
using the default clang compiler?
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2022-04-26 18:43:10 UTC
Once the patch from bug#263594 is committed this issue should be closed because elfutils would not depend on gcc any more.
Comment 3 Lorenzo Salvadore freebsd_committer freebsd_triage 2022-05-19 20:42:20 UTC
Thanks for your help Yuri.

I am unsure the issue can be closed now that USE_GCC has been removed from elfutils: the build would still fail if a user attempted to compile the port with GCC 11.

But the issue is indeed solved when the port is built with the default compiler. So I remove the block to the update of GCC_DEFAULT from GCC 10 to GCC 11.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2022-05-19 21:33:57 UTC
(In reply to Lorenzo Salvadore from comment #3)


Lorenzo,

You are right, the current version fails with gcc, even with gcc-10: https://sourceware.org/bugzilla/show_bug.cgi?id=29158 This is a regression.


Yuri
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2022-05-19 21:34:15 UTC
*** Bug 264085 has been marked as a duplicate of this bug. ***
Comment 6 John Hein 2023-09-20 12:06:45 UTC
Is this fixed after ports d966de5a7dd68918795218e7ee75da149fb17e06?