2.4.18-rmk7 + CVS jffs2 ld error (zlib)

Michael Palme m.palme at goepel.com
Thu Aug 29 10:07:09 EDT 2002


hello...

i know this was discussed some times ago in the list but i'read the old 
threads but no success.
i have kernel 2.4.18-rmk7 and i would like to build it with jffs2 from 
latest CVS. i have patched /patches/patchin.sh with patch from Henrik 
Nordstrom posted today, and applied on the kernel sources. on building i 
get lots of errors at the final linking:

arm/tools/chain/bin/arm-uclibc-ld -p -X -T arch/arm/vmlinux.lds 
arch/arm/kernel/head-armv.o arch/arm/kernel/init_task.o init/main.o 
init/version.o --start-group arch/arm/kernel/kernel.o arch/arm/mm/mm.o 
arch/arm/mach-sa1100/sa1100.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o 
drivers/serial/serial.o drivers/char/char.o drivers/block/block.o 
drivers/misc/misc.o drivers/net/net.o drivers/media/media.o 
drivers/mtd/mtdlink.o net/network.o arch/arm/nwfpe/math-emu.o 
arch/arm/lib/lib.a /usr/arm/krnl-2.4.18-rmk7/lib/lib.a --end-group -o 
vmlinux

fs/fs.o: In function `jffs2_zlib_compress':
fs/fs.o(.text+0x2ab58): undefined reference to `zlib_deflateInit_'
fs/fs.o(.text+0x2abb0): undefined reference to `zlib_deflate'
fs/fs.o(.text+0x2abbc): undefined reference to `zlib_deflateEnd'
fs/fs.o(.text+0x2ac3c): undefined reference to `zlib_deflate'
fs/fs.o(.text+0x2ac78): undefined reference to `zlib_deflateEnd'
fs/fs.o: In function `jffs2_zlib_decompress':
fs/fs.o(.text+0x2ad4c): undefined reference to `zlib_inflateInit_'
fs/fs.o(.text+0x2ad78): undefined reference to `zlib_inflate'
fs/fs.o(.text+0x2ad98): undefined reference to `zlib_inflateEnd'
fs/fs.o: In function `jffs2_garbage_collect_thread':
fs/fs.o(.text+0x363a0): undefined reference to `set_user_nice'
fs/fs.o: In function `jffs2_zlib_init':
fs/fs.o(.text.init+0x16b8): undefined reference to 
`zlib_deflate_workspacesize'
fs/fs.o(.text.init+0x16d8): undefined reference to 
`zlib_inflate_workspacesize'
fs/fs.o(.text.init+0x1700): undefined reference to 
`zlib_inflate_workspacesize'
fs/fs.o(.text.init+0x1720): undefined reference to 
`zlib_deflate_workspacesize'
make: *** [vmlinux] Error 1



so i grepped around in the list archive and found a possible solution to 
remove compr_zlib.o from COMPR_OBJS in jffs2/Makefile. Now after 
rebuilding i get:


/arm/tools/chain/bin/arm-uclibc-ld -p -X -T arch/arm/vmlinux.lds 
arch/arm/kernel/head-armv.o arch/arm/kernel/init_task.o init/main.o 
init/version.o --start-group arch/arm/kernel/kernel.o arch/arm/mm/mm.o 
arch/arm/mach-sa1100/sa1100.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o 
drivers/serial/serial.o drivers/char/char.o drivers/block/block.o 
drivers/misc/misc.o drivers/net/net.o drivers/media/media.o 
drivers/mtd/mtdlink.o net/network.o arch/arm/nwfpe/math-emu.o 
arch/arm/lib/lib.a /usr/arm/krnl-2.4.18-rmk7/lib/lib.a --end-group -o 
vmlinux

fs/fs.o: In function `jffs2_compress':
fs/fs.o(.text+0x29fac): undefined reference to `jffs2_zlib_compress'
fs/fs.o: In function `jffs2_decompress':
fs/fs.o(.text+0x2a0b4): undefined reference to `jffs2_zlib_decompress'
fs/fs.o: In function `jffs2_garbage_collect_thread':
fs/fs.o(.text+0x36040): undefined reference to `set_user_nice'
fs/fs.o: In function `init_jffs2_fs':
fs/fs.o(.text.init+0x1868): undefined reference to `jffs2_zlib_init'
fs/fs.o(.text.init+0x18a4): undefined reference to `jffs2_zlib_exit'
make: *** [vmlinux] Error 1

i tried also to apply the patches from 
ftp://ftp.kernel.org/pub/linux/kernel/people/dwmw2/shared-zlib on top of 
my kernel but this is something tricky...

so i would like to know if someone has a fast workaround ???

thanks in advance ... Michael Palme









More information about the linux-mtd mailing list