* perf FTBFS due to -Werror with gcc 14.1.1
@ 2024-06-04 11:40 Milian Wolff
2024-06-04 13:45 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 4+ messages in thread
From: Milian Wolff @ 2024-06-04 11:40 UTC (permalink / raw)
To: linux-perf-users, Arnaldo Carvalho de Melo
Hey all,
I cannot build the acme perf/core branch on Arch anymore with gcc 14.1.1 and
Linux 6.9.3 due to multiple -Werror issues. Is this known and if so is anyone
working on it? Otherwise we can try to get this fixed ourselves and upstream
the patches then:
```
CC builtin-record.o
CC builtin-top.o
CC util/metricgroup.o
CC util/hist.o
CC util/synthetic-events.o
CC util/bpf-loader.o
tests/bpf.c: In function ‘epoll_pwait_loop’:
tests/bpf.c:36:17: error: argument 2 null where non-null expected [-
Werror=nonnull]
36 | epoll_pwait(-(i + 1), NULL, 0, 0, NULL);
| ^~~~~~~~~~~
In file included from tests/bpf.c:5:
/usr/include/sys/epoll.h:134:12: note: in a call to function ‘epoll_pwait’
declared ‘nonnull’
134 | extern int epoll_pwait (int __epfd, struct epoll_event *__events,
| ^~~~~~~~~~~
cc1: all warnings being treated as errors
make[4]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
tests/bpf.o] Error 1
make[3]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:140:
tests] Error 2
make[3]: *** Waiting for unfinished jobs....
util/metricgroup.c: In function ‘setup_metric_events’:
util/metricgroup.c:289:39: error: ‘calloc’ sizes specified with ‘sizeof’ in
the earlier argument and not in the later argument [-Werror=calloc-transposed-
args]
289 | metric_events = calloc(sizeof(void *), ids_size + 1);
| ^~~~
util/metricgroup.c:289:39: note: earlier argument should specify number of
elements, later size of each element
cc1: all warnings being treated as errors
make[4]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
util/metricgroup.o] Error 1
make[4]: *** Waiting for unfinished jobs....
builtin-top.c: In function ‘prompt_integer’:
builtin-top.c:360:21: error: allocation of insufficient size ‘0’ for type
‘char’ with size ‘1’ [-Werror=alloc-size]
360 | char *buf = malloc(0), *p;
| ^~~~~~
cc1: all warnings being treated as errors
make[3]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
builtin-top.o] Error 1
util/bpf-loader.c: In function ‘config_bpf_program’:
util/bpf-loader.c:551:29: error: ‘calloc’ sizes specified with ‘sizeof’ in the
earlier argument and not in the later argument [-Werror=calloc-transposed-
args]
551 | priv = calloc(sizeof(*priv), 1);
| ^
util/bpf-loader.c:551:29: note: earlier argument should specify number of
elements, later size of each element
cc1: all warnings being treated as errors
make[4]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
util/bpf-loader.o] Error 1
util/synthetic-events.c: In function ‘perf_event__synthesize_threads’:
util/synthetic-events.c:1042:44: error: ‘calloc’ sizes specified with ‘sizeof’
in the earlier argument and not in the later argument [-Werror=calloc-
transposed-args]
1042 | synthesize_threads = calloc(sizeof(pthread_t), thread_nr);
| ^~~~~~~~~
util/synthetic-events.c:1042:44: note: earlier argument should specify number
of elements, later size of each element
util/synthetic-events.c:1046:29: error: ‘calloc’ sizes specified with ‘sizeof’
in the earlier argument and not in the later argument [-Werror=calloc-
transposed-args]
1046 | args = calloc(sizeof(*args), thread_nr);
| ^
util/synthetic-events.c:1046:29: note: earlier argument should specify number
of elements, later size of each element
cc1: all warnings being treated as errors
make[4]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
util/synthetic-events.o] Error 1
builtin-record.c: In function ‘cmd_record’:
builtin-record.c:4091:62: error: ‘calloc’ sizes specified with ‘sizeof’ in the
earlier argument and not in the later argument [-Werror=calloc-transposed-
args]
4091 | rec->switch_output.filenames = calloc(sizeof(char *),
| ^~~~
builtin-record.c:4091:62: note: earlier argument should specify number of
elements, later size of each element
cc1: all warnings being treated as errors
make[3]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
builtin-record.o] Error 1
util/hist.c: In function ‘hist_entry__init’:
util/hist.c:494:49: error: ‘calloc’ sizes specified with ‘sizeof’ in the
earlier argument and not in the later argument [-Werror=calloc-transposed-
args]
494 | he->res_samples = calloc(sizeof(struct res_sample),
| ^~~~~~
```
Thanks
--
Milian Wolff | milian.wolff@kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: perf FTBFS due to -Werror with gcc 14.1.1
2024-06-04 11:40 perf FTBFS due to -Werror with gcc 14.1.1 Milian Wolff
@ 2024-06-04 13:45 ` Arnaldo Carvalho de Melo
2024-06-04 19:58 ` Milian Wolff
0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-06-04 13:45 UTC (permalink / raw)
To: Milian Wolff; +Cc: Namhyung Kim, linux-perf-users, Arnaldo Carvalho de Melo
On Tue, Jun 04, 2024 at 01:40:19PM +0200, Milian Wolff wrote:
> Hey all,
>
> I cannot build the acme perf/core branch on Arch anymore with gcc 14.1.1 and
perf/core isn't being updated for quite a while, we nowadays update just
the perf-tools (current merge window) and perf-tools-next (next merge
window/devel).
Also I still keep my tree uptodate when I'm updating those branches, but
nowadays the trees/branches to be used are:
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git perf-tools
https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-tools-next
As Namhyung Kim is a perf tools co-maintainer and keeps one of these
trees+branch while I keep the other.
Right now I'm taking care of perf-tools while Namhyung is managing
perf-tools.next.
> Linux 6.9.3 due to multiple -Werror issues. Is this known and if so is anyone
> working on it? Otherwise we can try to get this fixed ourselves and upstream
> the patches then:
Can you please check if the problems are present in the above
trees+branches?
- Arnaldo
> ```
> CC builtin-record.o
> CC builtin-top.o
> CC util/metricgroup.o
> CC util/hist.o
> CC util/synthetic-events.o
> CC util/bpf-loader.o
> tests/bpf.c: In function ‘epoll_pwait_loop’:
> tests/bpf.c:36:17: error: argument 2 null where non-null expected [-
> Werror=nonnull]
> 36 | epoll_pwait(-(i + 1), NULL, 0, 0, NULL);
> | ^~~~~~~~~~~
> In file included from tests/bpf.c:5:
> /usr/include/sys/epoll.h:134:12: note: in a call to function ‘epoll_pwait’
> declared ‘nonnull’
> 134 | extern int epoll_pwait (int __epfd, struct epoll_event *__events,
> | ^~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[4]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
> tests/bpf.o] Error 1
> make[3]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:140:
> tests] Error 2
> make[3]: *** Waiting for unfinished jobs....
> util/metricgroup.c: In function ‘setup_metric_events’:
> util/metricgroup.c:289:39: error: ‘calloc’ sizes specified with ‘sizeof’ in
> the earlier argument and not in the later argument [-Werror=calloc-transposed-
> args]
> 289 | metric_events = calloc(sizeof(void *), ids_size + 1);
> | ^~~~
> util/metricgroup.c:289:39: note: earlier argument should specify number of
> elements, later size of each element
> cc1: all warnings being treated as errors
> make[4]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
> util/metricgroup.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
> builtin-top.c: In function ‘prompt_integer’:
> builtin-top.c:360:21: error: allocation of insufficient size ‘0’ for type
> ‘char’ with size ‘1’ [-Werror=alloc-size]
> 360 | char *buf = malloc(0), *p;
> | ^~~~~~
> cc1: all warnings being treated as errors
> make[3]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
> builtin-top.o] Error 1
> util/bpf-loader.c: In function ‘config_bpf_program’:
> util/bpf-loader.c:551:29: error: ‘calloc’ sizes specified with ‘sizeof’ in the
> earlier argument and not in the later argument [-Werror=calloc-transposed-
> args]
> 551 | priv = calloc(sizeof(*priv), 1);
> | ^
> util/bpf-loader.c:551:29: note: earlier argument should specify number of
> elements, later size of each element
> cc1: all warnings being treated as errors
> make[4]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
> util/bpf-loader.o] Error 1
> util/synthetic-events.c: In function ‘perf_event__synthesize_threads’:
> util/synthetic-events.c:1042:44: error: ‘calloc’ sizes specified with ‘sizeof’
> in the earlier argument and not in the later argument [-Werror=calloc-
> transposed-args]
> 1042 | synthesize_threads = calloc(sizeof(pthread_t), thread_nr);
> | ^~~~~~~~~
> util/synthetic-events.c:1042:44: note: earlier argument should specify number
> of elements, later size of each element
> util/synthetic-events.c:1046:29: error: ‘calloc’ sizes specified with ‘sizeof’
> in the earlier argument and not in the later argument [-Werror=calloc-
> transposed-args]
> 1046 | args = calloc(sizeof(*args), thread_nr);
> | ^
> util/synthetic-events.c:1046:29: note: earlier argument should specify number
> of elements, later size of each element
> cc1: all warnings being treated as errors
> make[4]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
> util/synthetic-events.o] Error 1
> builtin-record.c: In function ‘cmd_record’:
> builtin-record.c:4091:62: error: ‘calloc’ sizes specified with ‘sizeof’ in the
> earlier argument and not in the later argument [-Werror=calloc-transposed-
> args]
> 4091 | rec->switch_output.filenames = calloc(sizeof(char *),
> | ^~~~
> builtin-record.c:4091:62: note: earlier argument should specify number of
> elements, later size of each element
> cc1: all warnings being treated as errors
> make[3]: *** [/home/milian/projects/src/linux/tools/build/Makefile.build:97:
> builtin-record.o] Error 1
> util/hist.c: In function ‘hist_entry__init’:
> util/hist.c:494:49: error: ‘calloc’ sizes specified with ‘sizeof’ in the
> earlier argument and not in the later argument [-Werror=calloc-transposed-
> args]
> 494 | he->res_samples = calloc(sizeof(struct res_sample),
> | ^~~~~~
> ```
>
> Thanks
>
> --
> Milian Wolff | milian.wolff@kdab.com | Senior Software Engineer
> KDAB (Deutschland) GmbH, a KDAB Group company
> Tel: +49-30-521325470
> KDAB - The Qt, C++ and OpenGL Experts
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: perf FTBFS due to -Werror with gcc 14.1.1
2024-06-04 13:45 ` Arnaldo Carvalho de Melo
@ 2024-06-04 19:58 ` Milian Wolff
2024-06-04 22:43 ` Namhyung Kim
0 siblings, 1 reply; 4+ messages in thread
From: Milian Wolff @ 2024-06-04 19:58 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: Namhyung Kim, linux-perf-users
On Dienstag, 4. Juni 2024 15:45:52 MESZ Arnaldo Carvalho de Melo wrote:
> On Tue, Jun 04, 2024 at 01:40:19PM +0200, Milian Wolff wrote:
> > Hey all,
> >
> > I cannot build the acme perf/core branch on Arch anymore with gcc 14.1.1
> > and
> perf/core isn't being updated for quite a while, we nowadays update just
> the perf-tools (current merge window) and perf-tools-next (next merge
> window/devel).
>
> Also I still keep my tree uptodate when I'm updating those branches, but
> nowadays the trees/branches to be used are:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git
> perf-tools
>
> https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git
> perf-tools-next
>
> As Namhyung Kim is a perf tools co-maintainer and keeps one of these
> trees+branch while I keep the other.
>
> Right now I'm taking care of perf-tools while Namhyung is managing
> perf-tools.next.
Ah indeed that's it, thank you!
Which one of the two would you recommend for interested parties that want to
keep track of perf tools development, i.e. what was perf/core?
Thanks
--
Milian Wolff | milian.wolff@kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: perf FTBFS due to -Werror with gcc 14.1.1
2024-06-04 19:58 ` Milian Wolff
@ 2024-06-04 22:43 ` Namhyung Kim
0 siblings, 0 replies; 4+ messages in thread
From: Namhyung Kim @ 2024-06-04 22:43 UTC (permalink / raw)
To: Milian Wolff; +Cc: Arnaldo Carvalho de Melo, linux-perf-users
Hello,
On Tue, Jun 04, 2024 at 09:58:20PM +0200, Milian Wolff wrote:
> On Dienstag, 4. Juni 2024 15:45:52 MESZ Arnaldo Carvalho de Melo wrote:
> > On Tue, Jun 04, 2024 at 01:40:19PM +0200, Milian Wolff wrote:
> > > Hey all,
> > >
> > > I cannot build the acme perf/core branch on Arch anymore with gcc 14.1.1
> > > and
> > perf/core isn't being updated for quite a while, we nowadays update just
> > the perf-tools (current merge window) and perf-tools-next (next merge
> > window/devel).
> >
> > Also I still keep my tree uptodate when I'm updating those branches, but
> > nowadays the trees/branches to be used are:
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git
> > perf-tools
> >
> > https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git
> > perf-tools-next
> >
> > As Namhyung Kim is a perf tools co-maintainer and keeps one of these
> > trees+branch while I keep the other.
> >
> > Right now I'm taking care of perf-tools while Namhyung is managing
> > perf-tools.next.
>
> Ah indeed that's it, thank you!
>
> Which one of the two would you recommend for interested parties that want to
> keep track of perf tools development, i.e. what was perf/core?
The perf-tools-next is for new development (previously perf/core) and the
perf-tools is for fixes in the current cycles (previously perf/urgent).
Thanks,
Namhyung
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-04 22:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-04 11:40 perf FTBFS due to -Werror with gcc 14.1.1 Milian Wolff
2024-06-04 13:45 ` Arnaldo Carvalho de Melo
2024-06-04 19:58 ` Milian Wolff
2024-06-04 22:43 ` Namhyung Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).