Skip to contentSkip to conversation

Compile Error

2.5.7-dj2 New Sebastian Roth 4 participants 6 messages Mar 28, 2002 – Mar 29, 2002

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

----- 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' 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:

Quoted 3 lines

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

#2 lore raw
In reply to Sebastian Roth
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 Error

Quoted 16 lines

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:

Quoted 3 lines

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.

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
#3 lore raw

PATCH 1/1 Compile Error

In reply to Sebastian Roth
Quoted 8 lines · Bob Miller

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.

Quoted 7 lines

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.

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
#4 lore raw
In reply to Sebastian Roth
Quoted 6 lines · Bob Miller

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.

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#5 lore raw
In reply to Sebastian Roth

----- 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_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