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
----- 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
Quoted 16 lines
Hi there,
make bzImage says:
make[1]: Entering directory `/usr/src/linux-2.5-dj/kernel' makeall_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.oacct.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:
Quoted 3 lines
You have
CONFIG_BSD_PROCESS_ACCTnot set
but the compile errors you're getting are for code inacct.cthat will only compile ifCONFIG_BSD_PROCESS_ACCTis 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=yCONFIG_ISA=yCONFIG_UID16=yCONFIG_EXPERIMENTAL=yCONFIG_NET=yCONFIG_SYSVIPC=yCONFIG_SYSCTL=yCONFIG_MODULES=yCONFIG_KMOD=yCONFIG_M686=yCONFIG_X86_WP_WORKS_OK=yCONFIG_X86_INVLPG=yCONFIG_X86_CMPXCHG=yCONFIG_X86_XADD=yCONFIG_X86_BSWAP=yCONFIG_X86_POPAD_OK=yCONFIG_RWSEM_XCHGADD_ALGORITHM=yCONFIG_X86_L1_CACHE_SHIFT=5CONFIG_X86_TSC=yCONFIG_X86_GOOD_APIC=yCONFIG_X86_PGE=yCONFIG_X86_USE_PPRO_CHECKSUM=yCONFIG_X86_PPRO_FENCE=yCONFIG_X86_MSR=yCONFIG_X86_CPUID=yCONFIG_NOHIGHMEM=yCONFIG_MTRR=yCONFIG_SMP=yCONFIG_HAVE_DEC_LOCK=yCONFIG_X86_IO_APIC=yCONFIG_X86_LOCAL_APIC=yCONFIG_PCI=yCONFIG_PCI_GOANY=yCONFIG_PCI_BIOS=yCONFIG_PCI_DIRECT=yCONFIG_PCI_NAMES=yCONFIG_KCORE_ELF=yCONFIG_BINFMT_AOUT=yCONFIG_BINFMT_ELF=yCONFIG_BINFMT_MISC=yCONFIG_PARPORT=yCONFIG_PARPORT_PC=yCONFIG_PARPORT_PC_CML1=yCONFIG_PARPORT_PC_SUPERIO=yCONFIG_PNP=yCONFIG_ISAPNP=yCONFIG_BLK_DEV_FD=yCONFIG_BLK_CPQ_DA=yCONFIG_BLK_DEV_LOOP=yCONFIG_MD=yCONFIG_BLK_DEV_MD=mCONFIG_MD_LINEAR=mCONFIG_MD_RAID0=mCONFIG_MD_RAID1=mCONFIG_MD_RAID5=mCONFIG_MD_MULTIPATH=mCONFIG_BLK_DEV_LVM=mCONFIG_PACKET=yCONFIG_UNIX=yCONFIG_INET=yCONFIG_IP_MULTICAST=yCONFIG_IDE=yCONFIG_BLK_DEV_IDE=yCONFIG_BLK_DEV_IDEDISK=yCONFIG_IDEDISK_MULTI_MODE=yCONFIG_BLK_DEV_IDECD=yCONFIG_BLK_DEV_CMD640=yCONFIG_BLK_DEV_RZ1000=yCONFIG_BLK_DEV_IDEPCI=yCONFIG_IDEPCI_SHARE_IRQ=yCONFIG_BLK_DEV_IDEDMA_PCI=yCONFIG_IDEDMA_PCI_AUTO=yCONFIG_BLK_DEV_IDEDMA=yCONFIG_BLK_DEV_PIIX=yCONFIG_IDEDMA_AUTO=yCONFIG_SCSI=yCONFIG_BLK_DEV_SD=yCONFIG_SD_EXTRA_DEVS=40CONFIG_CHR_DEV_ST=yCONFIG_BLK_DEV_SR=yCONFIG_SR_EXTRA_DEVS=2CONFIG_SCSI_MULTI_LUN=yCONFIG_SCSI_CONSTANTS=yCONFIG_SCSI_AIC7XXX=yCONFIG_AIC7XXX_CMDS_PER_DEVICE=253CONFIG_AIC7XXX_RESET_DELAY_MS=15000CONFIG_NETDEVICES=yCONFIG_DUMMY=mCONFIG_NET_ETHERNET=yCONFIG_NET_PCI=yCONFIG_EEPRO100=yCONFIG_PPP=yCONFIG_PPP_ASYNC=yCONFIG_PPP_DEFLATE=yCONFIG_PPP_BSDCOMP=yCONFIG_INPUT=yCONFIG_INPUT_KEYBDEV=yCONFIG_INPUT_MOUSEDEV=yCONFIG_INPUT_MOUSEDEV_SCREEN_X=1024CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768CONFIG_SOUND_GAMEPORT=yCONFIG_SERIO=yCONFIG_SERIO_I8042=yCONFIG_I8042_REG_BASE=60CONFIG_I8042_KBD_IRQ=1CONFIG_I8042_AUX_IRQ=12CONFIG_INPUT_KEYBOARD=yCONFIG_KEYBOARD_ATKBD=yCONFIG_INPUT_MOUSE=yCONFIG_MOUSE_PS2=yCONFIG_MOUSE_SERIAL=yCONFIG_VT=yCONFIG_VT_CONSOLE=yCONFIG_SERIAL=yCONFIG_SERIAL_CONSOLE=yCONFIG_UNIX98_PTYS=yCONFIG_UNIX98_PTY_COUNT=256CONFIG_PRINTER=yCONFIG_REISERFS_FS=yCONFIG_EXT3_FS=yCONFIG_JBD=yCONFIG_FAT_FS=yCONFIG_VFAT_FS=yCONFIG_TMPFS=yCONFIG_RAMFS=yCONFIG_ISO9660_FS=yCONFIG_JOLIET=yCONFIG_JFS_FS=yCONFIG_NTFS_FS=yCONFIG_PROC_FS=yCONFIG_DEVPTS_FS=yCONFIG_EXT2_FS=yCONFIG_NFS_FS=yCONFIG_NFS_V3=yCONFIG_NFSD=yCONFIG_NFSD_V3=yCONFIG_NFSD_TCP=yCONFIG_SUNRPC=yCONFIG_LOCKD=yCONFIG_LOCKD_V4=yCONFIG_SMB_FS=yCONFIG_MSDOS_PARTITION=yCONFIG_SMB_NLS=yCONFIG_NLS=yCONFIG_NLS_DEFAULT="iso8859-1"CONFIG_VGA_CONSOLE=yCONFIG_DEBUG_KERNEL=yCONFIG_MAGIC_SYSRQ=yCONFIG_ZLIB_INFLATE=yCONFIG_ZLIB_DEFLATE=y
Quoted 38 lines · Adam Kropelin
----- Original Message -----
From: "Sebastian Roth" <[email protected]>
To: <[email protected]>
Sent: Thursday, March 28, 2002 6:17 AM
Subject: [2.5.7-dj2] Compile ErrorQuoted 16 lines
Hi there,
make bzImage says:
make[1]: Entering directory `/usr/src/linux-2.5-dj/kernel' makeall_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.oacct.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:
Quoted 3 lines
You have
CONFIG_BSD_PROCESS_ACCTnot set
but the compile errors you're getting are for code inacct.cthat will only compile ifCONFIG_BSD_PROCESS_ACCTis SET.Same is true here except stock 2.5.7 *does* compile and -dj2 does not. Same config modulo symbol differences.
Quoted 7 lines
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?
Signature · 2 lines
Bob Miller Email: [email protected] Open Source Development Lab Phone: 503.626.2455 Ext. 17
PATCH 1/1 Compile Error
In reply to Sebastian RothQuoted 8 lines · Bob Miller
Stuff deleted...
In looking at
kernel/acct.cit looks like someone tried to changeacct.cto no longer conditionally compile based onCONFIG_BSD_PROCESS_ACCT. The problem is that other files that conditionally compile withCONFIG_BSD_PROCESS_ACCT(include/linux/acct.hand others) where not changed.
Quoted 7 lines
So if you build with
CONFIG_BSD_PROCESS_ACCTnot set you're build will break. I'm in the process of generating a patch that will makeacct.cagain conditionally compile based onCONFIG_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.
Signature · 41 lines
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
Quoted 6 lines · Bob Miller
So if you build with
CONFIG_BSD_PROCESS_ACCTnot set you're build will break. I'm in the process of generating a patch that will makeacct.cagain conditionally compile based onCONFIG_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.
Signature · 2 lines
| Dave Jones. http://www.codemonkey.org.uk | SuSE Labs
----- 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
Quoted 11 lines · Bob Miller
Quoted 6 lines
So if you build with
CONFIG_BSD_PROCESS_ACCTnot set you're build will break. I'm in the process of generating a patch that will makeacct.cagain conditionally compile based onCONFIG_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