Skip to contentSkip to conversation

2.4.7-ac8 compilation error

DISCUSSION Gregoire Favre 3 participants 3 messages Aug 6, 2001

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

I got the following error while trying 2.4.7-ac8:

make[1]: Leaving directory `/usr/src/linux-2.4.7-ac8/arch/i386/lib'

ld -m elf_i386 -T /usr/src/linux-2.4.7-ac8/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o \
	--start-group \
	arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
	 drivers/parport/driver.o drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/media/media.o drivers/char/agp/agp.o drivers/char/drm/drm.o drivers/ide/idedriver.o drivers/scsi/scsidrv.o drivers/cdrom/driver.o drivers/pci/driver.o drivers/video/video.o drivers/usb/usbdrv.o drivers/net/irda/irda.o \
	net/network.o \
	/usr/src/linux-2.4.7-ac8/arch/i386/lib/lib.a /usr/src/linux-2.4.7-ac8/lib/lib.a /usr/src/linux-2.4.7-ac8/arch/i386/lib/lib.a \
	--end-group \
	-o vmlinux

mm/mm.o: In function `init_shmem_fs':
mm/mm.o(.text.init+0xec4): undefined reference to `shmem_set_size'
make: *** [vmlinux] Error 1

Greg
________________________________________________________________
http://ulima.unil.ch/greg ICQ:16624071 mailto:[email protected]

#1 lore raw

Hi everyone

Yep, same error. What's funny is that all the stuff in mm/shmem.c is related to the TMPFS (as far as I understood), and seems to be included and compiled even if you don't select TMPFS...

I tried to hack a bit around, but to be honest I've got no clue. :)

Have fun
Ed

Quoted 23 lines · Gregoire Favre

Hello,

I got the following error while trying 2.4.7-ac8:

make[1]: Leaving directory `/usr/src/linux-2.4.7-ac8/arch/i386/lib'

ld -m elf_i386 -T /usr/src/linux-2.4.7-ac8/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o \
        --start-group \
        arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o 
mm/mm.o fs/fs.o ipc/ipc.o \
        drivers/parport/driver.o drivers/char/char.o 
drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/media/media.o drivers/char/agp/agp.o drivers/char/drm/drm.o drivers/ide/idedriver.o drivers/scsi/scsidrv.o drivers/cdrom/driver.o drivers/pci/driver.o drivers/video/video.o drivers/usb/usbdrv.o drivers/net/irda/irda.o \
        net/network.o \
        /usr/src/linux-2.4.7-ac8/arch/i386/lib/lib.a 
/usr/src/linux-2.4.7-ac8/lib/lib.a /usr/src/linux-2.4.7-ac8/arch/i386/lib/lib.a \
        --end-group \
        -o vmlinux

mm/mm.o: In function `init_shmem_fs':
mm/mm.o(.text.init+0xec4): undefined reference to `shmem_set_size'
make: *** [vmlinux] Error 1

Greg
________________________________________________________________
http://ulima.unil.ch/greg ICQ:16624071 mailto:[email protected]

#2 lore raw
In reply to Gregoire Favre
mm/shmem.c +24 -24
@@ -739,6 +739,30 @@ struct inode *shmem_get_inode(struct sup
 	return inode;
 }
 
+static int shmem_set_size(struct shmem_sb_info *sbinfo,
+			  unsigned long max_blocks, unsigned long max_inodes)
+{
+	int error;
+	unsigned long blocks, inodes;
+
+	spin_lock(&sbinfo->stat_lock);
+	blocks = sbinfo->max_blocks - sbinfo->free_blocks;
+	inodes = sbinfo->max_inodes - sbinfo->free_inodes;
+	error = -EINVAL;
+	if (max_blocks < blocks)
+		goto out;
+	if (max_inodes < inodes)
+		goto out;
+	error = 0;
+	sbinfo->max_blocks  = max_blocks;
+	sbinfo->free_blocks = max_blocks - blocks;
+	sbinfo->max_inodes  = max_inodes;
+	sbinfo->free_inodes = max_inodes - inodes;
+out:
+	spin_unlock(&sbinfo->stat_lock);
+	return error;
+}
+
 #ifdef CONFIG_TMPFS
 
 static struct inode_operations shmem_symlink_inode_operations;
@@ -1242,30 +1266,6 @@ static int shmem_parse_options(char *opt
 			return 1;
 	}
 	return 0;
-}
-
-static int shmem_set_size(struct shmem_sb_info *sbinfo,
-			  unsigned long max_blocks, unsigned long max_inodes)
-{
-	int error;
-	unsigned long blocks, inodes;
-
-	spin_lock(&sbinfo->stat_lock);
-	blocks = sbinfo->max_blocks - sbinfo->free_blocks;
-	inodes = sbinfo->max_inodes - sbinfo->free_inodes;
-	error = -EINVAL;
-	if (max_blocks < blocks)
-		goto out;
-	if (max_inodes < inodes)
-		goto out;
-	error = 0;
-	sbinfo->max_blocks  = max_blocks;
-	sbinfo->free_blocks = max_blocks - blocks;
-	sbinfo->max_inodes  = max_inodes;
-	sbinfo->free_inodes = max_inodes - inodes;
-out:
-	spin_unlock(&sbinfo->stat_lock);
-	return error;
 }
 
 static int shmem_remount_fs (struct super_block *sb, int *flags, char *data)