🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
4.2 KiB

  1. Linux
  2. ================================================================================
  3. By default SDL will only link against glibc, the rest of the features will be
  4. enabled dynamically at runtime depending on the available features on the target
  5. system. So, for example if you built SDL with Xinerama support and the target
  6. system does not have the Xinerama libraries installed, it will be disabled
  7. at runtime, and you won't get a missing library error, at least with the
  8. default configuration parameters.
  9. Build Dependencies
  10. --------------------------------------------------------------------------------
  11. Ubuntu 20.04, all available features enabled:
  12. sudo apt-get install build-essential git make cmake autoconf automake \
  13. libtool pkg-config libasound2-dev libpulse-dev libaudio-dev libjack-dev \
  14. libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
  15. libxinerama-dev libxxf86vm-dev libxss-dev libgl1-mesa-dev libdbus-1-dev \
  16. libudev-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
  17. fcitx-libs-dev libsamplerate0-dev libsndio-dev libwayland-dev \
  18. libxkbcommon-dev libdrm-dev libgbm-dev
  19. Fedora 35, all available features enabled:
  20. sudo yum install gcc git-core make cmake autoconf automake libtool \
  21. alsa-lib-devel pulseaudio-libs-devel nas-devel pipewire-devel \
  22. libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \
  23. libXi-devel libXinerama-devel libXxf86vm-devel libXScrnSaver-devel \
  24. dbus-devel ibus-devel fcitx-devel systemd-devel mesa-libGL-devel \
  25. libxkbcommon-devel mesa-libGLES-devel mesa-libEGL-devel vulkan-devel \
  26. wayland-devel wayland-protocols-devel libdrm-devel mesa-libgbm-devel \
  27. libusb-devel pipewire-jack-audio-connection-kit-devel libdecor-devel \
  28. libsamplerate-devel
  29. NOTES:
  30. - This includes all the audio targets except arts and esd, because Ubuntu
  31. (and/or Debian) pulled their packages, but in theory SDL still supports them.
  32. The sndio audio target is also unavailable on Fedora.
  33. - libsamplerate0-dev lets SDL optionally link to libresamplerate at runtime
  34. for higher-quality audio resampling. SDL will work without it if the library
  35. is missing, so it's safe to build in support even if the end user doesn't
  36. have this library installed.
  37. - DirectFB isn't included because the configure script (currently) fails to find
  38. it at all. You can do "sudo apt-get install libdirectfb-dev" and fix the
  39. configure script to include DirectFB support. Send patches. :)
  40. Joystick does not work
  41. --------------------------------------------------------------------------------
  42. If you compiled or are using a version of SDL with udev support (and you should!)
  43. there's a few issues that may cause SDL to fail to detect your joystick. To
  44. debug this, start by installing the evtest utility. On Ubuntu/Debian:
  45. sudo apt-get install evtest
  46. Then run:
  47. sudo evtest
  48. You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX"
  49. Now run:
  50. cat /dev/input/event/XX
  51. If you get a permission error, you need to set a udev rule to change the mode of
  52. your device (see below)
  53. Also, try:
  54. sudo udevadm info --query=all --name=input/eventXX
  55. If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it,
  56. you need to set up an udev rule to force this variable.
  57. A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks
  58. like:
  59. SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
  60. SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
  61. You can set up similar rules for your device by changing the values listed in
  62. idProduct and idVendor. To obtain these values, try:
  63. sudo udevadm info -a --name=input/eventXX | grep idVendor
  64. sudo udevadm info -a --name=input/eventXX | grep idProduct
  65. If multiple values come up for each of these, the one you want is the first one of each.
  66. On other systems which ship with an older udev (such as CentOS), you may need
  67. to set up a rule such as:
  68. SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1"