Bug 16979 - xkbcomp fails to compile keymap under complex situations
Summary: xkbcomp fails to compile keymap under complex situations
Status: RESOLVED NOTABUG
Alias: None
Product: xkeyboard-config
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: xkb
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-03 16:47 UTC by SmSpillaz
Modified: 2008-08-04 05:09 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description SmSpillaz 2008-08-03 16:47:47 UTC
xkbcomp will not compile a keymap under the following situations:

installing xkeyboard-config and xkbcomp to /opt/xserver/

and doing something like /opt/xserver/bin/xkbcomp /opt/xserver/share/X11/xkb/rules/base causes it to bail out on line 19 with an error (which is the first line where the comments end)

Previous revisions up to Sep 07 and Nov 07 were tried
Comment 1 Simos Xenitellis 2008-08-03 20:48:26 UTC
I had a closer look into this.

As far as I understand, xkbcomp cannot compile files in "rules/".
Sergey, is that indeed the case?

Sam, when you run 

/opt/xserver-xir-install/bin/xkbcomp -w 10 -a -llpRh /opt/xserver-xir-install/share/X11/xkb/\*

do you get any output? Return code should be 0.

My understanding at the moment is that xkbcomp should not be invoked on "rules/base". Whichever script tries to invoke xkbcomp with "rules/base", is the one at fault.
Comment 2 SmSpillaz 2008-08-04 03:53:30 UTC
(In reply to comment #1)
> I had a closer look into this.
> 
> As far as I understand, xkbcomp cannot compile files in "rules/".
> Sergey, is that indeed the case?
> 
> Sam, when you run 
> 
> /opt/xserver-xir-install/bin/xkbcomp -w 10 -a -llpRh
> /opt/xserver-xir-install/share/X11/xkb/\*
> 
> do you get any output? Return code should be 0.
> 
> My understanding at the moment is that xkbcomp should not be invoked on
> "rules/base". Whichever script tries to invoke xkbcomp with "rules/base", is
> the one at fault.
> 

Yes I do, here is a sample:

-d------ -------- /opt/xserver-xir-install/share/X11/xkb/geometry/winbook
-d------ -------- /opt/xserver-xir-install/share/X11/xkb/types/basic
-dp----- -------- /opt/xserver-xir-install/share/X11/xkb/types/numpad
--p----- -------- /opt/xserver-xir-install/share/X11/xkb/types/numpad(mac)
--p----- -------- /opt/xserver-xir-install/share/X11/xkb/types/numpad(microsoft)
-dp----- -------- /opt/xserver-xir-install/share/X11/xkb/types/mousekeys
-dp----- -------- /opt/xserver-xir-install/share/X11/xkb/types/level5
-d------ -------- /opt/xserver-xir-install/share/X11/xkb/types/complete
-dp----- -------- /opt/xserver-xir-install/share/X11/xkb/types/iso9995
-dp----- -------- /opt/xserver-xir-install/share/X11/xkb/types/extra
--p----- -------- /opt/xserver-xir-install/share/X11/xkb/types/extra(keypad)
--p----- -------- /opt/xserver-xir-install/share/X11/xkb/types/extra(mac_keypad)
-dp----- -------- /opt/xserver-xir-install/share/X11/xkb/types/cancel
-d------ -------- /opt/xserver-xir-install/share/X11/xkb/types/default
-dp----- -------- /opt/xserver-xir-install/share/X11/xkb/types/pc
--p----- -------- /opt/xserver-xir-install/share/X11/xkb/types/caps(internal)
--p----- -------- /opt/xserver-xir-install/share/X11/xkb/types/caps(internal_nocancel)
--p----- -------- /opt/xserver-xir-install/share/X11/xkb/types/caps(shift)
--p----- -------- /opt/xserver-xir-install/share/X11/xkb/types/caps(shift_nocancel)


That looks like it is correct output. Perhaps xkbcomp should have a warning system when it is invoked on a particular file? I'll restart X to check if it works.
Comment 3 Sergey V. Udaltsov 2008-08-04 04:10:11 UTC
rules/base is not a valid file for xkbcomp. People are expected to read some docs or use GUI tools (like gnome-keyboard-properties).

> Perhaps xkbcomp should have a warning system when it is invoked on a particular file?

How? Just by the name? Or path? I'd say it would be very stupid
Comment 4 Simos Xenitellis 2008-08-04 04:25:00 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > I had a closer look into this.
> > 
...
> 
> That looks like it is correct output. Perhaps xkbcomp should have a warning
> system when it is invoked on a particular file? I'll restart X to check if it
> works.
> 

xkbcomp bails out in the flex/bison generated code when parsing "rules/base".
It would require some effort if we were to change the code there.
Comment 5 SmSpillaz 2008-08-04 05:09:05 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > I had a closer look into this.
> > > 
> ...
> > 
> > That looks like it is correct output. Perhaps xkbcomp should have a warning
> > system when it is invoked on a particular file? I'll restart X to check if it
> > works.
> > 
> 
> xkbcomp bails out in the flex/bison generated code when parsing "rules/base".
> It would require some effort if we were to change the code there.
> 

Clearly I'm misinformed then.

Regardless, your command for the xkb compiler worked and I thank you for telling me it. My VT switching is back, but some more complex things like the super key and volume keys are not at the moment. I'll revert xkbcomp and xkeyboard-rules to the most recent version and try again.

Thanks for your help. This probably isn't a bug then, just me being naive.

(Btw, 'rtfm' or that written in other words is not a helpful response, especially when the documentation I could find is convoluted and outdated ;-) )


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.