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