FTBFS with gcc7

Bug #1735158 reported by Andreas Hasenack
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
iproute2 (Ubuntu)
Fix Released
Undecided
Andreas Hasenack
Nominated for Artful by Andreas Hasenack
Artful
Fix Released
Undecided
Unassigned

Bug Description

tc
    CC tc_core.o
tc_core.c: In function ‘tc_calc_size_table’:
tc_core.c:190:29: error: ‘UINT16_MAX’ undeclared (first use in this function); did you mean ‘__INT16_MAX__’?
   if ((sz >> s->size_log) > UINT16_MAX) {
                             ^~~~~~~~~~
                             __INT16_MAX__
tc_core.c:190:29: note: each undeclared identifier is reported only once for each function it appears in
../Config:40: recipe for target 'tc_core.o' failed
make[3]: *** [tc_core.o] Error 1

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

commit ae717baf15fb4d30749ada3948d9445892bac239
Author: Khem Raj <email address hidden>
Date: Sat May 20 14:28:46 2017 -0700

    tc: include stdint.h explicitly for UINT16_MAX

    Fixes
    | tc_core.c:190:29: error: 'UINT16_MAX' undeclared (first use in this function); did you mean '__INT16_MAX__'?
    | if ((sz >> s->size_log) > UINT16_MAX) {
    | ^~~~~~~~~~

    Signed-off-by: Khem Raj <email address hidden>

diff --git a/tc/tc_core.c b/tc/tc_core.c
index 7bbe0d73..821b741b 100644
--- a/tc/tc_core.c
+++ b/tc/tc_core.c
@@ -12,6 +12,7 @@

 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <unistd.h>
 #include <syslog.h>
 #include <fcntl.h>

Changed in iproute2 (Ubuntu):
assignee: nobody → Andreas Hasenack (ahasenack)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iproute2 - 4.9.0-1ubuntu3

---------------
iproute2 (4.9.0-1ubuntu3) bionic; urgency=medium

  * Fix ip maddr show (LP: #1732032):
    - d/p/1003-ip-maddr-fix-igmp-parsing.patch: fix igmp parsing when iface is
      long
    - d/p/1004-ip-maddr-avoid-uninitialized-data.patch: avoid accessing
      uninitialized data
    - d/p/1005-ip-maddr-fix-filtering-by-device.patch: fix filtering
      by device
  * d/p/1006-fix-undeclared-UINT16_MAX.patch: FTBFS: tc: include stdint.h
    explicitly for UINT16_MAX (LP: #1735158)

 -- Andreas Hasenack <email address hidden> Wed, 29 Nov 2017 09:35:46 -0200

Changed in iproute2 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Robie Basak (racb) wrote :

Does this fix need to be sent to Debian?

Changed in iproute2 (Ubuntu Artful):
status: New → Fix Committed
tags: added: verification-needed verification-needed-artful
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Andreas, or anyone else affected,

Accepted iproute2 into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/iproute2/4.9.0-1ubuntu2.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I checked debian sid, and the build succeeds there. The code is using UINT16_MAX in the same place (tc/tc_core.c), and that file is not including stdint.h

UINT16_MAX is only used in tc/tc_core.c:
$ grep UINT16_MAX -r .
./tc/tc_core.c: if ((sz >> s->size_log) > UINT16_MAX) {
./.pc/ftbfs.diff/tc/tc_core.c: if ((sz >> s->size_log) > UINT16_MAX) {

UINT16_MAX is only defined in stdint.h:
$ grep UINT16_MAX -r /usr/include
/usr/include/stdint.h:# define UINT16_MAX (65535)

There are no patches defining UINT16_MAX or including stdint.h in debian/patches.

Build flags (dpkg-buildflags) in ubuntu and sid are the same.

Without digging deeper, I don't know why the build succeeds there.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The packages built, so obviously the FTBFS fix is applied. Marking as verified.

tags: added: verification-done-artful
removed: verification-needed-artful
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package iproute2 - 4.9.0-1ubuntu2.1

---------------
iproute2 (4.9.0-1ubuntu2.1) artful; urgency=medium

  * Fix ip maddr show (LP: #1732032):
    - d/p/1003-ip-maddr-fix-igmp-parsing.patch: fix igmp parsing when iface is
      long
    - d/p/1004-ip-maddr-avoid-uninitialized-data.patch: avoid accessing
      uninitialized data
    - d/p/1005-ip-maddr-fix-filtering-by-device.patch: fix filtering
      by device
  * d/p/1006-fix-undeclared-UINT16_MAX.patch: FTBFS: tc: include stdint.h
    explicitly for UINT16_MAX (LP: #1735158)

 -- Andreas Hasenack <email address hidden> Wed, 29 Nov 2017 11:02:27 -0200

Changed in iproute2 (Ubuntu Artful):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for iproute2 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.