From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 18 12:11:09 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 B93D3106564A; Fri, 18 Feb 2011 12:11:09 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 8407C8FC14; Fri, 18 Feb 2011 12:11:09 +0000 (UTC) Received: by pzk32 with SMTP id 32so580358pzk.13 for ; Fri, 18 Feb 2011 04:11:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=7ELHEuIIC+C9hUeKyeyuUJwM2bunDYEgX9sGQGNXL44=; b=jD/xPikzb7tBJvrwk5JLGGM64grdFgy3IiINc4kGWga5m4rbu01SVjQsVucWRGUcRi Bq4qI2/kn0UZNNGn53STBiczDdMgKFbmw9JyK9QWw+DLbCM4MXHvNjg+isHXwo8inZCl gH1IAxFc8URkj7nBBs9Su75tQSIX6AxHsx4XM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=eqJJlbBp+ujDVP0Spf4X6JCPoRlhrUKcYk8EhTg7ghaS7jQ+N2X32vPNYWuosaam1t U+T9WUagmnYzakUeLiTfKo7wSWnTeiSQrhPllcKTpFeUFK3zgKp+716V1mlourBiZqFW rTb4trlhB7InMBZOTdswKH1rpfDU1OAMIJDuw= MIME-Version: 1.0 Received: by 10.142.200.14 with SMTP id x14mr489566wff.380.1298031067774; Fri, 18 Feb 2011 04:11:07 -0800 (PST) Received: by 10.142.217.5 with HTTP; Fri, 18 Feb 2011 04:11:07 -0800 (PST) In-Reply-To: <4D5E5476.5010107@gmail.com> References: <4D553027.5040606@gmail.com> <201102111531.00915.jhb@freebsd.org> <4D5E5476.5010107@gmail.com> Date: Fri, 18 Feb 2011 15:11:07 +0300 Message-ID: From: Sergey Kandaurov To: venom Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org 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: Fri, 18 Feb 2011 12:11:09 -0000 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 =A0 =A02010-03-05 20:24:22.000000000 000= 0 > |+++ //depot/projects/mcelog/tsc.c =A0 =A02010-03-05 21:09:24.000000000 0= 000 > -------------------------- > 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=3Dyes > 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 =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o mcelog.o mcelo= g.c > cc -c -g -Os =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o p4.o p4.c > cc -c -g -Os =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o k8.o k8.c > cc -c -g -Os =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o dmi.o dmi.c > cc -c -g -Os =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o tsc.o tsc.c > cc -c -g -Os =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o core2.o core2.= c > cc -c -g -Os =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o bitfield.o > bitfield.c > cc -c -g -Os =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o intel.o intel.= c > cc -c -g -Os =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o nehalem.o neha= lem.c > cc -c -g -Os =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o dunnington.o > dunnington.c > cc -c -g -Os =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o tulsa.o tulsa.= c > cc -c -g -Os =A0-Wall -Wextra -Wno-missing-field-initializers > -Wno-unused-parameter -Wstrict-prototypes -Wformat-security > -Wmissing-declarations -Wdeclaration-after-statement =A0-o config.o confi= g.c > config.c:135: error: static declaration of 'getline' follows non-static > declaration > /usr/include/stdio.h:370: error: previous declaration of 'getline' was he= re > 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. %%% --=20 wbr, pluknet