missing prerequisite headers?
I'm trying to compile kxmame for Slackware 12 and I cannot do it without configuring with --disable-joystick.
The root of the problem can be seen during a ./configure with no options Code:
checking linux/joystick.h usability... no Thank you in advance for your help. |
Do you have kernel-headers package?
|
Yes. I even reinstalled it just in case there was a problem with it. I even tried the non-smp version just for kicks. No go.
Right now I am messing with the configure.in file and running autoconf to see if that helps. Basically, I am trying something similar to what's on this page: http://www.cs.cmu.edu/cgi-bin/info2w...0Be%20Compiled ********************************************* Edit: Well it compiled now, but that's because I think it skipped the file as shown checking for linux/joystick.h... no I had changed a section of the configure to look like Code:
if test "$enable_joystick" = auto ; then At any rate the end result of this test is that it still did not enable joystick support. All I have for options is SDL joystick, which is what I had when I configured with --disable-joystick. I know there is supposed to be another joystick option in there. |
Glad you got it to compile. Just curious though, what was shown in config.log when it didn’t configure correctly? Also, what happened if you just ignored the warning?
|
hmmm I don't think there were any extra warnings in the config.log file, but it's been overwritten by now. I'll remake it ;)
As far as what happens when I ignore the warning... Well, it doesn't compile at all. I'll setup another build environment and post the results when I tried it the original way so I can show you what's in the config.log. |
Okay, so first I untar the sources and ...
Code:
make -f Makefile.cvs Resultant output **************** Code:
This Makefile is only for the CVS repository Code:
./configure --enable-joystick config.log sections of interest (very long so I don't want to post the whole thing) ******************************* Code:
configure:33483: checking linux/joystick.h usability |
I think I just fixed it by taking out all the '64' stuff (I figured it had something to do with 64-bit machines) at the end of the joystick.h file. At least it configured without the error...
I'll report back after I compile, package, and test it. Edit: ************************************************ Well it compiled and installed just fine. kxmame detected my Logitech Gamepad upon startup and I was able to select games in the menu using it! However, when I tried to run a game it wouldn't work with my joypad. The kxmame conf GUI allows you to select if you want to have 'no joystick' or an 'SDL joystick'. It *should* also have an option for 'Standard Joystick' or something similar but it isn't there. The 'SDL joystick' option has never worked for me in this program, but the missing option does. After playing around with my copy of xmame (xmame.SDL from linuxpackages) by itself I realized that perhaps my joystick is considered a SDL joystick as xmame.SDL runs my games with -jt 5 (SDL joystick) instead of -jt 1 (Standard Joystick). The funny thing is that kxmame griped about "joytype 1 is not available" when I had selected SDL joystick! So, obviously something is wrong with this program's GUI as it isn't even sending xmame what I am telling it to! An issue for another thread perhaps... At any rate, I believe I successfully managed to compile this program with my hacks. Thanks osor for pointing out to me the obvious thing I should have done. Sometimes when you've been working on something for a long time you miss something obvious like checking the config log. Here is what the end of the original /usr/include/linux/joystick.h looked like Code:
struct JS_DATA_SAVE_TYPE_64 { Code:
#ifdef __KERNEL__ Code:
/usr/include/linux/joystick.h:131: error: expected specifier-qualifier-list before '__s64' I'm guessing probably the latter considering the problems with the GUI and the fact that I haven't seen this problem crop up thus far. |
Quote:
The overall problem is in /usr/include/asm/types.h (thats the file which should contain the typedef for __s64). The problem is that on most 32-bit architectures, there is no strict 64-bit integer type. The type long long is provided as a GNU extension (at least for C89). The header file for those architectures will neglect to define the types __s64 and __u64 if it thinks you want strict ANSI conformance (which negates any desired GNU extensions). Normally, this would not be a problem, but when the CFLAGS include the option -std=iso9899:1990 (or anything similar), the compiler will try to conform to strict ANSI C. Thus, with that combination (architecture and CFLAGS) the error is thrown when a source file tries to use __s64 or __u64. So as a conclusion (and for anyone else who has a similar problem), the fix you performed is safe on archs with 32-bit longs (you have to look at the un-sanitized header to see this, but you can take my word). If you dont happen to have root privileges, a different fix you might perform is to edit the Makefile (and remove -std=iso9899:1990 from the CFLAGS). |
osor, thanks for the great explanation! I think editing the configure file is the best solution for anyone having this problem. I just took out the "-std=iso9899:1990" part like you said and it configured just fine! The makefile of course won't have that in there now, so the rest should be all good. I'll notify the kxmame developer about this.
Thanks again for your help. It was very educational. |
Quote:
So, unfortunately, it looks like people with 32-bit machines will have to patch their joystick.h file in order to compile kxmame. I was hoping for a fix that wouldn't involve patches. Oh well. If you or anyone else can think of another way please let me know. thank you |
All times are GMT -5. The time now is 07:26 PM. |