Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2011 11:43:00 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Vladimir Laskov <samflanker@gmail.com>
Cc:        freebsd-hackers@freebsd.org, Sergey Kandaurov <pluknet@gmail.com>
Subject:   Re: problem with build mcelog
Message-ID:  <201104261143.00644.jhb@freebsd.org>
In-Reply-To: <4DB6D264.2060209@gmail.com>
References:  <4D553027.5040606@gmail.com> <AANLkTik0xuH-dF1sVZG=mPdoss_zfBNE-rMDLKgweMmB@mail.gmail.com> <4DB6D264.2060209@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, April 26, 2011 10:10:44 am Vladimir Laskov wrote:
> 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

Oops, please try this additional patch:

--- //depot/projects/mcelog/mcelog.c	2010-08-25 11:41:19.000000000 0000
+++ /home/jhb/work/p4/mcelog/mcelog.c	2010-08-25 11:41:19.000000000 0000
@@ -29,6 +29,10 @@
 #include <sys/sysctl.h>
 #include <machine/cpufunc.h>
 #include <machine/cputypes.h>
+#ifdef __i386__
+/* Conflicts with 'enum cputype' in <mcelog.h>. */
+#undef CPU_P4
+#endif
 #include <machine/specialreg.h>
 #include <machine/mca.h>
 #include <err.h>

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104261143.00644.jhb>