linux-source-2.6.28 compile error with squashfs3.4

Asked by Ralph Ulrich on 2009-01-22

Binary package hint: linux-source-2.6.28

On Ubuntu-Jaunty I tried to compile linux-source-2.6.28-5.13 with a newer version of squashfs (version 3.4 ).
After copying squash3.4 files to /usr/src/linux/ubuntu/squashfs the compile breaks in this directory with ERROR 2
and a message: unknown TASK_NORMAL and unknown TASK_UNINTERRUPTIBLE

Where do TASK_NORMAL and TASK_UNINTERRUPTIBLE come from?
(With a vanilla kernel 2.6.28.1 I don't get this error and squashfs3.4 compiles its module.)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Solved by:
Ralph Ulrich
Solved:
2009-01-28
Last query:
2009-01-28
Last reply:
2009-01-26

Examining the information you have given us this is being converted into a question in the support tracker. We appreciate the difficulties you are facing, but it would make more sense to raise problems you are having in the support tracker rather than opening a bug report.

However to add some additional information for the issue you are seeing, I see the following being defined:

ogasawara@yoji:~/ubuntu-jaunty$ grep -n "#define TASK_NORMAL" include/linux/sched.h

191:#define TASK_NORMAL (TASK_INTERRUPTIBLE | TASK_UNINTERRUPTIBLE)

ogasawara@yoji:~/ubuntu-jaunty$ grep -n "#define TASK_UNINTERRUPTIBLE" include/linux/sched.h

175:#define TASK_UNINTERRUPTIBLE 2

Do you have the appropriate linux headers installed?

Ralph Ulrich (eulenreich) said : #2

Thank very much you Leann Ogasawara!
No, I had not installed linux headers!
I wanted them to make from linux-source-2.6.28
I thought compiling from source would be self-contained...

With linux-headers installed I can compile the kernel!

But squashfs v3.4 copied over /usr/src/linux/ubuntu/squashfs (v 3.3)
keeps to be an error:
--------------
  CC [M] ubuntu/squashfs/inode.o
ubuntu/squashfs/inode.c: In function ‘squashfs_export_iget’:
ubuntu/squashfs/inode.c:658: error: implicit declaration of function ‘d_alloc_anon’
ubuntu/squashfs/inode.c:658: warning: assignment makes pointer from integer without a cast
make[2]: *** [ubuntu/squashfs/inode.o] Error 1
make[1]: *** [ubuntu/squashfs] Error 2
make: *** [ubuntu] Error 2
-------------
I do only have the squashfs 3.4 patch for kernel 2.6.27-rc3 . Some changes had gone to happen
with now kernel 2.6.28. But I was able to mount a squashfs-image generated with mksquashfs v 3.4
with a kernel squashfs module 3.3 !

Thereby: I found a misspelling in the ubuntu squashfs - header:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/322306

Fred (staubi) said : #3

I get the same problems when trying to compile the kernel, even with "linux-headers-generic", "linux-headers-2.6.28-12" and "linux-headers-2.6.28-12-generic" installed!

So I need to install any of the squashfs packages? (sorry, but it takes about 3 hours to get to the error, so I wouldn't like to "just try" ;-)

Uwe L. Korn (uwelk) said : #4

http://xhochy.org/en/2009/06/20/compling-squashfs-source-on-ubuntu-jaunty/ explains how to fix this problem, this is already fixed in Squashfs 3.4

BTW, it's the squashfs problem. There is used implicit including of <linux/sched.h>, which depends on values of some kernel config parameters. So catching out such problem you may simply add a line to fs/squqshfs/inode.c

#include <linux/sched.h>