From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 22 16:20:08 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 376B310656B0 for ; Tue, 22 Feb 2011 16:20:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5B8908FC23 for ; Tue, 22 Feb 2011 16:20:07 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 1639446B03; Tue, 22 Feb 2011 11:20:07 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.10]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1B92F8A01D; Tue, 22 Feb 2011 11:20:06 -0500 (EST) From: John Baldwin To: Sergey Kandaurov Date: Tue, 22 Feb 2011 11:06:57 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) References: <4D553027.5040606@gmail.com> <4D5E5476.5010107@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102221106.57115.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 22 Feb 2011 11:20:06 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=0.5 required=4.2 tests=BAYES_00,MAY_BE_FORGED, RDNS_DYNAMIC autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, venom Subject: Re: problem with build mcelog X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2011 16:20:08 -0000 On Friday, February 18, 2011 7:11:07 am Sergey Kandaurov wrote: > On 18 February 2011 14:13, venom wrote: > > On 02/11/2011 11:31 PM, John Baldwin wrote: > >> > >> On Friday, February 11, 2011 7:48:39 am venom wrote: > >>> > >>> Hello. > >>> > >>> i am trying build mcelog > >>> > >>> > >>> FreeBSD XXXX 8.1-RELEASE-p2 FreeBSD 8.1-RELEASE-p2 #0: Fri Jan 14 > >>> 04:15:56 > >>> UTC 2011 root@freebsd:/usr/obj/usr/src/sys/GENERIC amd64 > >>> > >>> > >>> # fetch > >>> http://ftp2.pl.freebsd.org/pub/FreeBSD/distfiles/mcelog-1.0pre2.tar.gz > >>> # tar -xf mcelog-1.0pre2.tar.gz > >>> # cd mcelog-1.0pre2 > >>> # fetch http://people.freebsd.org/~jhb/mcelog/mcelog.patch > >>> # fetch http://people.freebsd.org/~jhb/mcelog/memstream.c > >> > >> Oops, I just updated mcelog.patch and it should work fine now. > >> > > > > |--- //depot/vendor/mcelog/tsc.c 2010-03-05 20:24:22.000000000 0000 > > |+++ //depot/projects/mcelog/tsc.c 2010-03-05 21:09:24.000000000 0000 > > -------------------------- > > Patching file tsc.c using Plan A... > > Hunk #1 succeeded at 15. > > Hunk #2 succeeded at 52. > > Hunk #3 succeeded at 75. > > Hunk #4 succeeded at 156. > > done > > 12:12:46 ~/temp/MCE/mcelog-1.0pre2 > > # gmake FREEBSD=yes > > Makefile:92: .depend: No such file or directory > > cc -MM -I. p4.c k8.c mcelog.c dmi.c tsc.c core2.c bitfield.c intel.c > > nehalem.c dunnington.c tulsa.c config.c memutil.c msg.c eventloop.c > > leaky-bucket.c memdb.c server.c client.c cache.c rbtree.c memstream.c > > > .depend.X && mv .depend.X .depend > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o mcelog.o mcelog.c > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o p4.o p4.c > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o k8.o k8.c > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o dmi.o dmi.c > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o tsc.o tsc.c > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o core2.o core2.c > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o bitfield.o > > bitfield.c > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o intel.o intel.c > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o nehalem.o nehalem.c > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o dunnington.o > > dunnington.c > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o tulsa.o tulsa.c > > cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers > > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > > -Wmissing-declarations -Wdeclaration-after-statement -o config.o config.c > > config.c:135: error: static declaration of 'getline' follows non-static > > declaration > > /usr/include/stdio.h:370: error: previous declaration of 'getline' was here > > gmake: *** [config.o] Error 1 > > > > A local getline() needs the FreeBSD version check. > > %%% > --- config.c.olg 2011-02-18 14:57:52.000000000 +0300 > +++ config.c 2011-02-18 15:07:59.000000000 +0300 > @@ -18,6 +18,9 @@ > Author: Andi Kleen > */ > #define _GNU_SOURCE 1 > +#ifdef __FreeBSD__ > +# include > +#endif > #include > #include > #include > @@ -126,7 +129,7 @@ > return s; > } > > -#ifdef __FreeBSD__ > +#if (defined __FreeBSD__) && (__FreeBSD_version < 800067) > /* > * Newer versions do have getline(), so this should use a version test > * at some point. > %%% Thanks, I've updated mcelog.patch. -- John Baldwin