public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/31288] New: 5.0: build fails with gcc 14x
@ 2024-01-24  8:24 kloczko.tomasz at gmail dot com
  2024-01-24 15:40 ` [Bug runtime/31288] " wcohen at redhat dot com
  2024-01-25 19:35 ` fche at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: kloczko.tomasz at gmail dot com @ 2024-01-24  8:24 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=31288

            Bug ID: 31288
           Summary: 5.0: build fails with gcc 14x
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: kloczko.tomasz at gmail dot com
  Target Milestone: ---

[tkloczko@pers-jacek systemtap-5.0]$ make V=1 -k
/bin/sh ./git_version.sh -k -s . -o git_version.h
git_version.sh: Not a git repo, keeping existing git_version.h
make  all-recursive
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0'
Making all in .
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0'
/usr/bin/g++ -DHAVE_CONFIG_H -I.  -DBINDIR='"/usr/bin"' -DSYSCONFDIR='"/etc"'
-DPKGDATADIR='"/usr/share/systemtap"' -DPKGLIBDIR='"/usr/libexec/systemtap"'
-DLOCALEDIR='"/usr/share/locale"' -DDOCDIR='"/usr/share/doc/systemtap"'
-DPYEXECDIR='""' -DPY3EXECDIR='"/usr/lib/python3.8/site-packages"' -I./includes
-I./includes/sys -DSTAP_SDT_V2 -D_REENTRANT -I/usr/include/nss3
-I/usr/include/nspr4  -Wall -Wextra -Werror -faligned-new -D_REENTRANT
-I/usr/include/nss3 -I/usr/include/nspr4  -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g
-grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections
-ffunction-sections -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall
-Werror=format-security -c -o stap-bpf-translate.o `test -f 'bpf-translate.cxx'
|| echo './'`bpf-translate.cxx
bpf-translate.cxx: In function ‘bpf::BPF_Section*
bpf::output_probe(BPF_Output&, program&, const std::string&, unsigned int)’:
bpf-translate.cxx:5044:39: error: ‘void* calloc(size_t, size_t)’ sizes
specified with ‘sizeof’ in the earlier argument and not in the later argument
[-Werror=calloc-transposed-args]
 5044 |   bpf_insn *buf = (bpf_insn*) calloc (sizeof(bpf_insn), ninsns);
      |                                       ^~~~~~~~~~~~~~~~
bpf-translate.cxx:5044:39: note: earlier argument should specify number of
elements, later size of each element
bpf-translate.cxx:5046:41: error: ‘void* calloc(size_t, size_t)’ sizes
specified with ‘sizeof’ in the earlier argument and not in the later argument
[-Werror=calloc-transposed-args]
 5046 |   Elf64_Rel *rel = (Elf64_Rel*) calloc (sizeof(Elf64_Rel), nreloc);
      |                                         ^~~~~~~~~~~~~~~~~
bpf-translate.cxx:5046:41: note: earlier argument should specify number of
elements, later size of each element
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:1869: stap-bpf-translate.o] Error 1
/usr/bin/gcc -DHAVE_CONFIG_H -I.  -DBINDIR='"/usr/bin"' -DSYSCONFDIR='"/etc"'
-DPKGDATADIR='"/usr/share/systemtap"' -DPKGLIBDIR='"/usr/libexec/systemtap"'
-DLOCALEDIR='"/usr/share/locale"' -DDOCDIR='"/usr/share/doc/systemtap"'
-DPYEXECDIR='""' -DPY3EXECDIR='"/usr/lib/python3.8/site-packages"' -I./includes
-I./includes/sys  -D_GNU_SOURCE -fexceptions -Wall -Wextra -Werror -Wunused
-Wformat=2 -W  -I/usr/include/libxml2 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -O2 -g
-grecord-gcc-switches -pipe -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdata-sections
-ffunction-sections -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -flto=auto
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall
-Werror=format-security -c -o stapvirt-stapvirt.o `test -f 'stapvirt.c' || echo
'./'`stapvirt.c
stapvirt.c: In function ‘getActiveDomains’:
stapvirt.c:122:33: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
argument and not in the later argument [-Werror=calloc-transposed-args]
  122 |     *ids = (int*) calloc(sizeof(int), idsn);
      |                                 ^~~
stapvirt.c:122:33: note: earlier argument should specify number of elements,
later size of each element
stapvirt.c: In function ‘getInactiveDomains’:
stapvirt.c:148:37: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
argument and not in the later argument [-Werror=calloc-transposed-args]
  148 |     *names = (char**) calloc(sizeof(char*), namesn);
      |                                     ^~~~
stapvirt.c:148:37: note: earlier argument should specify number of elements,
later size of each element
stapvirt.c: In function ‘getAllDomains’:
stapvirt.c:191:46: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
argument and not in the later argument [-Werror=calloc-transposed-args]
  191 |     *domains = (virDomainPtr*) calloc(sizeof(virDomainPtr),
idsn+namesn);
      |                                              ^~~~~~~~~~~~
stapvirt.c:191:46: note: earlier argument should specify number of elements,
later size of each element
cc1: all warnings being treated as errors
make[2]: *** [Makefile:1209: stapvirt-stapvirt.o] Error 1
make[2]: Target 'all-am' not remade because of errors.
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0'
Making all in java
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/java'
make  all-am
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/java'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/java'
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/java'
Making all in python
make[2]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/python'
(cd .; CFLAGS="-I./../includes
-I/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/python/../includes/sys"
/usr/bin/python3 setup.py build \
         --build-base
/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/python/py3build \
         --verbose)
running build
running build_py
running build_ext
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/python'
Making all in stapdyn
make[2]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/stapdyn'
make -C .. git_version.stamp
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0'
/bin/sh ./git_version.sh -k -s . -o git_version.h
git_version.sh: Not a git repo, keeping existing git_version.h
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0'
make  all-am
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/stapdyn'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/stapdyn'
make[2]: Leaving directory
'/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/stapdyn'
Making all in staprun
make[2]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/staprun'
make -C .. git_version.stamp
make[3]: Entering directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0'
/bin/sh ./git_version.sh -k -s . -o git_version.h
git_version.sh: Not a git repo, keeping existing git_version.h
make[3]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/systemtap-5.0'
make  all-am
make[3]: Entering directory
'/home/tkloczko/rpmbuild/BUILD/systemtap-5.0/staprun'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I..  -D_GNU_SOURCE -I./../includes
-I./../includes/sys -DBINDIR='"/usr/bin"' -DSYSCONFDIR='"/etc"'
-DPKGDATADIR='"/usr/share/systemtap"' -DPKGLIBDIR='"/usr/libexec/systemtap"'
-DLOCALEDIR='"/usr/share/locale"'  -Wall -Wextra -Werror -Wunused -W -Wformat=2
 -DSINGLE_THREADED  -I/usr/include/nss3 -I/usr/include/nspr4 -m64
-mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection
-fcf-protection -O2 -g -grecord-gcc-switches -pipe
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer -fdata-sections -ffunction-sections
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-flto=auto -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
-Wall -Werror=format-security -c -o staprun-staprun.o `test -f 'staprun.c' ||
echo './'`staprun.c
staprun.c: In function ‘main’:
staprun.c:550:50: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
argument and not in the later argument [-Werror=calloc-transposed-args]
  550 |                 char ** new_argv = calloc(sizeof(char *),argc+2);
      |                                                  ^~~~
staprun.c:550:50: note: earlier argument should specify number of elements,
later size of each element
cc1: all warnings being treated as errors

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug runtime/31288] 5.0: build fails with gcc 14x
  2024-01-24  8:24 [Bug runtime/31288] New: 5.0: build fails with gcc 14x kloczko.tomasz at gmail dot com
@ 2024-01-24 15:40 ` wcohen at redhat dot com
  2024-01-25 19:35 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2024-01-24 15:40 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=31288

William Cohen <wcohen at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |wcohen at redhat dot com
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
The transposed calloc arguments were addressed by the recent git commits in
upstream systemtap:

commit 6c0b92b340db23ccc49e18007d4ecbdef3306bd6
Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Thu Jan 18 16:37:39 2024 -0500

    stapvirt.c: More gcc-14 -Werror=calloc-transposed-args compatibility


commit 52596f023652114642faba5726c99488529029ce
Author: Sergei Trofimovich <slyich@gmail.com>
Date:   Thu Dec 21 10:00:06 2023 +0000

    staprun: fix build against upcoming `gcc-14`
(`-Werror=calloc-transposed-args`)

    `gcc-14` added a new `-Wcalloc-transposed-args` warning recently. It
    detected minor infelicity in `calloc()` API usage in `systemtap`:

        staprun.c: In function 'main':
        staprun.c:550:50: error: 'calloc' sizes specified with 'sizeof' in the
earlier argument and not in the later argument [-Werror=calloc-transposed-args]
          550 |                 char ** new_argv = calloc(sizeof(char
*),argc+2);
              |                                                  ^~~~

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug runtime/31288] 5.0: build fails with gcc 14x
  2024-01-24  8:24 [Bug runtime/31288] New: 5.0: build fails with gcc 14x kloczko.tomasz at gmail dot com
  2024-01-24 15:40 ` [Bug runtime/31288] " wcohen at redhat dot com
@ 2024-01-25 19:35 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2024-01-25 19:35 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=31288

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED
                 CC|                            |fche at redhat dot com

--- Comment #2 from Frank Ch. Eigler <fche at redhat dot com> ---
A pile of code 'corrections' for -Wmissing-prototypes is now
merged via:

commit 2604d135069f74cf5a223631cf92c9d0d818ef9c (HEAD -> master, origin/master,
origin/HEAD)
gpg: Signature made Thu 25 Jan 2024 02:34:51 PM EST
gpg:                using RSA key 4DD136490411C0A42B28844F258B6EFA0F209D24
gpg: Good signature from "Frank Ch. Eigler <fche@elastic.org>" [ultimate]
Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Thu Jan 25 14:28:38 2024 -0500

    PR31288: build with gcc14

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-25 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-24  8:24 [Bug runtime/31288] New: 5.0: build fails with gcc 14x kloczko.tomasz at gmail dot com
2024-01-24 15:40 ` [Bug runtime/31288] " wcohen at redhat dot com
2024-01-25 19:35 ` fche at redhat dot com

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 read-only IMAP folder(s) and NNTP newsgroup(s).