[Bug 294428] [NEW] mtd-utils build fail
Launchpad Bug Tracker
294428 at bugs.launchpad.net
Thu Nov 6 23:35:22 GMT 2008
You have been subscribed to a public bug by Michael Casadevall (sonicmctails):
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 <lauro.venancio at openbossa.org> and Aloisio Almeida Jr
<aloisio.almeida at openbossa.org> are the authors of this research and
patch
** Affects: mtd-utils (Ubuntu)
Importance: Undecided
Status: Fix Released
** Affects: mtd-utils (Ubuntu Intrepid)
Importance: Undecided
Status: Confirmed
** Affects: mtd-utils (Ubuntu Jaunty)
Importance: Undecided
Status: Fix Released
--
mtd-utils build fail
https://bugs.edge.launchpad.net/bugs/294428
You received this bug notification because you are a member of Ubuntu Package Archive Administrators, which is a direct subscriber.
More information about the ubuntu-archive
mailing list