There are errors in the squashfs3.3 that turns it impossible to integrate with the next kernel 2.6.27 release candidate… during the compilation I got:
LD fs/squashfs/built-in.o
CC [M] fs/squashfs/inode.o
fs/squashfs/inode.c: In function 'squashfs_export_iget':
fs/squashfs/inode.c:654: error: implicit declaration of function 'd_alloc_anon'
fs/squashfs/inode.c:654: warning: assignment makes pointer from integer
without a cast
fs/squashfs/inode.c: In function 'init_inodecache':
fs/squashfs/inode.c:2201: warning: passing argument 5 of 'kmem_cache_create'
from incompatible pointer type
make[2]: *** [fs/squashfs/inode.o] Error 1
make[1]: *** [fs/squashfs] Error 2
make: *** [fs] Error 2
Seems that “d_alloc_anon” will be removed [1] from the next release candidate (it’s not affect 2.6.27-rc3). The function “d_alloc_anon”, from VFS, is needed for allocate an anonymous dentry on the VFS to process of mapping a filehandle. I don’t know if the referenced patch [1] will be merged into mainline, but the fix for it should also be trivial: The recommendation is switch all users of “d_alloc_anon” to “d_obtain_alias” (you can look at [2] for details).
The second problem, the warning at line 2201, occurred because the commit introduced in 2.6.26 [3] and identified as 51cc50685a4275c6a02653670af9f108a64e01cf, droped from SL*B the kmem cache argument from constructor. If you not fix it, probably causes an oops message during execution. It can be easily fixed by apply this patch into squashfs3.3.patch (thanks Zoltan for your help):
--- squashfs3.3.patch +++ squashfs3.3.patch @@ -2235,7 +2235,7 @@ +} + + -+static void init_once(struct kmem_cache *cachep, void *foo) ++static void init_once(void *foo)
You should read the bug reported and follow the discussion by visiting the issue 2052316. Others references for this problem can be read from the links below:
[1] http://kerneltrap.org/mailarchive/linux-fsdevel/2008/8/11/2892244
[2] http://kerneltrap.org/mailarchive/linux-fsdevel/2008/8/11/2892234
[3] http://eu.kernel.org/pub/linux/kernel/v2.6/snapshots/patch-2.6.26-git17.log
Many thanks for this post. I’ve been quietly trying to get squashfs-lzma going on 2.6.27-rc5 and yanking my hair out (I’m also trying to get atl2 patched in as well but another story).
I’ll give this a try and if all else fails, well, I’ll start slapping 2.6.26 around instead
Thanks
Comment by Sarah — September 10, 2008 @ 11:57 pm
Hi Sarah,
I have noticed by Phillip Lougher released squashfs-3.4 with a fix to this issue. In my tests here version 3.4 works fine.
I suggest to you to upgrade your version too
Best Regards,
Carlos.
Comment by Carlos Costa — September 11, 2008 @ 12:14 pm
[...] to Carlos Costa who wrote an article how to fix this squashfs compile problem in general. « Simple filecaching of a method result in [...]
Pingback by Compling squashfs-source on Ubuntu Jaunty at XhochY english flavoured stories — June 20, 2009 @ 4:07 pm