FTBFS on ppc64el with error: ‘cnt’ may be used uninitialized

Bug #2006505 reported by Nick Rosbrook
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mmc-utils (Debian)
Fix Released
Unknown
mmc-utils (Ubuntu)
Fix Released
Undecided
Sergio Durigan Junior

Bug Description

Build log: https://launchpadlibrarian.net/648312622/buildlog_ubuntu-lunar-ppc64el.mmc-utils_0+git20220624.d7b343fd-1_BUILDING.txt.gz

Relevant part is this:

In file included from /usr/include/endian.h:35,
                 from /usr/include/powerpc64le-linux-gnu/sys/types.h:176,
                 from /usr/include/stdlib.h:395,
                 from mmc_cmds.c:21:
In function ‘__bswap_32’,
    inlined from ‘do_rpmb_write_block’ at mmc_cmds.c:2462:27:
/usr/include/powerpc64le-linux-gnu/bits/byteswap.h:52:10: error: ‘cnt’ may be used uninitialized [-Werror=maybe-uninitialized]
   52 | return __builtin_bswap32 (__bsx);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
mmc_cmds.c: In function ‘do_rpmb_write_block’:
mmc_cmds.c:2439:22: note: ‘cnt’ was declared here
 2439 | unsigned int cnt;
      | ^~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:36: mmc_cmds.o] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
dh_auto_build: error: make -j4 "INSTALL=install --strip-program=true" returned exit code 2
make: *** [debian/rules:8: binary-arch] Error 25
dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2
--------------------------------------------------------------------------------

There is already an upstream fix[1] for this, but Debian has not packaged a new version in a bit.

[1] https://git.kernel.org/pub/scm/utils/mmc/mmc-utils.git/commit/?id=5086e7c0de4d0094f8674368a88d931b27589d53

Revision history for this message
Nick Rosbrook (enr0n) wrote :
Revision history for this message
Nick Rosbrook (enr0n) wrote :
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Coincidentally, I was working on this bug at the same time. Thanks for the report and the patch. I will sponsor it.

Changed in mmc-utils (Ubuntu):
assignee: nobody → Sergio Durigan Junior (sergiodj)
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Uploaded:

$ dput mmc-utils_0+git20220624.d7b343fd-1ubuntu1_source.changes
Trying to upload package to ubuntu
Checking signature on .changes
gpg: /home/sergio/work/mmc-utils/mmc-utils_0+git20220624.d7b343fd-1ubuntu1_source.changes: Valid signature from 106DA1C8C3CBBF14
Checking signature on .dsc
gpg: /home/sergio/work/mmc-utils/mmc-utils_0+git20220624.d7b343fd-1ubuntu1.dsc: Valid signature from 106DA1C8C3CBBF14
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading mmc-utils_0+git20220624.d7b343fd-1ubuntu1.dsc: done.
  Uploading mmc-utils_0+git20220624.d7b343fd-1ubuntu1.debian.tar.xz: done.
  Uploading mmc-utils_0+git20220624.d7b343fd-1ubuntu1_source.buildinfo: done.
  Uploading mmc-utils_0+git20220624.d7b343fd-1ubuntu1_source.changes: done.
Successfully uploaded packages.

Thanks.

tags: added: ftbfs
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "mmc-utils_0+git20220624.d7b343fd-1ubuntu1.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mmc-utils - 0+git20220624.d7b343fd-1ubuntu1

---------------
mmc-utils (0+git20220624.d7b343fd-1ubuntu1) lunar; urgency=medium

  * d/p/0003-fix-warning-on-uninitialized-cnt.patch: Cherry-pick upstream
    patch to fix FTBFS on ppc64el (LP: #2006505).

 -- Nick Rosbrook <email address hidden> Tue, 07 Feb 2023 15:14:31 -0500

Changed in mmc-utils (Ubuntu):
status: New → Fix Released
Revision history for this message
Nick Rosbrook (enr0n) wrote :

Thanks, Sergio!

Changed in mmc-utils (Debian):
status: Unknown → New
Changed in mmc-utils (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.