# CDFS Kernel Module Failure to build

## marrowhk

I'm getting this error on a kernel bump (otherwise been using CDFS for a while with gentoo sources).

Is this error a bug or a fixable problem? Any ideas, anyone  :Question: 

EMERGE

```
sys-fs/cdfs-2.6.23 
```

ERROR

```
Unable to emake HOSTCC=i686-pc-linux-gnu-gcc CC=i686-pc-linux-gnu-gcc LDFLAGS=  KDIR="/usr/src/linux" all
```

KERNEL

```
2.6.25-gentoo-r1
```

UNRESOLVED:

I can't figure out the changes needed in the ebuild to get this to compile so i shall silently leave CDFS and switch over to vcdimager's vcdxrip cli to rip my old vcds.  Shame cdfs isn't natively included in the kernel.

----------

## the.drizzle

I occasionally use this really handy module myself sometimes, and just went to install it now.  I get the exact same error--did you manage to fix it?

----------

## pappy_mcfae

Did you symlink the kernel source your using to /usr/src/linux? It looks like you missed that step.

Use this command:

```
ln -sT /usr/src/<your_src_dir> /usr/src/linux
```

where <your_src_dir> is the actual source directory for the kernel source you're using.

Blessed be!

Pappy

----------

## the.drizzle

That was done during the initial install, as per the handbook:

```

$ ls -la /usr/src/linux

lrwxrwxrwx 1 root root 22 Aug 17 11:48 /usr/src/linux -> linux-2.6.25-gentoo-r7

```

----------

## the.drizzle

Hrmmm...  I've tried to make this module directly from the source, so that I could see the errors better, and they all seem to be stemming from one spot.  In particular, the error code is:

```
$ sudo make

make -C /lib/modules/2.6.25-gentoo-r7/build SUBDIRS=/home/drizzle/cdfs-2.6.23 modules

make[1]: Entering directory `/usr/src/linux-2.6.25-gentoo-r7'

  CC [M]  /home/drizzle/cdfs-2.6.23/root.o

/home/drizzle/cdfs-2.6.23/root.c: In function 'cdfs_fill_super':

/home/drizzle/cdfs-2.6.23/root.c:364: error: implicit declaration of function 'iget'

/home/drizzle/cdfs-2.6.23/root.c:364: warning: passing argument 1 of 'd_alloc_root' makes pointer from integer without a cast

/home/drizzle/cdfs-2.6.23/root.c: In function 'cdfs_lookup':

/home/drizzle/cdfs-2.6.23/root.c:462: warning: assignment makes pointer from integer without a cast

/home/drizzle/cdfs-2.6.23/root.c: At top level:

/home/drizzle/cdfs-2.6.23/root.c:544: error: unknown field 'read_inode' specified in initializer

/home/drizzle/cdfs-2.6.23/root.c:544: warning: initialization from incompatible pointer type

make[2]: *** [/home/drizzle/cdfs-2.6.23/root.o] Error 1

make[1]: *** [_module_/home/drizzle/cdfs-2.6.23] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.25-gentoo-r7'

make: *** [all] Error 2

```

the lines of code that are failing are 

```

  sb->s_root   = d_alloc_root(iget(sb, 0));      /* 364 */

static struct super_operations cdfs_ops = {    /* 544 */

  .read_inode = cdfs_read_inode,

  .put_super  = cdfs_umount,

  .statfs     = cdfs_statfs

};

```

Which doesn't mean much of anything to me, as I know only a very, very minimal amount of C.  But, for some reason this is striking me as needing somethig really minor to fix it; anyone have any ideas?

Cheers!

----------

## the.drizzle

Hello!

Sorry to bump this yet again, but does anyone know how I could go about fixing this?  At least a shove in the right direction...   :Confused: 

Thanks!

----------

## fred0

Hi,

cdfs and kernel version must be the same.

 *the.drizzle wrote:*   

> make[1]: Entering directory `/usr/src/linux-2.6.25-gentoo-r7' 

 In this case you should use sys-fs/cdfs-2.6.25. Because this version does not exists. You must downgrade your kernel.

Actually, last version of cdfs is 2.6.27 but she is not yet in portage tree. Make an overlay for use this version.

----------

