From: Andrew S. <sh...@in...> - 2002-10-16 19:21:56
|
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 |