Your message dated Wed, 29 May 2024 21:19:07 +0000
with message-id <e1scqhp-000s0h...@fasolo.debian.org>
and subject line Bug#1069909: fixed in dcraw 9.28-5.1
has caused the Debian Bug report #1069909,
regarding dcraw: FTBFS due to conflicting memmem prototype
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1069909: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1069909
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: dcraw
Version: 9.28-5
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch

Hi Filip,

In Ubuntu, dcraw was failing to build because of a local implementation of
memmem() whose prototype conflicts with the glibc prototype:

[...]
gcc -DPACKAGE_NAME=\"dcraw\" -DPACKAGE_TARNAME=\"dcraw\" 
-DPACKAGE_VERSION=\"9.28\" -DPACKAGE_STRING=\"dcraw\ 9.28\" 
-DPACKAGE_BUGREPORT=\"hr...@physics.muni.cz\" -DPACKAGE_URL=\"\" 
-DPACKAGE=\"dcraw\" -DVERSION=\"9.28\" -DHAVE_LIBM=1 -DHAVE_STDIO_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 
-DSTDC_HEADERS=1 -DHAVE_JPEGLIB_H=1 -DHAVE_LIBJPEG=1 -DHAVE_LCMS2_H=1 
-DHAVE_LIBLCMS2=1 -I.   -Wdate-time -D_FORTIFY_SOURCE=3  -g -O2 
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer 
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects 
-fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -fcf-protection 
-fdebug-prefix-map=/<<PKGBUILDDIR>>=/usr/src/dcraw-9.28-5build1 -O4 -c -o 
parse.o parse.c
[...]
parse.c:1216:7: error: conflicting types for ‘memmem’; have ‘char *(char *, 
size_t,  char *, size_t)’ {aka ‘char *(char *, long unsigned int,  char *, long 
unsigned int)’}
 1216 | char *memmem (char *haystack, size_t haystacklen,
      |       ^~~~~~
In file included from parse.c:13:
/usr/include/string.h:389:14: note: previous declaration of ‘memmem’ with type 
‘void *(const void *, size_t,  const void *, size_t)’ {aka ‘void *(const void 
*, long unsigned int,  const void *, long unsigned int)’}
  389 | extern void *memmem (const void *__haystack, size_t __haystacklen,
      |              ^~~~~~
[...]

  (https://launchpad.net/ubuntu/+source/dcraw/9.28-5build1/+build/28000832)

This is not currently a build failure in Debian, but that is strictly a
question of compiler behavior, and this may start to FTBFS in Debian at some
later point.

And anyway, there's no reason to reimplement memmem() here, it's probably
less performant than the version provided by glibc.

We have applied the attached patch in Ubuntu to fix the build failure.  I
think it would be a good idea to apply it in Debian as well.

Thanks for considering,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru dcraw-9.28/debian/patches/remove-duplicate-memmem.patch 
dcraw-9.28/debian/patches/remove-duplicate-memmem.patch
--- dcraw-9.28/debian/patches/remove-duplicate-memmem.patch     1969-12-31 
16:00:00.000000000 -0800
+++ dcraw-9.28/debian/patches/remove-duplicate-memmem.patch     2024-04-09 
16:49:27.000000000 -0700
@@ -0,0 +1,28 @@
+Description: don't reimplement memmem()
+ memmem() is implemented in glibc, don't have a redundant duplicate
+ implementation with a different prototype.
+Author: Steve Langasek <steve.langa...@canonical.com>
+Last-Update: 2024-04-09
+Forwarded: no
+
+Index: dcraw-9.28/parse.c
+===================================================================
+--- dcraw-9.28.orig/parse.c
++++ dcraw-9.28/parse.c
+@@ -1213,16 +1213,6 @@
+   }
+ }
+ 
+-char *memmem (char *haystack, size_t haystacklen,
+-              char *needle, size_t needlelen)
+-{
+-  char *c;
+-  for (c = haystack; c <= haystack + haystacklen - needlelen; c++)
+-    if (!memcmp (c, needle, needlelen))
+-      return c;
+-  return NULL;
+-}
+-
+ /*
+    Identify which camera created this file, and set global variables
+    accordingly.        Return nonzero if the file cannot be decoded.
diff -Nru dcraw-9.28/debian/patches/series dcraw-9.28/debian/patches/series
--- dcraw-9.28/debian/patches/series    2024-03-26 02:42:04.000000000 -0700
+++ dcraw-9.28/debian/patches/series    2024-04-09 16:48:07.000000000 -0700
@@ -8,3 +8,4 @@
 iowrap.diff
 0009-missing_headers.patch
 0010-Fuji-headers.patch
+remove-duplicate-memmem.patch

--- End Message ---
--- Begin Message ---
Source: dcraw
Source-Version: 9.28-5.1
Done: Joao Eriberto Mota Filho <eribe...@debian.org>

We believe that the bug you reported is fixed in the latest version of
dcraw, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1069...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joao Eriberto Mota Filho <eribe...@debian.org> (supplier of updated dcraw 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sat, 25 May 2024 12:18:40 -0300
Source: dcraw
Architecture: source
Version: 9.28-5.1
Distribution: unstable
Urgency: medium
Maintainer: Debian Astronomy Team 
<debian-astro-maintain...@lists.alioth.debian.org>
Changed-By: Joao Eriberto Mota Filho <eribe...@debian.org>
Closes: 1069909
Changes:
 dcraw (9.28-5.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * debian/patches/remove-duplicate-memmem.patch: created to avoid a FTBFS
     caused by a redundant duplicate implementation of memmem(). Thanks to
     Steve Langasek <steve.langa...@canonical.com>. (Closes: #1069909)
Checksums-Sha1:
 4f3809a823955e5977a46259ff0d2f2f83f1065b 1984 dcraw_9.28-5.1.dsc
 3b3cae143e258ac9769d3807ef8296dfed3b1cbf 6867192 dcraw_9.28-5.1.debian.tar.xz
 afd65266f8fab34e89a642c7f683dae85cbbdcbe 6312 dcraw_9.28-5.1_source.buildinfo
Checksums-Sha256:
 9f4c334ae7bdf84c59f4cfda1c4e814603a45ed0c59a33ca98aac367d18882c1 1984 
dcraw_9.28-5.1.dsc
 8973a1433bebc046993754987b7e152d4ac36375fc9de772fa77ea50fefa1183 6867192 
dcraw_9.28-5.1.debian.tar.xz
 4746a9c3f9c5e6129904603dea6c9c91fee862c1bdc183fcfe7e091b33a78f9b 6312 
dcraw_9.28-5.1_source.buildinfo
Files:
 148b8fe3ee47c3bc8d196ee699a998ec 1984 graphics optional dcraw_9.28-5.1.dsc
 94a4d31f05dc4292afaffa01ba878e66 6867192 graphics optional 
dcraw_9.28-5.1.debian.tar.xz
 abd5649d20812e88755a1f18c4080cd2 6312 graphics optional 
dcraw_9.28-5.1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEENX3LDuyVoBrrofDS3mO5xwTr6e8FAmZSBEYACgkQ3mO5xwTr
6e83PxAAq0s/hnGVssPKjiaSeCsxMJ/kB+S8ThPT71v16niebKpUZTG3kQoiPPNB
TgQ89/ELQqAgeXxBh5R7KMmpz4lfaT/gd6PjffS9SeTyizMLOCbo+RcxLtLqwgoh
DVK8weVS59oaJCuYSqiMZh5I1vtSPqVR2XJCc8RjouOP1yay3Dof4/wBENFBab1A
YuqA8MRJFkAwAXozWLiA5w0cHQmE2wgwBECbV13CQNCC1UbA/03R74ZLY3xBRRiz
gcXu1QLo9zXO0YNcfo5iPXEu0ZdxB9thiYV21o3Gn/frTKlPowkaV+qODOc4aZHC
fS/WQIIRC1ZddJ9bEagTx1eSxf+O/x9GOHiRMX+n+Toy79G+0H6J9zTVjcAqb9+e
50OVwu6qTQkGoAX7HpDjucL7QDtnNiOujbBoY/0C8/wZgqepXmC3CClEU45iF5wB
oUFIRTmCXcauhkJfTqT0IEaGw1vOpBBqbs8QgPOlEEqnmXJdZw6SpyL8c43v137d
uego6SKowS/XZsb29Z8h1Yek1xIsMS0nMWlxsSJ7besSsd/l2ufyL3t5jAVgr5jp
SmmB28JuUkSpNXCaaaf/63OAA5SgGkVHwTE71d3SWCuHAKLmPf/WXLqgVrvPQfFR
A/CXBl6RntbLbGNsFIYZ5N22SQP19ZSqymzxNCAI0BwNbr/yrtg=
=O/4o
-----END PGP SIGNATURE-----

Attachment: pgp1XOIWQJc_1.pgp
Description: PGP signature


--- End Message ---

Reply via email to