# xf86-input-evdev fails to compile

## steelerguy

I am trying to build a LiveCD using spec files that worked a couple months ago.  The compile is failing on x11-drivers/xf86-input-evdev-1.1.2-r2 with this error:

```
evdev.c: In function 'EvdevSwitchMode':

evdev.c:235: error: 'SendCoreEvents' undeclared (first use in this function)

evdev.c:235: error: (Each undeclared identifier is reported only once

evdev.c:235: error: for each function it appears in.)

evdev.c:236: error: 'DontSendCoreEvents' undeclared (first use in this function)

make[2]: *** [evdev_drv_la-evdev.lo] Error 1

make[2]: Leaving directory `/var/tmp/portage/x11-drivers/xf86-input-evdev-1.1.2-r2/work/xf86-input-evdev-1.1.2/src'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/x11-drivers/xf86-input-evdev-1.1.2-r2/work/xf86-input-evdev-1.1.2'

make: *** [all] Error 2

!!! ERROR: x11-drivers/xf86-input-evdev-1.1.2-r2 failed.

Call stack:

  ebuild.sh, line 1614:   Called dyn_compile

  ebuild.sh, line 971:   Called qa_call 'src_compile'

  environment, line 3861:   Called src_compile

  ebuild.sh, line 1304:   Called x-modular_src_compile

  x-modular.eclass, line 333:   Called x-modular_src_make

  x-modular.eclass, line 328:   Called die

!!! emake failed

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

!!! A complete build log is located at '/var/tmp/portage/x11-drivers/xf86-input-evdev-1.1.2-r2/temp/build.log'.

```

After digging around I have found that /usr/include/X11/extensions/XI.h on my system contains this:

```
#define Absolute                1

/* Merged from Metrolink tree for XINPUT stuff  */

#define TS_Raw                                  57

#define TS_Scaled                               58

#define SendCoreEvents                  59

#define DontSendCoreEvents              60

/* End of merged section        */

#define ProximityState          (1L << 1)
```

While the XI.h in the build environment, /var/tmp/catalyst/tmp/default/livecd-stage1-i686-20070418/usr/include/X11/extensions/XI.h, does not have this.  It just looks like this:

```
#define Absolute                1

#define ProximityState          (1L << 1)
```

Where did this Metrolink tree stuff come from and how do I get it merged into my XI.h in my build environment?  I know I could cheat and just add those lines to the file and continue on, but I would really like to get this fixed so six months from now when I need to do this again I don't have to remember my kludge.

----------

## cybermc75

I'm experiencing exactly the same problem, but I'm a stupid newbie.

emerge --update --deep --newuse world done succesfully yesterday

emerge --depclean has nothing to do

revdep-rebuild done succesfully (now reports nothing to do)

using 2.6.20-r6 kernel (genkernel built)

I fell into the problem trying to emerge xorg-x11, that was not installed before.

I read somewhere that I need evdev enabled in the kernel. I had it linked-in.

Trying now enabling like a module, since I read in the help that this will create an evdev module, but I really don't know what I'm doing.

I really don't know what evdev is, in fact, and if/why I need it. It seems to me that it's something about Input devices: I'm using just a PS/2 mouse and a PS/2 keyboard.

Maybe I have to change something in the xorg.conf ?

-Please- help.

[... a couple of hour later] Now emerge doesn't need xf86-input-evdev anymore. Maybe the change in the kernel did something ... mumble mumble ...

P.S. 

How I can access this forum without X installed? (now using another PC)

I need that to paste on my posts info about my system.

----------

## steelerguy

I am actually a little curious why more people are not having this problem.  It appears to me that anyone running x86 should have it unless they use ~x86 for x11-proto/inputproto.  The ebuild for inputproto-1.4 does not have x86 masked.  This means you get a "bad" version of XI.h that does not include SendCoreEvents and DontSendCoreEvents.  If you get inputproto-1.4 I think you will then not be able to build xf86-input-evdev-1.1.4-r2 because it needs those defined.

This explains why I not having problems on my computer which is amd64 which is using inputproto-1.3.2 because 1.4 is still masked for amd64.  If you were to limit your version of x11-proto/inputproto to 1.3.2 I think it will work.

----------

## cybermc75

Thanks steelerguy!

I made 

emerge -C x11-proto/inputproto

emerge =x11-proto/inputproto-1.3.2

and then

emerege --resume

to resume emerging of xorg-server. Now works.

How can I mask inputproto-1.4 to prevent emerge --update to update it?

Should we open a bug in Bugzilla?

Thank you again.

----------

## steelerguy

 *cybermc75 wrote:*   

> Thanks steelerguy!
> 
> I made 
> 
> emerge -C x11-proto/inputproto
> ...

 

You should be able to put:

=x11-proto/inputproto-1.3.2 in your /etc/portage/package.mask

I was going to open a bug yesterday night and searched bugzilla first and found one that seemed to cover this issue.  If you wouldn't mind, give it a look yourself and see if you agree.

No problem...now I just wish they would put out some new ebuilds so I could build my LiveCD without hacking things up!  :Smile: 

----------

## THuLiuM

I had the same problem yesterday after inputproto update , kernel ... evdev didn't want to work and the rebuild failed.

Since i was too lazy i choosed to put my mouse mx610 to "mouse" driver back instead of  evdev.

Just have to wait a patch or newer versions of some packages i guess   :Cool: 

----------

## steelerguy

They are going to mark the newer version of evdev as stable probably later today which will also fix the problem.

So as it stands now, there appears to be two work arounds...downgrade inputproto to 1.3.2 or use the testing version of xf86-input-evdev which is 1.1.5-r1.

----------

## cybermc75

 *steelerguy wrote:*   

>  *cybermc75 wrote:*   Thanks steelerguy!
> 
> I made 
> 
> emerge -C x11-proto/inputproto
> ...

 

Ok. I put

=x11-proto/inputproto-1.4

in /etc/portage/package.mask, since it's the 1.4 version to be masked. (1.3.2 works)

Now my world is again up-to-date. But probably it's time for a new --sync ...  :Wink: 

Thank you so much for your effective support.

----------

## Kasumi_Ninja

I solved this error this way:

```
# echo "x11-drivers/xf86-input-evdev ~x86" >> /etc/portage/package.keywords
```

----------

## Killerchronic

 *Aniruddha wrote:*   

> I solved this error this way:
> 
> ```
> # echo "x11-drivers/xf86-input-evdev ~x86" >> /etc/portage/package.keywords
> ```
> ...

 

Wow! Thank you so much, that solved it completely for me.

Been stuck for the last 3 days trying to figure that one out, first happened when i emerged xorg, then again when i was compiling gnome lol

Thought i wud post that it works as others may have the same problem as me and this may solve it for them too.

Thanks again!

----------

## Kasumi_Ninja

 *Killerchronic wrote:*   

>  *Aniruddha wrote:*   I solved this error this way:
> 
> ```
> # echo "x11-drivers/xf86-input-evdev ~x86" >> /etc/portage/package.keywords
> ```
> ...

 

Glad to hear it worked   :Smile: .

----------

## stoejer

The problem still exist in amd64 with an absolutely clean install using the 2007.0 profile. Masking 1.4.1 and emerging 1.3.2 seems to make things all dandy again.

----------

## justincataldo

```
echo "x11-drivers/xf86-input-evdev ~amd64" >> /etc/portage/package.keywords
```

 worked for me.

Thanks everyone!  :Smile: 

----------

