2002-02-23 16:00:15

by Hans-Joachim Baader

[permalink] [raw]
Subject: 2.4.18-rc4 compile problem

Hi,

when linking the kernel I get the following error:

ld -m elf_i386 -T /usr/src/linux-2.4.18-rc4/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/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/media/media.o drivers/char/drm/drm.o drivers/ide/idedriver.o drivers/cdrom/driver.o drivers/pci/driver.o drivers/video/video.o \
net/network.o \
/usr/src/linux-2.4.18-rc4/arch/i386/lib/lib.a /usr/src/linux-2.4.18-rc4/lib/lib.a /usr/src/linux-2.4.18-rc4/arch/i386/lib/lib.a \
--end-group \
-o vmlinux
fs/fs.o: In function `generic_cont_expand':
fs/fs.o(.text+0x3e96): undefined reference to `page_cache_release'
fs/fs.o: In function `cont_prepare_write':
fs/fs.o(.text+0x3f89): undefined reference to `page_cache_release'
fs/fs.o(.text+0x4072): undefined reference to `page_cache_release'
fs/fs.o: In function `block_truncate_page':
fs/fs.o(.text+0x42be): undefined reference to `page_cache_release'
fs/fs.o: In function `block_symlink':
fs/fs.o(.text+0x4a68): undefined reference to `page_cache_release'
fs/fs.o(.text+0x4a95): more undefined references to `page_cache_release' follow
make: *** [vmlinux] Error 1

I had no problems compiling 2.4.17. Then I applied patch 2.4.18-rc1 without
error, and the above problem appeared. Then I applied the incremental
patches through -rc4 but the problem remains.

I have all tools in the right versions and did the usual make dep; make
clean; make -j5 bzImage. Any idea? config attached.

Thanks,
hjb
--
Pro-Linux - Germany's largest volunteer Linux support site
http://www.pro-linux.de/ Public Key ID 0x3DDBDDEA


Attachments:
(No filename) (0.00 B)
(No filename) (200.00 B)
Download all attachments

2002-02-24 07:58:53

by Willy Tarreau

[permalink] [raw]
Subject: Re: 2.4.18-rc4 compile problem

> I had no problems compiling 2.4.17. Then I applied patch 2.4.18-rc1 without
> error, and the above problem appeared. Then I applied the incremental
> patches through -rc4 but the problem remains.

2.4.18-rc1 unexports page_cache_release and replaces it with a macro, so you
may have one driver under the fs directory that now needs to include
linux/pagemap.h.

You'll catch the culprit with simething like :

# find fs -name '*.o' | xargs nm -oa|grep page_cache_release

But I sincerely think that you have a damaged 2.4.17 source tree. You may want
to de-tar it again to check. I tried to compile everything under 2.4.18-rc1,
and all compiled well. You may have tried rmap or other patches on it before.

Well, finally I compiled 2.4.18-rc4 with your .config (gcc-2.95.3) while typing
this mail and it compiled and linked :

# tools/build -b bbootsect bsetup compressed/bvmlinux.out CURRENT > bzImage
# Root device is (8, 3)
# Boot sector 512 bytes.
# Setup is 2516 bytes.
# System is 649 kB
# make[1]: Leaving directory `/usr/src/linux-2.4.18-rc4/arch/i386/boot'
# 106.120u 9.440s 0:59.65 193.7% 0+0k 0+0io 400347pf+0w
# pcw{willy}120:

Regards,
Willy

#### for info, extract from patch-2.4.18-rc1 ####
--- linux.orig/include/linux/pagemap.h Tue Jan 22 17:51:24 2002
+++ linux/include/linux/pagemap.h Wed Jan 9 17:10:17 2002
@@ -29,7 +29,7 @@
#define PAGE_CACHE_ALIGN(addr) (((addr)+PAGE_CACHE_SIZE-1)&PAGE_CACHE_MASK)

#define page_cache_get(x) get_page(x)
-extern void FASTCALL(page_cache_release(struct page *));
+#define page_cache_release(x) __free_page(x)
--- linux.orig/kernel/ksyms.c Tue Jan 22 17:51:24 2002
+++ linux/kernel/ksyms.c Wed Feb 6 21:06:42 2002
@@ -95,7 +95,6 @@
-EXPORT_SYMBOL(page_cache_release);