README-linux.txt 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. ================================================================================
  2. Simple DirectMedia Layer for Linux
  3. ================================================================================
  4. By default SDL will only link against glibc, the rest of the features will be
  5. enabled dynamically at runtime depending on the available features on the target
  6. system. So, for example if you built SDL with Xinerama support and the target
  7. system does not have the Xinerama libraries installed, it will be disabled
  8. at runtime, and you won't get a missing library error, at least with the
  9. default configuration parameters.
  10. ================================================================================
  11. Build Dependencies
  12. ================================================================================
  13. Ubuntu 13.04, all available features enabled:
  14. sudo apt-get install build-essential mercurial make cmake autoconf automake \
  15. libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
  16. libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
  17. libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
  18. libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev
  19. NOTES:
  20. - This includes all the audio targets except arts, because Ubuntu pulled the
  21. artsc0-dev package, but in theory SDL still supports it.
  22. - DirectFB isn't included because the configure script (currently) fails to find
  23. it at all. You can do "sudo apt-get install libdirectfb-dev" and fix the
  24. configure script to include DirectFB support. Send patches. :)
  25. ================================================================================
  26. Joystick does not work
  27. ================================================================================
  28. If you compiled or are using a version of SDL with udev support (and you should!)
  29. there's a few issues that may cause SDL to fail to detect your joystick. To
  30. debug this, start by installing the evtest utility. On Ubuntu/Debian:
  31. sudo apt-get install evtest
  32. Then run:
  33. sudo evtest
  34. You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX"
  35. Now run:
  36. cat /dev/input/event/XX
  37. If you get a permission error, you need to set a udev rule to change the mode of
  38. your device (see below)
  39. Also, try:
  40. sudo udevadm info --query=all --name=input/eventXX
  41. If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it,
  42. you need to set up an udev rule to force this variable.
  43. A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks
  44. like:
  45. SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
  46. SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
  47. You can set up similar rules for your device by changing the values listed in
  48. idProduct and idVendor. To obtain these values, try:
  49. sudo udevadm info -a --name=input/eventXX | grep idVendor
  50. sudo udevadm info -a --name=input/eventXX | grep idProduct
  51. If multiple values come up for each of these, the one you want is the first one of each.
  52. On other systems which ship with an older udev (such as CentOS), you may need
  53. to set up a rule such as:
  54. SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1"