Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-03-2005, 10:57 AM
|
#1
|
LQ Newbie
Registered: Jun 2005
Distribution: Mandrake 10.2
Posts: 3
Rep:
|
Compiling Joystick Driver
I'm trying to compile the joystick driver. I'm using Mandrake 10.2 and I've installed the kernel source from CD3. However, when I try to make the joystick driver I get the following error;
Code:
gcc -O2 -Wall -pipe -m486 -fomit-frame-pointer -I. -D__KERNEL__ -DMODULE -DEXPORT_SYMTAB -c joystick.c -o joystick.o
In file included from /usr/include/linux/sched.h:14,
from /usr/include/linux/module.h:9,
from ./linux/joystick.h:33,
from joystick.c:40:
/usr/include/linux/cpumask.h:81: error: syntax error before "DECLARE_BITMAP"
/usr/include/linux/cpumask.h:82: error: syntax error before "_unused_cpumask_arg_"
/usr/include/linux/cpumask.h:85: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpu_set':
/usr/include/linux/cpumask.h:87: error: `cpu' undeclared (first use in this function)
/usr/include/linux/cpumask.h:87: error: (Each undeclared identifier is reported only once
/usr/include/linux/cpumask.h:87: error: for each function it appears in.)
/usr/include/linux/cpumask.h:87: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:91: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpu_clear':
/usr/include/linux/cpumask.h:93: error: `cpu' undeclared (first use in this function)
/usr/include/linux/cpumask.h:93: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:97: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_setall':
/usr/include/linux/cpumask.h:99: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:99: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:103: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_clear':
/usr/include/linux/cpumask.h:105: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:105: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:112: error: syntax error before "cpumask_t"
/usr/include/linux/cpumask.h: In function `__cpu_test_and_set':
/usr/include/linux/cpumask.h:114: error: `cpu' undeclared (first use in this function)
/usr/include/linux/cpumask.h:114: error: `addr' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:118: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_and':
/usr/include/linux/cpumask.h:121: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:121: error: `src1p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:121: error: `src2p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:121: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:125: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_or':
/usr/include/linux/cpumask.h:128: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:128: error: `src1p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:128: error: `src2p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:128: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:132: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_xor':
/usr/include/linux/cpumask.h:135: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:135: error: `src1p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:135: error: `src2p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:135: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:140: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_andnot':
/usr/include/linux/cpumask.h:143: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:143: error: `src1p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:143: error: `src2p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:143: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:147: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_complement':
/usr/include/linux/cpumask.h:150: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:150: error: `srcp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:150: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:154: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_equal':
/usr/include/linux/cpumask.h:157: error: `src1p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:157: error: `src2p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:157: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:161: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_intersects':
/usr/include/linux/cpumask.h:164: error: `src1p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:164: error: `src2p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:164: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:168: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_subset':
/usr/include/linux/cpumask.h:171: error: `src1p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:171: error: `src2p' undeclared (first use in this function)
/usr/include/linux/cpumask.h:171: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:175: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_empty':
/usr/include/linux/cpumask.h:177: error: `srcp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:177: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:181: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_full':
/usr/include/linux/cpumask.h:183: error: `srcp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:183: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:187: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_weight':
/usr/include/linux/cpumask.h:189: error: `srcp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:189: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:194: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_shift_right':
/usr/include/linux/cpumask.h:197: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:197: error: `srcp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:197: error: `n' undeclared (first use in this function)
/usr/include/linux/cpumask.h:197: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:202: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpus_shift_left':
/usr/include/linux/cpumask.h:205: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:205: error: `srcp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:205: error: `n' undeclared (first use in this function)
/usr/include/linux/cpumask.h:205: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:209: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__first_cpu':
/usr/include/linux/cpumask.h:211: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h:211: error: `srcp' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:215: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__next_cpu':
/usr/include/linux/cpumask.h:217: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h:217: error: `srcp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:217: error: `n' undeclared (first use in this function)
In file included from /usr/include/linux/sched.h:14,
from /usr/include/linux/module.h:9,
from ./linux/joystick.h:33,
from joystick.c:40:
/usr/include/linux/cpumask.h:234:5: missing binary operator before token "("
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:266: error: syntax error before '*' token
/usr/include/linux/cpumask.h: In function `__cpumask_scnprintf':
/usr/include/linux/cpumask.h:268: error: `buf' undeclared (first use in this function)
/usr/include/linux/cpumask.h:268: error: `len' undeclared (first use in this function)
/usr/include/linux/cpumask.h:268: error: `srcp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:268: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:274: error: syntax error before "cpumask_t"
/usr/include/linux/cpumask.h: In function `__cpumask_parse':
/usr/include/linux/cpumask.h:276: error: `buf' undeclared (first use in this function)
/usr/include/linux/cpumask.h:276: error: `len' undeclared (first use in this function)
/usr/include/linux/cpumask.h:276: error: `dstp' undeclared (first use in this function)
/usr/include/linux/cpumask.h:276: error: `nbits' undeclared (first use in this function)
/usr/include/linux/cpumask.h:279:5: missing binary operator before token "("
/usr/include/linux/cpumask.h: At top level:
/usr/include/linux/cpumask.h:344: error: syntax error before "cpu_possible_map"
/usr/include/linux/cpumask.h:345: error: syntax error before "cpu_online_map"
/usr/include/linux/cpumask.h:346: error: syntax error before "cpu_present_map"
/usr/include/linux/cpumask.h:348:5: missing binary operator before token "("
In file included from /usr/include/linux/list.h:7,
from /usr/include/linux/wait.h:23,
from /usr/include/asm/semaphore.h:41,
from /usr/include/linux/sched.h:18,
from /usr/include/linux/module.h:9,
from ./linux/joystick.h:33,
from joystick.c:40:
/usr/include/linux/prefetch.h: In function `prefetch_range':
/usr/include/linux/prefetch.h:64: error: `CONFIG_X86_L1_CACHE_SHIFT' undeclared (first use in this function)
In file included from /usr/include/asm/siginfo.h:4,
from /usr/include/linux/signal.h:7,
from /usr/include/linux/sched.h:26,
from /usr/include/linux/module.h:9,
from ./linux/joystick.h:33,
from joystick.c:40:
/usr/include/asm-generic/siginfo.h: At top level:
/usr/include/asm-generic/siginfo.h:59: error: size of array `_pad' is too large
In file included from /usr/include/linux/module.h:9,
from ./linux/joystick.h:33,
from joystick.c:40:
/usr/include/linux/sched.h:160: error: syntax error before "nohz_cpu_mask"
In file included from /usr/include/linux/module.h:9,
from ./linux/joystick.h:33,
from joystick.c:40:
/usr/include/linux/sched.h:241: error: syntax error before "cpumask_t"
/usr/include/linux/sched.h:262: error: syntax error before '}' token
/usr/include/linux/sched.h:553: error: syntax error before "cpumask_t"
/usr/include/linux/sched.h:577: error: syntax error before ':' token
/usr/include/linux/sched.h:617: error: syntax error before ':' token
/usr/include/linux/sched.h:695: error: syntax error before '}' token
/usr/include/linux/sched.h: In function `process_group':
/usr/include/linux/sched.h:699: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `pid_alive':
/usr/include/linux/sched.h:712: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: At top level:
/usr/include/linux/sched.h:774: error: syntax error before "cpumask_t"
/usr/include/linux/sched.h: In function `set_cpus_allowed':
/usr/include/linux/sched.h:776: error: `new_mask' undeclared (first use in this function)
/usr/include/linux/sched.h: In function `dequeue_signal_lock':
/usr/include/linux/sched.h:877: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:879: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `on_sig_stack':
/usr/include/linux/sched.h:919: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:919: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `sas_ss_flags':
/usr/include/linux/sched.h:924: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `capable':
/usr/include/linux/sched.h:935: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:936: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `mmdrop':
/usr/include/linux/sched.h:956: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: At top level:
/usr/include/linux/sched.h:973: error: 'exit_signal' redeclared as different kind of symbol
/usr/include/linux/sched.h:573: error: previous declaration of 'exit_signal' was here
/usr/include/linux/sched.h: In function `thread_group_empty':
/usr/include/linux/sched.h:1037: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `task_lock':
/usr/include/linux/sched.h:1055: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `task_unlock':
/usr/include/linux/sched.h:1060: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `set_tsk_thread_flag':
/usr/include/linux/sched.h:1068: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `clear_tsk_thread_flag':
/usr/include/linux/sched.h:1073: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `test_and_set_tsk_thread_flag':
/usr/include/linux/sched.h:1078: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `test_and_clear_tsk_thread_flag':
/usr/include/linux/sched.h:1083: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `test_tsk_thread_flag':
/usr/include/linux/sched.h:1088: error: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: At top level:
/usr/include/linux/sched.h:1191: error: syntax error before "cpumask_t"
/usr/include/linux/sched.h:1192: error: syntax error before "cpumask_t"
In file included from /usr/include/linux/module.h:22,
from ./linux/joystick.h:33,
from joystick.c:40:
/usr/include/asm/module.h:58:2: #error unknown processor family
In file included from ./linux/joystick.h:131,
from joystick.c:40:
/usr/include/linux/version.h:2:2: #error "======================================================="
/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2: #error ""
/usr/include/linux/version.h:14:2: #error "To build kernel modules please do the following:"
/usr/include/linux/version.h:15:2: #error ""
/usr/include/linux/version.h:16:2: #error " o Have the kernel sources installed"
/usr/include/linux/version.h:17:2: #error ""
/usr/include/linux/version.h:18:2: #error " o Make sure that the symbolic link"
/usr/include/linux/version.h:19:2: #error " /lib/modules/`uname -r`/build exists and points to"
/usr/include/linux/version.h:20:2: #error " the matching kernel source directory"
/usr/include/linux/version.h:21:2: #error ""
/usr/include/linux/version.h:22:2: #error " o Now copy /boot/vmlinuz.version.h to"
/usr/include/linux/version.h:23:2: #error " /lib/modules/`uname -r`/build/include/linux/version.h"
/usr/include/linux/version.h:24:2: #error ""
/usr/include/linux/version.h:25:2: #error " o When compiling, make sure to use the following"
/usr/include/linux/version.h:26:2: #error " compiler option to use the correct include files:"
/usr/include/linux/version.h:27:2: #error ""
/usr/include/linux/version.h:28:2: #error " -I/lib/modules/`uname -r`/build/include"
/usr/include/linux/version.h:29:2: #error ""
/usr/include/linux/version.h:30:2: #error " instead of"
/usr/include/linux/version.h:31:2: #error ""
/usr/include/linux/version.h:32:2: #error " -I/usr/include/linux"
/usr/include/linux/version.h:33:2: #error ""
/usr/include/linux/version.h:34:2: #error " Please adjust the Makefile accordingly."
/usr/include/linux/version.h:35:2: #error "======================================================="
In file included from joystick.c:40:
./linux/joystick.h:133:40: missing binary operator before token "("
./linux/joystick.h:137:40: missing binary operator before token "("
./linux/joystick.h:174:40: missing binary operator before token "("
joystick.c:43:26: linux/malloc.h: No such file or directory
In file included from joystick.c:44:
/usr/include/linux/mm.h: In function `can_do_mlock':
/usr/include/linux/mm.h:568: error: dereferencing pointer to incomplete type
joystick.c: In function `js_read':
joystick.c:285: error: dereferencing pointer to incomplete type
joystick.c:305: error: dereferencing pointer to incomplete type
joystick.c: In function `js_open':
joystick.c:516: error: `MOD_INC_USE_COUNT' undeclared (first use in this function)
joystick.c: In function `js_release':
joystick.c:575: error: `MOD_DEC_USE_COUNT' undeclared (first use in this function)
make: *** [joystick.o] Error 1
Anyone have any ideas on this?
|
|
|
06-04-2005, 03:49 AM
|
#2
|
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337
Rep:
|
Hi!
What kind of joypad/stick do you have?. Because I've had nothing but good experiences with Linux and USB joypads out of the box. I use myself a PS2 joypad with an USB adapter. All I had to do is to load the correct modules. E.g:
su -
modproble joydev
Then, to test your joypad, type cat /dev/js0 and press a few buttons on your joypad. If some "garbage/weird" characters are displayed on your terminal, then you know your pad is working
Good luck!
|
|
|
06-04-2005, 09:48 AM
|
#3
|
LQ Newbie
Registered: Jun 2005
Distribution: Mandrake 10.2
Posts: 3
Original Poster
Rep:
|
It's a sidewinder on the gameport. Once I got my gameport recognised correctly then I did the cat /dev/input/js0 and it seemed to work fine. I can't get it to work with xMAME though. It doesn't show in the list of the devices (only keyboard and mouse do). I guess my problem might be related to xMAME now then.
Thanks.
|
|
|
06-04-2005, 01:00 PM
|
#4
|
LQ Newbie
Registered: Jun 2005
Distribution: Mandrake 10.2
Posts: 3
Original Poster
Rep:
|
Got it going now. Re-compiled xMAME commenting out the X11_JOYNAME line and then used the jdev argument to pass /dev/input/js to xMAME at run-time and my sidewinder is detected.
|
|
|
All times are GMT -5. The time now is 09:10 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|