From owner-freebsd-ports@FreeBSD.ORG Thu Oct 6 03:29:21 2005 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 84B5B16A41F for ; Thu, 6 Oct 2005 03:29:21 +0000 (GMT) (envelope-from psilotum.ptt2@gmail.com) Received: from qproxy.gmail.com (qproxy.gmail.com [72.14.204.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id F009D43D46 for ; Thu, 6 Oct 2005 03:29:20 +0000 (GMT) (envelope-from psilotum.ptt2@gmail.com) Received: by qproxy.gmail.com with SMTP id o12so281569qba for ; Wed, 05 Oct 2005 20:29:20 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=R8NW9mvqqAittJWqE4AeJh5VmmR4a/4b/qATYoTnq8104M8KAce3SBxNBu+rza7sS7KGt75iJXIeXuDNIkozTu4pchYQW2Vozl2X6mi2urg+MWwYgGIHeOqt0wJRN/VFSSQ8gzboqR+f+xr8Vt8pR8QTU6dZkkegAcsD87Tdjy4= Received: by 10.65.38.11 with SMTP id q11mr719778qbj; Wed, 05 Oct 2005 20:29:20 -0700 (PDT) Received: by 10.65.43.5 with HTTP; Wed, 5 Oct 2005 20:29:20 -0700 (PDT) Message-ID: <42b6915e0510052029s2758d164saf87c88b46572a3f@mail.gmail.com> Date: Thu, 6 Oct 2005 11:29:20 +0800 From: "Lin, Cheng-tao(psilotum)" To: freebsd-ports@freebsd.org In-Reply-To: <42b6915e0510051959x6c6d1ff7g8f9188f818edf46f@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_15463_9222782.1128569360420" References: <432A2E2D.2060000@bellsouth.net> <42b6915e0510051959x6c6d1ff7g8f9188f818edf46f@mail.gmail.com> Cc: xxjack12xx@gmail.com Subject: Re: dcraw does not compile X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Lin, Cheng-tao\(psilotum\)" List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Oct 2005 03:29:21 -0000 ------=_Part_15463_9222782.1128569360420 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline '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 =3D ftell(ifp); - if ((c =3D memmemory (head, 32, "MMMMRawT", 8))) { + if ((c =3D memmem (head, 32, "MMMMRawT", 8))) { strcpy (make, "Phase One"); data_offset =3D c - head; fseek (ifp, data_offset + 8, SEEK_SET); regards, cheng-tao On 10/6/05, Lin, Cheng-tao(psilotum) wrote: > I have the same problem with compiling dcraw and gimp-ufraw, too. > > compile graphics/dcraw log: > =3D=3D=3D> 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 her= e > dcraw.c:179: error: conflicting types for 'memmem' > /usr/include/string.h:65: error: previous declaration of 'memmem' was her= e > *** 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@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 wrote: > > That's odd. Could you post the output of `uname -a`? I'm using FreeBSD > > 5.4-STABLE and it compiles fine: > > > > =3D=3D=3D> Building for dcraw-1.236 > > cc -o dcraw -O -pipe -march=3Dpentium4 -march=3Dpentium4 > > -I/usr/local/include dcraw.c -L/usr/local/lib -lm -ljpeg > > =3D=3D=3D> Installing for dcraw-1.236 > > =3D=3D=3D> Generating temporary packing list > > =3D=3D=3D> 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 > > =3D=3D=3D> Compressing manual pages for dcraw-1.236 > > =3D=3D=3D> Registering installation for dcraw-1.236 > > root@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 > > >=3D=3D=3D> Building for dcraw-1.236 > > >cc -o dcraw -O2 -fno-strict-aliasing -pipe -march=3Dprescott -march=3D= 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# > > >_______________________________________________ > ------=_Part_15463_9222782.1128569360420 Content-Type: text/x-patch; name=dcraw.diff; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dcraw.diff" --- 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); ------=_Part_15463_9222782.1128569360420--