problem with build mcelog
John Baldwin
jhb at freebsd.org
Tue Feb 22 16:20:08 UTC 2011
On Friday, February 18, 2011 7:11:07 am Sergey Kandaurov wrote:
> On 18 February 2011 14:13, venom <samflanker at gmail.com> 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 at 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 <sys/param.h>
> +#endif
> #include <stdio.h>
> #include <string.h>
> #include <ctype.h>
> @@ -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
More information about the freebsd-hackers
mailing list