mtd-utils build fail

Bug #294428 reported by Aloisio Almeida Jr
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mtd-utils (Ubuntu)
Fix Released
Undecided
Unassigned
Intrepid
Fix Released
Undecided
Unassigned
Jaunty
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: mtd-utils

We didn't find the mtd-utils package in Ubuntu intrepid.

We found this page (https://edge.launchpad.net/ubuntu/intrepid/+source/mtd-utils/20080508-1) that points a build fail.

In the following page we found the error: http://launchpadlibrarian.net/17423696/buildlog_ubuntu-intrepid-i386.mtd-utils_20080508-1_FAILEDTOBUILD.txt.gz

==============
recv_image.c: In function 'main':
recv_image.c:129: error: storage size of 'rq' isn't known
recv_image.c:129: warning: unused variable 'rq'
recv_image.c:311: warning: format '%08lx' expects type 'long unsigned int', but argument 2 has type 'uint32_t'
recv_image.c:311: warning: format '%08lx' expects type 'long unsigned int', but argument 3 has type 'uint32_t'
recv_image.c:311: warning: format '%08lx' expects type 'long unsigned int', but argument 4 has type 'uint32_t'
make[1]: *** [recv_image.o] Error 1
==============

We start to investigate and we found that the struct "struct ip_mreq" is defined in "#include <netinet/in.h>" only if "__USE_MISC or __USE_GNU" are defined.
But we cannot define one of them directly in recv_image.c as the header feature.h undefine them and it just redefine __USE_GNU if _GNU_SOURCE is defined. So we just need to define _GNU_SOURCE symbol.

We found the wrong define" #define _USE_MISC" (note the suffix _ instead of __) that is not being used for anything. So our patch switch the define from _USE_MISC to _GNU_SOURCE

There is a patch in upstream (http://git.infradead.org/mtd-utils.git?a=commitdiff;h=b995f89a81589be8d8a41c374a6df109d0ee12b3) to fix the same error BUT we think it's wrong to define "__USE_*" symbols, as <features.h> would undefine them. It is working just because the define is just before the <netinet/in.h> include.

Both patches have also a change in a printf line, just to remove some copiler warnings.

IS VERY important that mtd-utils package being included in universe repository again, we think many people use these tools. It includes, for instance, the binary mkfs.jffs2, very important to research in embedded systems.

Lauro Venancio <email address hidden> and Aloisio Almeida Jr <email address hidden> are the authors of this research and patch

Revision history for this message
Aloisio Almeida Jr (aloisiojr) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mtd-utils - 20080508-1ubuntu1

---------------
mtd-utils (20080508-1ubuntu1) jaunty; urgency=low

  * debian/control:
    - Added quilt build-dep
  * debian/rules:
    - Added quilt rules
  * debian/patches/series:
    - Created for recv_image_compile.patch
  * debian/patches/recv_image_compile.patch
    - Resolves FTBFS on Ubuntu (LP: #294428)
      Thank you Aloisio Almeida
  * debian/patchs/disable_werror.patch
    - Disables -Werror to avoid FTBFS

 -- Michael Casadevall <email address hidden> Thu, 06 Nov 2008 11:26:52 -0500

Changed in mtd-utils:
status: New → Fix Released
Revision history for this message
Aloisio Almeida Jr (aloisiojr) wrote :

Hey! Tks!

Just a question: Will this package be included in Ubuntu Intrepid repository??

Revision history for this message
Michael Casadevall (mcasadevall) wrote :

Here's the debdiff for proposed, need SRU ack

To Aloiso: Yes, I'm working on that now :-).

Revision history for this message
Luca Falavigna (dktrkranz) wrote :

ACK from motu-sru.

Changed in mtd-utils:
status: New → Confirmed
Revision history for this message
John Dong (jdong) wrote :

I am not a big fan of unplugging the warning lights because they are annoying, but reading the justification that sounds like a reasonable unintrusive fix for Intrepid.

ACK on the Intrepid debdiff from MOTU-SRU, but as an aside I'd suggest finding a solution that doesn't involve disabling -Werror if, by my presumption, upstream added that.

Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in mtd-utils:
status: Confirmed → Fix Committed
Revision history for this message
Michael Casadevall (mcasadevall) wrote :

Installable and appears to work fine.

Revision history for this message
Martin Pitt (pitti) wrote :

binary NEWed, please give it a quick test from intrepid-proposed.

Revision history for this message
Michael Casadevall (mcasadevall) wrote :

Retested, still successful.

Revision history for this message
Aloisio Almeida Jr (aloisiojr) wrote :

Tested. Working fine.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to intrepid-updates.

Changed in mtd-utils:
status: Fix Committed → 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.