Bug 8885 - Xdmx doesn't compile in xorg-server-1.2.99.0
Summary: Xdmx doesn't compile in xorg-server-1.2.99.0
Status: RESOLVED WORKSFORME
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/DDX/dmx (show other bugs)
Version: git
Hardware: Other other
: high normal
Assignee: dmx-bugs
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-04 08:15 UTC by Bernhard Rosenkraenzer
Modified: 2010-08-09 12:52 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Bernhard Rosenkraenzer 2006-11-04 08:15:19 UTC
gcc -DHAVE_DMX_CONFIG_H -DHAVE_DIX_CONFIG_H -I../../hw/xfree86/dixmods/extmod -I/usr/src/ark/BUILD/xorg-server-1.2.99.0/Mesa/include -DXFree86Server=1 -I/usr/include/freetype2 -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/freetype2 -I../../include -I../../include -I../../Xext -I../../composite -I../../damageext -I../../xfixes -I../../Xi -I../../mi -I../../miext/shadow -I../../miext/damage -I../../render -I../../randr -I../../fb -O2 -march=i586 -mtune=i686 -fomit-frame-pointer -fweb -frename-registers -rdynamic -o 
Xdmx Xdmx-dmx.o Xdmx-dmxcb.o Xdmx-dmxcmap.o Xdmx-dmxcursor.o Xdmx-dmxdpms.o 
Xdmx-dmxextension.o Xdmx-dmxfont.o Xdmx-dmxgc.o Xdmx-dmxgcops.o Xdmx-dmxinit.o 
Xdmx-dmxinput.o Xdmx-dmxlog.o Xdmx-dmxpict.o Xdmx-dmxpixmap.o Xdmx-dmxprop.o 
Xdmx-dmxscrinit.o Xdmx-dmxshadow.o Xdmx-dmxstat.o Xdmx-dmxsync.o 
Xdmx-dmxvisual.o Xdmx-dmxwindow.o Xdmx-fbcmap.o Xdmx-miinitext.o 
Xdmx-panoramiX.o 
Xdmx-dmx_glxvisuals.o  ../../dix/.libs/libdix.a ../../config/libconfig.a ../../fb/.libs/libfb.a ../../mi/.libs/libmi.a ../../Xext/.libs/libXext.a ../../render/.libs/librender.a ../../XTrap/.libs/libxtrap.a ../../record/.libs/librecord.a ../../Xi/.libs/libXi.a ../../xkb/.libs/libxkb.a ../../xkb/.libs/libxkbstubs.a ../../miext/damage/.libs/libdamage.a ../../miext/cw/.libs/libcw.a ../../miext/shadow/.libs/libshadow.a ../../os/.libs/libos.a ../../os/.libs/libcwrapper.a 
glxProxy/libglxproxy.a input/libdmxinput.a 
config/libdmxconfig.a -lXmuu -lXext -lXrender -lX11 -lXfont -lXi -lXau -lXdmcp -lm
../../dix/.libs/libdix.a(devices.o): In function `CoreKeyboardBell':
devices.c:(.text+0x3cc9): undefined reference to `DDXRingBell'
input/libdmxinput.a(dmxinputinit.o): In function `dmxDeviceOnOff':
dmxinputinit.c:(.text+0xe9c): undefined reference to 
`miPointerGetMotionBufferSize'
dmxinputinit.c:(.text+0xeac): undefined reference to 
`miPointerGetMotionEvents'
input/libdmxinput.a(dmxinputinit.o): In function `dmxInputInit':
dmxinputinit.c:(.text+0x1e32): undefined reference to 
`miRegisterPointerDevice'
input/libdmxinput.a(dmxxinput.o): In function `ChangePointerDevice':
dmxxinput.c:(.text+0x10e): undefined reference to `miPointerGetMotionEvents'
dmxxinput.c:(.text+0x119): undefined reference to 
`miPointerGetMotionBufferSize'
collect2: ld returned 1 exit status
make[3]: *** [Xdmx] Error 1
make[3]: Leaving directory `/usr/src/ark/BUILD/xorg-server-1.2.99.0/hw/dmx'
make[2]: *** [all-recursive] Error 1
Comment 1 Daniel Stone 2007-02-27 01:34:21 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 Kevin E. Martin 2007-02-27 07:20:09 UTC
Daniel, what's the status of fixing this?  The last we talked you were going to be looking into this as part of your input rework.
Comment 3 Daniel Stone 2007-02-27 07:28:28 UTC
it's a substantial amount of work (at least as much as converting the xorg ddx was), so last i talked to the dmx guys, brian didn't have the time but said he might be able to do it, and i think alan said he might be able to as well.
Comment 4 Kevin E. Martin 2007-02-27 07:35:09 UTC
Hmmm, except that the DMX guys are me on the output side, and Rik Faith on the input side.  My expectation, based on what we discussed, was that since you rewrote the input support in the server, that you'd be fixing the parts of the tree that you broke.  I hope this hasn't changed.

I'll ask Rik to see if he has any time to look into this.  Also, I talked with Peter Hutterer and he said that he have some time to look into it, but as he's trying to finish his thesis, I don't know if he will.
Comment 5 Daniel Stone 2007-02-27 07:49:28 UTC
okay, i think that was just based off who'd committed recently (and a very rough recollection at that).  while most everything is indeed fixed, except for the input drivers which are on my todo list, dmx is such a large task that it would take an inordinate amount of time and prevent me from doing other input work (including xkb) and board work during that time, hence i was trying to see if other people could take it on first.
Comment 6 Kevin E. Martin 2007-02-27 08:23:48 UTC
OK, and as I mentioned above, I'm also looking for people who know the input code (from one angle or another) and have a good chance to work out the issues.

BTW, this bug should block the release that the input rework goes into.
Comment 7 Daniel Stone 2007-02-27 08:47:18 UTC
btw, if there's anything specific you want to know, just ask.  kinput.c is a pretty good example, basically your code looks like this.  throw away your custom event queue, and make sure you never generate your own xEvents by hand, when dealing with input events.  instead, have:

   int i, nevents;
   xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum());

followed by one of:

   nevents = GetPointerEvents(events, pDev, MotionNotify, flags, 0, 0, 3, { x, y, z });
      flags is a bitmask; POINTER_ABSOLUTE specifies absolute rather than relative motion, and POINTER_ACCELERATE (only meaningful without ABSOLUTE) will, well, accelerate it.  for dmx you probably just want ABSOLUTE.  the arg after flags is a button arg, i think, and you don't want that.
   nevents = GetPointerEvents(events, pDev, ButtonPress, flags, n, 0, 0, NULL);
   nevents = GetPointerEvents(events, pDev, ButtonRelease, flags, n, 0, 0, NULL);
      n is the button number.  change (0, 0, NULL) to (0, 3, { x, y, z }) if you have the co-ordinates for this event.  same flags as above.

   nevents = GetKeyboardEvents(events, pDev, KeyPress, n);
   nevents = GetKeyboardEvents(events, pDev, KeyRelease, n);
      n is the keycode.

followed by:
   for (i = 0; i < nevents; i++)
        mieqEnqueue(events + i);

and that's the gist of it.  GetKeyboardValuatorEvents exists for when you want to send key events with co-ordinates (GetKeyboardEvents is just a special case of GKVE), and there's also GetProximityEvents, but I don't think I've tested that.

you can also get rid of any custom motion history stuff, and just use mi's motion history.
Comment 8 Alan Hourihane 2007-03-29 01:34:52 UTC
Kevin - I might be forced into looking at this soon, but what's the status on your end ??
Comment 9 Kevin E. Martin 2007-03-29 06:07:00 UTC
(In reply to comment #8)
> Kevin - I might be forced into looking at this soon, but what's the status on
> your end ??

Sadly, I continue to have very little to no time.  Also, I know the output side well, but on the input side I was only involved at the design level, so I'm having to learn the code as well as the new input code, which is going very slowly.  Rik is very busy with work, etc. right now, so he won't have any time for a while.  So, no real progress on this front.

You might also want to ask Peter Hutterer, who expressed interest in looking into making DMX work with the new input code at XDevConf.
Comment 10 Brian Paul 2007-03-29 06:11:23 UTC
I'll take a look at this.  I don't know anything about X input but I'll see what I can make of it.  I'll probably have to pester people with questions...
Comment 11 Daniel Stone 2007-03-29 07:00:57 UTC
i think c#7 should be a pretty good summary of what needs to be done, but i'm of course happy to answer any questions anyone has doing the conversion.
Comment 12 Brian Paul 2007-03-30 14:36:13 UTC
Just a status update: as of now, Xdmx compiles and runs for the most part, but there's some strangeness.  If you click a mouse button on any screen/backend but the first, the mouse pointer warps to the center of the screen.

I'll try to get back to this next week.  In the mean time, feel free to try it out and debug the glitches.  Note, there's quite a few ErrorF() calls and #if 0 / #endif code blocks that'll have to be removed eventually, but not until after things work.
Comment 13 Brian Paul 2007-04-02 11:44:24 UTC
Update: DMX seems to be working OK now.  Only very light testing so far and lots of debug code still in place.  Might be good to have someone else test to confirm things though.
Comment 14 Brian Paul 2007-04-02 15:30:13 UTC
I seem to be stuck on one thing.  The function dmxCheckFunctionKeys() is called for every key press/release event.  This is where we check if Ctrl-Alt-Q is being pressed (or Ctrl-Alt-f/g) to exit DMX.  For some reason, dmxLocal->pDevice->key->state field never indicates that any modifier keys are pressed.  I haven't been able to figure out the problem.  I think I need some help with this.

People depend on Ctrl-Alt-Q for exiting DMX so I think it's important that this is fixed.
Comment 15 Eric Anholt 2007-09-04 17:32:02 UTC
In the absence of an active maintainer to fix issues before release, given that this server is disabled by default, clearing blocker status.
Comment 16 Brian Paul 2007-09-05 09:18:22 UTC
I found a work-around for the Ctrl-Alt-Fn key problem back in April (see hw/dmx/input/dmxevents.c::dmxCheckFunctionKeys())

AFAIK, the Xdmx server is in working condition.  Someone should probably try building it in its current state just to be sure.  I don't have time right now.
Comment 17 Adam Jackson 2010-08-09 12:52:37 UTC
Builds fine for me.


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.