# can't compile cwiid(Wiimote)

## yoxter

i am following this tutorial (http://pelican.rsvs.ulaval.ca/mediawiki/index.php/Wiimote_on_Gentoo)

here is my error 

```
Calculating dependencies... done!

[ebuild  N    ~] app-misc/cwiid-20110107-r1  USE="python" 

Would you like to merge these packages? [Yes/No] yes

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) app-misc/cwiid-20110107-r1

 * cwiid-20110107.tar.bz2 SHA256 SHA512 WHIRLPOOL size ;-) ...                                                    [ ok ]

 * Determining the location of the kernel source code

 * Found kernel source directory:

 *     /usr/src/linux

 * Found kernel object directory:

 *     /lib/modules/3.5.7-gentoo/build

 * Found sources for kernel version:

 *     3.5.7-gentoo

 * Checking for suitable kernel configuration options...

 *   CONFIG_BT_L2CAP:    is not set when it should be.

 * Please check to make sure these options are set correctly.

 * Failure to do so may cause unexpected problems.

 * Once you have satisfied these options, please try merging

 * this package again.

 * ERROR: app-misc/cwiid-20110107-r1 failed (setup phase):

 *   Incorrect kernel configuration options

 * 

 * Call stack:

 *                  ebuild.sh, line  93:  Called pkg_setup

 *   cwiid-20110107-r1.ebuild, line  40:  Called linux-mod_pkg_setup

 *           linux-mod.eclass, line 561:  Called linux-info_pkg_setup

 *          linux-info.eclass, line 907:  Called check_extra_config

 *          linux-info.eclass, line 801:  Called die

 * The specific snippet of code:

 *              die "Incorrect kernel configuration options"

 * 

 * If you need support, post the output of `emerge --info '=app-misc/cwiid-20110107-r1'`,

 * the complete build log and the output of `emerge -pqv '=app-misc/cwiid-20110107-r1'`.

 * The complete build log is located at '/var/tmp/portage/app-misc/cwiid-20110107-r1/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/app-misc/cwiid-20110107-r1/temp/die.env'.

 * Working directory: '/var/tmp/portage/app-misc/cwiid-20110107-r1'

 * S: '/var/tmp/portage/app-misc/cwiid-20110107-r1/work/cwiid-20110107'

>>> Failed to emerge app-misc/cwiid-20110107-r1, Log file:

>>>  '/var/tmp/portage/app-misc/cwiid-20110107-r1/temp/build.log'

 * Messages for package app-misc/cwiid-20110107-r1:

 *   CONFIG_BT_L2CAP:    is not set when it should be.

 * Please check to make sure these options are set correctly.

 * Failure to do so may cause unexpected problems.

 * Once you have satisfied these options, please try merging

 * this package again.

 * ERROR: app-misc/cwiid-20110107-r1 failed (setup phase):

 *   Incorrect kernel configuration options

 * 

 * Call stack:

 *                  ebuild.sh, line  93:  Called pkg_setup

 *   cwiid-20110107-r1.ebuild, line  40:  Called linux-mod_pkg_setup

 *           linux-mod.eclass, line 561:  Called linux-info_pkg_setup

 *          linux-info.eclass, line 907:  Called check_extra_config

 *          linux-info.eclass, line 801:  Called die

 * The specific snippet of code:

 *              die "Incorrect kernel configuration options"

 * 

 * If you need support, post the output of `emerge --info '=app-misc/cwiid-20110107-r1'`,

 * the complete build log and the output of `emerge -pqv '=app-misc/cwiid-20110107-r1'`.

 * The complete build log is located at '/var/tmp/portage/app-misc/cwiid-20110107-r1/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/app-misc/cwiid-20110107-r1/temp/die.env'.

 * Working directory: '/var/tmp/portage/app-misc/cwiid-20110107-r1'

 * S: '/var/tmp/portage/app-misc/cwiid-20110107-r1/work/cwiid-20110107'

```

the problem is that L2CA is missing. but i simply can't find it on kernel, here is a screenshot

https://lh3.googleusercontent.com/-KvnvIv2TTqE/UY7moRm-elI/AAAAAAAAAHs/ZBiP3g79TBE/w934-h525-no/captura.png

if there is another way to make it work. i will hearken.

----------

## VoidMage

Well, about 1.5 years ago (around linux 3.2) that option was removed and that code was set to be built unconditionally (with CONFIG_BT).

Though given how old the package is, it would not be surprising if if didn't build/work due to other changes.

At very least, the ebuild needs a fix, but it can end up with the package being declared broken - you won't know, till you try.

----------

## yoxter

 *VoidMage wrote:*   

> Well, about 1.5 years ago (around linux 3.2) that option was removed and that code was set to be built unconditionally (with CONFIG_BT).
> 
> Though given how old the package is, it would not be surprising if if didn't build/work due to other changes.
> 
> At very least, the ebuild needs a fix, but it can end up with the package being declared broken - you won't know, till you try.

 

thanks there is another package to use wiimote ? i just need input buttons no sensor

?

----------

## datenwolf

 *VoidMage wrote:*   

> Well, about 1.5 years ago (around linux 3.2) that option was removed and that code was set to be built unconditionally (with CONFIG_BT).
> 
> Though given how old the package is, it would not be surprising if if didn't build/work due to other changes.
> 
> At very least, the ebuild needs a fix, but it can end up with the package being declared broken - you won't know, till you try.

 

Unfortunately other packages (although through layman) directly depend on cwiid, for example media-sound/ardour:3 won't compile without cwiid installed. USE="-wiimote" doesn't help in that regard.

EDIT So I did a ad-hoc modification of the ebuild and removed that L2CAP check. cwiid builds, installs and apparently works. Didn't check with my Wiimote yet, but at least programs depending on it execute, which is all I need right now.

----------

## _______0

so what and where did you modify? I tried this long ago and had the same error.

----------

## datenwolf

 *_______0 wrote:*   

> so what and where did you modify? I tried this long ago and had the same error.

 

Create a copy of the cwiid Portage package in a Portage overlay. In the ebuild modify the function pkg_setup

```

pkg_setup() {

---    CONFIG_CHECK="BT_L2CAP INPUT_UINPUT"

    linux-mod_pkg_setup

}

```

Generate a digest for the modified ebuild and use emerge as usual.

----------

