2002-03-28 11:17:10

by Sebastian Roth

[permalink] [raw]
Subject: [2.5.7-dj2] Compile Error

Hi there,

make bzImage says:
make[1]: Entering directory `/usr/src/linux-2.5-dj/kernel'
make all_targets
make[2]: Entering directory `/usr/src/linux-2.5-dj/kernel'
gcc -D__KERNEL__ -I/usr/src/linux-2.5-dj/include -Wall
-Wstrict-prototypes -Wno-
trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
-pipe -mpref
erred-stack-boundary=2 -march=i686 -malign-functions=4
-DKBUILD_BASENAME=acct
-c -o acct.o acct.c
acct.c:235: parse error before `do'
acct.c:378: parse error before `do'
acct.c:384: parse error before `&'
acct.c:386: warning: type defaults to `int' in declaration of
`do_acct_process'
acct.c:386: warning: parameter names (without types) in function
declaration
acct.c:386: conflicting types for `do_acct_process'
acct.c:297: previous declaration of `do_acct_process'
acct.c:386: warning: data definition has no type or storage class
acct.c:387: warning: type defaults to `int' in declaration of `fput'
acct.c:387: warning: parameter names (without types) in function
declaration
acct.c:387: conflicting types for `fput'
/usr/src/linux-2.5-dj/include/linux/file.h:36: previous declaration of
`fput'
acct.c:387: warning: data definition has no type or storage class
acct.c:388: parse error before `}'
make[2]: *** [acct.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.5-dj/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5-dj/kernel'
make: *** [_dir_kernel] Error 2

just for information.

Sebastian


2002-03-28 12:41:42

by Adam Kropelin

[permalink] [raw]
Subject: Re: [2.5.7-dj2] Compile Error

----- Original Message -----
From: "Sebastian Roth" <[email protected]>
To: <[email protected]>
Sent: Thursday, March 28, 2002 6:17 AM
Subject: [2.5.7-dj2] Compile Error


> Hi there,
>
> make bzImage says:
> make[1]: Entering directory `/usr/src/linux-2.5-dj/kernel'
> make all_targets
> make[2]: Entering directory `/usr/src/linux-2.5-dj/kernel'
> gcc -D__KERNEL__ -I/usr/src/linux-2.5-dj/include -Wall
> -Wstrict-prototypes -Wno-
> trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
> -pipe -mpref
> erred-stack-boundary=2 -march=i686 -malign-functions=4
> -DKBUILD_BASENAME=acct
> -c -o acct.o acct.c
> acct.c:235: parse error before `do'
> acct.c:378: parse error before `do'
> acct.c:384: parse error before `&'

<snip>

I'm a "me too" on this.

I see some discussion a few days ago where Grega Fajdiga had the same problem on
stock 2.5.7. There didn't seem to be a resolution other than Bob Miller saying:

> You have CONFIG_BSD_PROCESS_ACCT not set
> but the compile errors you're getting are for code in acct.c that
> will only compile if CONFIG_BSD_PROCESS_ACCT is SET.

Same is true here except stock 2.5.7 *does* compile and -dj2 does not. Same
config modulo symbol differences.

Downloaded multiple times, made mrproper, etc.

Failing .config for -dj2 is below.

--Adam

CONFIG_X86=y
CONFIG_ISA=y
CONFIG_UID16=y
CONFIG_EXPERIMENTAL=y
CONFIG_NET=y
CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
CONFIG_MODULES=y
CONFIG_KMOD=y
CONFIG_M686=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_X86_TSC=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_PGE=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_PPRO_FENCE=y
CONFIG_X86_MSR=y
CONFIG_X86_CPUID=y
CONFIG_NOHIGHMEM=y
CONFIG_MTRR=y
CONFIG_SMP=y
CONFIG_HAVE_DEC_LOCK=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_PCI=y
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_NAMES=y
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=y
CONFIG_PARPORT_PC_CML1=y
CONFIG_PARPORT_PC_SUPERIO=y
CONFIG_PNP=y
CONFIG_ISAPNP=y
CONFIG_BLK_DEV_FD=y
CONFIG_BLK_CPQ_DA=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_MD=y
CONFIG_BLK_DEV_MD=m
CONFIG_MD_LINEAR=m
CONFIG_MD_RAID0=m
CONFIG_MD_RAID1=m
CONFIG_MD_RAID5=m
CONFIG_MD_MULTIPATH=m
CONFIG_BLK_DEV_LVM=m
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_CMD640=y
CONFIG_BLK_DEV_RZ1000=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_PIIX=y
CONFIG_IDEDMA_AUTO=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_SD_EXTRA_DEVS=40
CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
CONFIG_SR_EXTRA_DEVS=2
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_AIC7XXX=y
CONFIG_AIC7XXX_CMDS_PER_DEVICE=253
CONFIG_AIC7XXX_RESET_DELAY_MS=15000
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
CONFIG_NET_ETHERNET=y
CONFIG_NET_PCI=y
CONFIG_EEPRO100=y
CONFIG_PPP=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_BSDCOMP=y
CONFIG_INPUT=y
CONFIG_INPUT_KEYBDEV=y
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_SOUND_GAMEPORT=y
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_I8042_REG_BASE=60
CONFIG_I8042_KBD_IRQ=1
CONFIG_I8042_AUX_IRQ=12
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_SERIAL=y
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_PRINTER=y
CONFIG_REISERFS_FS=y
CONFIG_EXT3_FS=y
CONFIG_JBD=y
CONFIG_FAT_FS=y
CONFIG_VFAT_FS=y
CONFIG_TMPFS=y
CONFIG_RAMFS=y
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_JFS_FS=y
CONFIG_NTFS_FS=y
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
CONFIG_EXT2_FS=y
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFSD=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_TCP=y
CONFIG_SUNRPC=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_SMB_FS=y
CONFIG_MSDOS_PARTITION=y
CONFIG_SMB_NLS=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_VGA_CONSOLE=y
CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y


2002-03-28 17:54:24

by Bob Miller

[permalink] [raw]
Subject: Re: [2.5.7-dj2] Compile Error

On Thu, Mar 28, 2002 at 07:41:14AM -0500, Adam Kropelin wrote:
> ----- Original Message -----
> From: "Sebastian Roth" <[email protected]>
> To: <[email protected]>
> Sent: Thursday, March 28, 2002 6:17 AM
> Subject: [2.5.7-dj2] Compile Error
>
>
> > Hi there,
> >
> > make bzImage says:
> > make[1]: Entering directory `/usr/src/linux-2.5-dj/kernel'
> > make all_targets
> > make[2]: Entering directory `/usr/src/linux-2.5-dj/kernel'
> > gcc -D__KERNEL__ -I/usr/src/linux-2.5-dj/include -Wall
> > -Wstrict-prototypes -Wno-
> > trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
> > -pipe -mpref
> > erred-stack-boundary=2 -march=i686 -malign-functions=4
> > -DKBUILD_BASENAME=acct
> > -c -o acct.o acct.c
> > acct.c:235: parse error before `do'
> > acct.c:378: parse error before `do'
> > acct.c:384: parse error before `&'
>
> <snip>
>
> I'm a "me too" on this.
>
> I see some discussion a few days ago where Grega Fajdiga had the same problem on
> stock 2.5.7. There didn't seem to be a resolution other than Bob Miller saying:
>
> > You have CONFIG_BSD_PROCESS_ACCT not set
> > but the compile errors you're getting are for code in acct.c that
> > will only compile if CONFIG_BSD_PROCESS_ACCT is SET.
>
> Same is true here except stock 2.5.7 *does* compile and -dj2 does not. Same
> config modulo symbol differences.
>
> Downloaded multiple times, made mrproper, etc.
>
> Failing .config for -dj2 is below.
>
> --Adam
>
> CONFIG_X86=y

Stuff deleted...

In looking at kernel/acct.c it looks like someone tried to change acct.c
to no longer conditionally compile based on CONFIG_BSD_PROCESS_ACCT.
The problem is that other files that conditionally compile with
CONFIG_BSD_PROCESS_ACCT (include/linux/acct.h and others) where not changed.

So if you build with CONFIG_BSD_PROCESS_ACCT not set you're build will
break. I'm in the process of generating a patch that will make acct.c
again conditionally compile based on CONFIG_BSD_PROCESS_ACCT. This
should be done in a little bit and I'll post.

Dave, where did you get the patch for acct.c?

--
Bob Miller Email: [email protected]
Open Source Development Lab Phone: 503.626.2455 Ext. 17

2002-03-28 18:26:21

by Bob Miller

[permalink] [raw]
Subject: [PATCH] [2.5.7-dj2] Compile Error

On Thu, Mar 28, 2002 at 09:53:52AM -0800, Bob Miller wrote:
>
> Stuff deleted...
>
> In looking at kernel/acct.c it looks like someone tried to change acct.c
> to no longer conditionally compile based on CONFIG_BSD_PROCESS_ACCT.
> The problem is that other files that conditionally compile with
> CONFIG_BSD_PROCESS_ACCT (include/linux/acct.h and others) where not changed.
>
> So if you build with CONFIG_BSD_PROCESS_ACCT not set you're build will
> break. I'm in the process of generating a patch that will make acct.c
> again conditionally compile based on CONFIG_BSD_PROCESS_ACCT. This
> should be done in a little bit and I'll post.
>
> Dave, where did you get the patch for acct.c?
>

Below is a patch that should fix this build breakage.

--
Bob Miller Email: [email protected]
Open Source Development Lab Phone: 503.626.2455 Ext. 17


diff -ur linux-2.5.7-dj2-orig/kernel/acct.c linux-2.5.7-dj2/kernel/acct.c
--- linux-2.5.7-dj2-orig/kernel/acct.c Thu Mar 28 09:10:42 2002
+++ linux-2.5.7-dj2/kernel/acct.c Thu Mar 28 09:41:04 2002
@@ -44,11 +44,17 @@
*/

#include <linux/config.h>
+#include <linux/errno.h>
+#include <linux/kernel.h>
+
+#ifdef CONFIG_BSD_PROCESS_ACCT
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/acct.h>
+#include <linux/smp_lock.h>
#include <linux/file.h>
#include <linux/tty.h>
+
#include <asm/uaccess.h>

/*
@@ -389,3 +395,15 @@
spin_unlock(&acct_globals.lock);
return 0;
}
+
+#else
+/*
+ * Dummy system call when BSD process accounting is not configured
+ * into the kernel.
+ */
+
+asmlinkage long sys_acct(const char * filename)
+{
+ return -ENOSYS;
+}
+#endif

2002-03-28 19:01:48

by Andrey Klochko

[permalink] [raw]
Subject: Re: [2.5.7-dj2] Compile Error

--- linux-2.5/kernel/Makefile.orig Thu Mar 28 13:50:52 2002
+++ linux-2.5/kernel/Makefile Thu Mar 28 13:24:12 2002
@@ -14,13 +14,13 @@

obj-y = sched.o dma.o fork.o exec_domain.o panic.o printk.o \
module.o exit.o itimer.o info.o time.o softirq.o resource.o \
- sysctl.o acct.o capability.o ptrace.o timer.o user.o \
+ sysctl.o capability.o ptrace.o timer.o user.o \
signal.o sys.o kmod.o context.o futex.o kthread.o

obj-$(CONFIG_UID16) += uid16.o
obj-$(CONFIG_MODULES) += ksyms.o
obj-$(CONFIG_PM) += pm.o
-obj-$(CONFIG_CONFIG_BSD_PROCESS_ACCT) += acct.o
+obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
obj-$(CONFIG_IKCONFIG) += configs.o

ifneq ($(CONFIG_IA64),y)


Attachments:
kernel_Makefile.diff (693.00 B)

2002-03-28 19:03:58

by Dave Jones

[permalink] [raw]
Subject: Re: [2.5.7-dj2] Compile Error

On Thu, Mar 28, 2002 at 09:53:52AM -0800, Bob Miller wrote:
> So if you build with CONFIG_BSD_PROCESS_ACCT not set you're build will
> break. I'm in the process of generating a patch that will make acct.c
> again conditionally compile based on CONFIG_BSD_PROCESS_ACCT. This
> should be done in a little bit and I'll post.
>
> Dave, where did you get the patch for acct.c?

Al Viro's 0-aliases-c-C7-pre2
It looks like killing the first occurance of acct.o in kernel/Makefile
should do the trick. Let me know if that works out.

--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs

2002-03-28 20:07:27

by Sebastian Roth

[permalink] [raw]
Subject: Re: [2.5.7-dj2] Compile Error

On Thursday, 28. March 2002 20:01, Andrey Klochko wrote:
> Try attached patch

Ok, 2.5.7-dj2 compiles cleanly with your patch, but only if
CONFIG_BSD_PROCESS_ACCT is not set at .config .

Thank you!

> Andrey

Sebastian

BTW:
Lilo says that 2.5.7-dj2 is too big!
How that?
Boot sector 512 bytes.
Setup is 4772 bytes.
System is 1011 kB

2002-03-29 02:01:15

by Adam Kropelin

[permalink] [raw]
Subject: Re: [2.5.7-dj2] Compile Error

----- Original Message -----
From: "Dave Jones" <[email protected]>
To: "Bob Miller" <[email protected]>
Cc: "Adam Kropelin" <[email protected]>; <[email protected]>
Sent: Thursday, March 28, 2002 2:03 PM
Subject: Re: [2.5.7-dj2] Compile Error


> On Thu, Mar 28, 2002 at 09:53:52AM -0800, Bob Miller wrote:
> > So if you build with CONFIG_BSD_PROCESS_ACCT not set you're build will
> > break. I'm in the process of generating a patch that will make acct.c
> > again conditionally compile based on CONFIG_BSD_PROCESS_ACCT. This
> > should be done in a little bit and I'll post.
> >
> > Dave, where did you get the patch for acct.c?
>
> Al Viro's 0-aliases-c-C7-pre2
> It looks like killing the first occurance of acct.o in kernel/Makefile
> should do the trick. Let me know if that works out.

Works For Me (tm).

(but see my other message for an oops report)

--Adam