From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 26 14:41:19 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 985C4106566C; Tue, 26 Apr 2011 14:41:19 +0000 (UTC) (envelope-from samflanker@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id E7F108FC12; Tue, 26 Apr 2011 14:41:18 +0000 (UTC) Received: by fxm11 with SMTP id 11so657801fxm.13 for ; Tue, 26 Apr 2011 07:41:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=LQ4toyM4O4av3Ts7Guh7WqelFJU4C0Q8xZer+j5PmGw=; b=Ugy6GB/UzAVEKg+UsOa/SOBJ0B74HTjmtOZ/ug/jKLtghK+MPmruMc97D47iAD0cOu rT8sC1NtP2wdyukvZzmxKIERR/lbYT1jljW7QCG3aoOmX6bVMRBKOqqEtFLAeut4Qi1m VitTgbqshQLCBzdd4DXQCSICqsMzR004nttq0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=CAYLOxyJ9UdCgylEmDjS9Fk4zq7KViGjfgqPcjlmBtnJYNUJM9SHmolUVwuqhS4YM2 bepY/Cje847fAHHx7iySxTGLhZUCjksZCamdnULZuaHPQn72iHN6mBMjeH1VlaFivY1w IEg4zYMOXXERF38UT4hyhTnmLVOkG9VIT39Zo= Received: by 10.223.30.82 with SMTP id t18mr899246fac.106.1303827001775; Tue, 26 Apr 2011 07:10:01 -0700 (PDT) Received: from localhost.localdomain ([213.152.137.45]) by mx.google.com with ESMTPS id k5sm2013816faa.39.2011.04.26.07.09.57 (version=SSLv3 cipher=OTHER); Tue, 26 Apr 2011 07:09:59 -0700 (PDT) Message-ID: <4DB6D264.2060209@gmail.com> Date: Tue, 26 Apr 2011 18:10:44 +0400 From: Vladimir Laskov User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 MIME-Version: 1.0 To: Sergey Kandaurov References: <4D553027.5040606@gmail.com> <201102111531.00915.jhb@freebsd.org> <4D5E5476.5010107@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Tue, 26 Apr 2011 14:41:19 -0000 On 02/18/2011 03:11 PM, 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 on amd64 it work fine # 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 *** server.c: In function 'server_ping': server.c:339: warning: passing argument 2 of 'connect' from incompatible pointer type cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wstrict-prototypes -Wformat-security -Wmissing-declarations -Wdeclaration-after-statement -o client.o client.c cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wstrict-prototypes -Wformat-security -Wmissing-declarations -Wdeclaration-after-statement -o cache.o cache.c cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wstrict-prototypes -Wformat-security -Wmissing-declarations -Wdeclaration-after-statement -o rbtree.o rbtree.c cc -c -g -Os -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wstrict-prototypes -Wformat-security -Wmissing-declarations -Wdeclaration-after-statement -o memstream.o memstream.c memstream.c:111: warning: no previous declaration for 'open_memstream' cc mcelog.o p4.o k8.o dmi.o tsc.o core2.o bitfield.o intel.o nehalem.o dunnington.o tulsa.o config.o memutil.o msg.o eventloop.o leaky-bucket.o memdb.o server.o client.o cache.o rbtree.o memstream.o /usr/lib/libkvm.so -o mcelog # have problem for i386 ============================================== # gmake FREEBSD=yes i386=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 In file included from mcelog.c:52: mcelog.h:112: error: expected identifier before numeric constant mcelog.c: In function 'bankname': mcelog.c:138: error: 'CPU_NEHALEM' undeclared (first use in this function) mcelog.c:138: error: (Each undeclared identifier is reported only once mcelog.c:138: error: for each function it appears in.) mcelog.c:138: error: 'CPU_DUNNINGTON' undeclared (first use in this function) mcelog.c:138: error: 'CPU_TULSA' undeclared (first use in this function) mcelog.c: In function 'mce_filter': mcelog.c:163: error: 'CPU_NEHALEM' undeclared (first use in this function) mcelog.c:163: error: 'CPU_DUNNINGTON' undeclared (first use in this function) mcelog.c:163: error: 'CPU_TULSA' undeclared (first use in this function) mcelog.c: At top level: mcelog.c:218: error: 'CPU_NEHALEM' undeclared here (not in a function) mcelog.c:218: error: array index in initializer not of integer type mcelog.c:218: error: (near initialization for 'cputype_name') mcelog.c:219: error: 'CPU_DUNNINGTON' undeclared here (not in a function) mcelog.c:219: error: array index in initializer not of integer type mcelog.c:219: error: (near initialization for 'cputype_name') mcelog.c:220: error: 'CPU_TULSA' undeclared here (not in a function) mcelog.c:220: error: array index in initializer not of integer type mcelog.c:220: error: (near initialization for 'cputype_name') mcelog.c: In function 'decodefatal': mcelog.c:835: warning: integer constant is too large for 'long' type mcelog.c:838: warning: integer constant is too large for 'long' type mcelog.c:921: warning: integer constant is too large for 'long' type mcelog.c:923: warning: integer constant is too large for 'long' type gmake: *** [mcelog.o] Error 1 -- Vladimir Laskov