problem with build mcelog

John Baldwin jhb at freebsd.org
Tue Apr 26 15:43:02 UTC 2011


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


More information about the freebsd-hackers mailing list