dcraw does not compile

Lin, Cheng-tao(psilotum) psilotum.ptt2 at gmail.com
Wed Oct 5 20:29:21 PDT 2005


'Cause "memmem" confliction between /usr/include/string.h and dcraw.c
I just changed the "memmem" to "memmemory" (patch is as following and
in attachment, but I really do not know if it is appropriate to do
this...)

cvsweb:
http://www.freebsd.org/cgi/cvsweb.cgi/src/include/string.h

--- dcraw.c     Thu Oct  6 11:06:37 2005
+++ dcraw.orig  Thu Oct  6 11:10:30 2005
@@ -174,7 +174,7 @@
  */

 #ifndef __GLIBC__
-char *memmemory (char *haystack, size_t haystacklen,
+char *memmem (char *haystack, size_t haystacklen,
              char *needle, size_t needlelen)
 {
   char *c;
@@ -2932,7 +2932,7 @@
   fread (head, 1, 32, ifp);
   fseek (ifp, 0, SEEK_END);
   fsize = ftell(ifp);
-  if ((c = memmemory (head, 32, "MMMMRawT", 8))) {
+  if ((c = memmem (head, 32, "MMMMRawT", 8))) {
     strcpy (make, "Phase One");
     data_offset = c - head;
     fseek (ifp, data_offset + 8, SEEK_SET);

regards,

cheng-tao

On 10/6/05, Lin, Cheng-tao(psilotum) <psilotum.ptt2 at gmail.com> wrote:
> I have the same problem with compiling dcraw and gimp-ufraw,  too.
>
> compile graphics/dcraw log:
> ===>  Building for dcraw-1.236
> cc -o dcraw -O2 -fno-strict-aliasing -pipe   -I/usr/local/include
> dcraw.c -L/usr/local/lib -lm -ljpeg
> dcraw.c:179: error: conflicting types for 'memmem'
here is the problem
> /usr/include/string.h:65: error: previous declaration of 'memmem' was here
> dcraw.c:179: error: conflicting types for 'memmem'
> /usr/include/string.h:65: error: previous declaration of 'memmem' was here
> *** Error code 1
>
> Stop in /usr/ports/graphics/dcraw/work/dcraw-1.236.
> *** Error code 1
>
> Stop in /usr/ports/graphics/dcraw.
>
> uname -v is:
>
> FreeBSD 7.0-CURRENT #0: Sun Oct  2 01:02:10 CST 2005
> root at litsea.psilotum.twbbs.org:/usr/obj/usr/src/sys/LITSEA
>
> my string.h revision is 1.23:
> $FreeBSD: src/include/string.h,v 1.23 2005/08/25 19:46:38 andre Exp $
>
> regards,
>
> cheng-tao
>
> On 9/16/05, bsdlogical <kwlogical at bellsouth.net> wrote:
> > That's odd. Could you post the output of `uname -a`? I'm using FreeBSD
> > 5.4-STABLE and it compiles fine:
> >
> > ===>  Building for dcraw-1.236
> > cc -o dcraw -O -pipe -march=pentium4 -march=pentium4
> > -I/usr/local/include dcraw.c -L/usr/local/lib -lm -ljpeg
> > ===>  Installing for dcraw-1.236
> > ===>   Generating temporary packing list
> > ===>  Checking if graphics/dcraw already installed
> > install  -s -o root -g wheel -m 555
> > /usr/ports/graphics/dcraw/work/dcraw-1.236/dcraw /usr/local/bin
> > install  -o root -g wheel -m 444
> > /usr/ports/graphics/dcraw/work/dcraw-1.236/dcraw.1 /usr/local/man/man1
> > ===>   Compressing manual pages for dcraw-1.236
> > ===>   Registering installation for dcraw-1.236
> > root at argon#
> >
> >  * $FreeBSD: src/include/string.h,v 1.20 2004/07/23 02:20:05 tjr Exp $
> >
> > bsdlogical
> >
> > Jack L. wrote:
> >
> > >I get this when I try to compile dcraw
> > >
> > >musirc# make install
> > >===> Building for dcraw-1.236
> > >cc -o dcraw -O2 -fno-strict-aliasing -pipe -march=prescott -march=prescott
> > >-I/usr/local/include dcraw.c -L/usr/local/lib -lm -ljpeg
> > >dcraw.c:179: error: conflicting types for 'memmem'
> > >/usr/include/string.h:65: error: previous declaration of 'memmem' was here
> > >dcraw.c:179: error: conflicting types for 'memmem'
> > >/usr/include/string.h:65: error: previous declaration of 'memmem' was here
> > >*** Error code 1
> > >
> > >Stop in /usr/ports/graphics/dcraw/work/dcraw-1.236.
> > >*** Error code 1
> > >
> > >Stop in /usr/ports/graphics/dcraw.
> > >musirc#
> > >_______________________________________________
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dcraw.diff
Type: text/x-patch
Size: 595 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20051006/61d6f1c3/dcraw.bin


More information about the freebsd-ports mailing list