From: Wilton W. <ww...@ha...> - 2002-10-16 19:24:58
|
Add " around 3.2.1 then gcc should be happier.. it will then interpret the number as a string and not as a number.. - Wilton On Wed, 16 Oct 2002, Andrew Shewmaker` wrote: > On Thu, 10 Oct 2002 17:48:08 -0400 > er...@he... wrote: > > > On Thu, Oct 10, 2002 at 02:37:04PM -0600, Andrew Shewmaker` wrote: > > > I am attempting to use bproc-3.2.1 with Mandrake 9.0 (kernel 2.4.19-16mdk and gcc 3.2) > > > I have successfully patched and compiled Mandrake's kernel with bproc, which meant I > > > had to do some of it by hand since the grsecurity stuff confused patch. Then I tried to > > > compile the bproc tools and I see the following error. > > > > > > ghost.c:63: initializer element is not constant > > > ghost.c:63: (near initialization for `bproc_ghost_reqs') > > > ghost.c:63: initializer element is not constant > > > > > > I assume this is simply due to gcc 3.2, and I will switch to an older compiler if I > > > have to, but if someone could suggest a simple fix I would appreciate it. > > > > I have no idea how a constant can become non constant when changing > > compilers. Anyway, I worked around it. Patch below (against bproc 3.2.1): > > > Thanks for the patch (I haven't tried J.A. Magallon's). I've run into some other weird > problems that I was able to work around. Basically, it looks like gcc 3.2 was unhappy with > PACKAGE_VERSION having more than one decimal, and it said that there was a parse error > caused by PACKAGE_VERSION in the call to MODULE_DESCRIPTION. It looked to me like the patch > applied cleanly (except for unimportant revision control lines). > > gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I. -I../vmadump -I../clients -I/usr/src/linux-2.4.19-16mdk-bproc/include -pipe -fno-strength-reduce -D__KERNEL__ -DMODULE -DPACKAGE_VERSION='3.2.1' -DPACKAGE_MAGIC='11598' -DENABLE_DEBUG -DLINUX_TCP_IS_BROKEN -DSUPPORT_FILEREQ -c interface.c > interface.c:52: too many decimal points in floating constant > interface.c:52: parse error before numeric constant > interface.c: In function `bproc_version_check': > interface.c:1170: too many decimal points in floating constant > interface.c:1170: warning: missing braces around initializer > interface.c:1170: warning: (near initialization for `vers.version_string') > interface.c: In function `init_module': > interface.c:1396: too many decimal points in floating constant > interface.c:1396: warning: format argument is not a pointer (arg 2) > interface.c:1396: warning: format argument is not a pointer (arg 2) > make[1]: *** [interface.o] Error 1 > make[1]: Leaving directory `/usr/local/src/bproc-3.2.1/kernel' > make: *** [kernel] Error 2 > > > Changing PACKAGE_VERSION to 3.2 > > gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I. -I../vmadump -I../clients -I/usr/src/linux-2.4.19-16mdk-bproc/include -pipe -fno-strength-reduce -D__KERNEL__ -DMODULE -DPACKAGE_VERSION='3.2' -DPACKAGE_MAGIC='11598' -DENABLE_DEBUG -DLINUX_TCP_IS_BROKEN -DSUPPORT_FILEREQ -c interface.c > interface.c:52: parse error before numeric constant > interface.c: In function `bproc_version_check': > interface.c:1170: warning: missing braces around initializer > interface.c:1170: warning: (near initialization for `vers.version_string') > interface.c: In function `init_module': > interface.c:1396: warning: format argument is not a pointer (arg 2) > interface.c:1396: warning: format argument is not a pointer (arg 2) > make[1]: *** [interface.o] Error 1 > make[1]: Leaving directory `/usr/local/src/bproc-3.2.1/kernel' > make: *** [kernel] Error 2 > > > So I removed PACKAGE_VERSION from the call to MODULE_DESCRIPTION and interface.c compiled. > > > Andrew > > -- > Andrew Shewmaker > Associate Engineer > Phone: 208.526.1415 > Fax: 208.526.4017 > > Idaho National Engineering and Environmental Laboratory > 2525 Fremont Ave. > Idaho Falls, ID 83415-3605 > > > ------------------------------------------------------- > This sf.net email is sponsored by: viaVerio will pay you up to > $1,000 for every account that you consolidate with us. > http://ad.doubleclick.net/clk;4749864;7604308;v? > http://www.viaverio.com/consolidator/osdn.cfm > _______________________________________________ > BProc-users mailing list > BPr...@li... > https://lists.sourceforge.net/lists/listinfo/bproc-users ----[ Wilton William Wong ]--------------------------------------------- 11060-166 Avenue Ph : 01-780-456-9771 High Performance UNIX Edmonton, Alberta FAX: 01-780-456-9772 and Linux Solutions T5X 1Y3, Canada URL: http://www.harddata.com -------------------------------------------------------[ Hard Data Ltd. ]---- |