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