# cdemu 0.7 compilation problems

## startail

I've been using cdemu for a while, but after updating my kernel with vanilla-sources-2.6.18-r2 i get an error with emerging cdemu 0.7.

```

>>> Source unpacked.

>>> Compiling source in /var/tmp/portage/cdemu-0.7/work/cdemu-0.7 ...

make -C /usr/src/linux SUBDIRS=/var/tmp/portage/cdemu-0.7/work/cdemu-0.7 modulesmake[1]: Entering directory `/usr/src/linux-2.6.18-rc2'

  CC [M]  /var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.o

/var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.c:642: error: unknown field dev_ioctl specified in initializer

/var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.c:642: warning: initialization makes integer from pointer without a cast

/var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.c:646: error: CDC_IOCTLS undeclared here (not in a function)

make[2]: *** [/var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.o] Error 1

make[1]: *** [_module_/var/tmp/portage/cdemu-0.7/work/cdemu-0.7] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.18-rc2'

make: *** [all] Error 2

```

I haven't changed anything vital in my kernel so I think it should work. Can someone help me out here please.

----------

## dobysirius

Same here when updating to gentoo-sources-2.6.17-r4 (from 2.6.16-r13)

```
>>> Source unpacked.

>>> Compiling source in /var/tmp/portage/cdemu-0.7/work/cdemu-0.7 ...

make -C /usr/src/linux SUBDIRS=/var/tmp/portage/cdemu-0.7/work/cdemu-0.7 modules

make[1]: Entering directory `/usr/src/linux-2.6.17-gentoo-r4'

make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

  CC [M]  /var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.o

/var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.c:642: error: unknown field `dev_ioctl' specified in initializer

/var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.c:642: warning: initialization makes integer from pointer without a cast

/var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.c:646: error: `CDC_IOCTLS' undeclared here (not in a function)

/var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.c:646: error: initializer element is not constant

/var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.c:646: error: (near initialization for `cdemu_dops.capability')

make[2]: *** [/var/tmp/portage/cdemu-0.7/work/cdemu-0.7/cdemu.o] Error 1

make[1]: *** [_module_/var/tmp/portage/cdemu-0.7/work/cdemu-0.7] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.17-gentoo-r4'

make: *** [all] Error 2

!!! ERROR: app-cdr/cdemu-0.7 failed.

Call stack:

  ebuild.sh, line 1539:   Called dyn_compile

  ebuild.sh, line 939:   Called src_compile

  cdemu-0.7.ebuild, line 23:   Called die

!!! (no error message)

!!! If you need support, post the topmost build error, and the call stack if relevant.
```

Might be a cdemu bug/problem.

----------

## .maverick

It is. There is a patch for the cvs-version of cdemu at http://cdemu.afn.no-ip.org/. I'll post the ebuild when I'm at home again.

----------

## .maverick

app-cdr/cdemu-0.7_p20060710.ebuild

```
# Copyright 1999-2005 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

inherit flag-o-matic python cvs

DESCRIPTION="mount bin/cue cd images"

HOMEPAGE="http://cdemu.org/"

LICENSE="GPL-2"

SLOT="0"

KEYWORDS="hppa ppc x86 amd64"

IUSE=""

ECVS_SERVER="cdemu.cvs.sourceforge.net:/cvsroot/cdemu"

ECVS_MODULE="cdemu"

ECVS_TOPDIR="${DISTDIR}/cvs-src/${PN}"

DEPEND="virtual/linux-sources"

RDEPEND="dev-lang/python"

S="${WORKDIR}/${ECVS_MODULE}"

src_unpack() {

   cvs_src_unpack

   cd ${S}

   epatch ${FILESDIR}/cdemu-20060710.diff.bz2

}

src_compile() {

   if [ "${KV:0:3}" == "2.6" ] && [[ `KV_to_int ${KV}` -lt `KV_to_int 2.6.6` ]] ; then

      emake KERN_DIR=/usr/src/linux BUILD_GHETTO=yes || die

   else

      env -u ARCH emake KERN_DIR=/usr/src/linux || die

   fi

}

src_install() {

   make install DESTDIR=${D} || die

   dodoc AUTHORS ChangeLog README TODO

}

pkg_postinst() {

   [ "${ROOT}" == "/" ] && depmod -a

}
```

+

app-cdr/cdemu/files/cdemu-20060710.diff.bz2

I don't know if it's good, but it works for me (amd64).

I just modified the cdemu-0.7.ebuild to use cvs and apply the patch.

----------

## xraver

I do This;

```

cd /usr/portage/app-cdr/cdemu/ 

cp cdemu-0.7.ebuild cdemu-0.8.ebuild

ebuild cdemu-0.8.ebuild digest
```

emerge cdemu works  :Wink: 

if you want the correct way, use portage-overlay

----------

## .maverick

I did the above before cdemu-0.8 was released. I also did the version bump, but since nobody answered on the last post, I didn't think there was much interest in it.

----------

## weeroona

 *.maverick wrote:*   

> I did the above before cdemu-0.8 was released. I also did the version bump, but since nobody answered on the last post, I didn't think there was much interest in it.

 

I just used the cdemu-0.7_p20060710 ebuild and it works (x86). Thanks!

----------

## Mounir Lamouri

Did a bug have been opened ? It should be great because that's work and there is only cdemu-0.7 on portage.

Edit : I see cdemu-0.8 and svn version of cdemu have been proposed on bugzilla... So, we only have to wait to have a official package working.

----------

## Mgiese

 *xraver wrote:*   

> I do This;
> 
> ```
> 
> cd /usr/portage/app-cdr/cdemu/ 
> ...

 

thx works here too

----------

## Yui

 *xraver wrote:*   

> I do This;
> 
> ```
> 
> cd /usr/portage/app-cdr/cdemu/ 
> ...

 

thx too  :Smile: 

----------

