Setting up a new Ubuntu 12.04 (64 bit) OS for SDL 2.0

I don’t know much about linux but I worked out enough to set up a fresh installation of Ubuntu 12.04 (32 bit) on 64 bit hardware and got some sample SDL 2.0 source to compile and run correctly. I then decided to do a reinstall with Ubunti 12.04 (64 bit). I compiled the same sample SDL 2.0 example but now I get “No available video device” error when calling SDL_Init(SDL_INIT_VIDEO). I have the latest AMD Radeon driver installed correctly.

I guess there’s some library package or something missing but I can’t work out what. I’ve searched and found other people reporting the same error but the solutions don’t work for me. Is there anywhere that lists all the packages that are required on a new install for SDL2.0 to work in 64 bit Ubuntu?

I note that Ubuntu installs SDL 1.2 packages automatically. Do these clash?

Make sure you downloaded the OpenGL development libraries (the
package should have “dev” in it, can’t remember the exact name).
Otherwise SDL won’t be able to use OpenGL at all. Could be something
else, but remember to check this.

SDL 1.2 shouldn’t clash anymore with SDL 2.0 (it used to with 1.3). If
the filename your SDL library ends up in 2, you should be safe.

2013/1/13, dwa :> I don’t know much about linux but I worked out enough to set up a fresh

installation of Ubuntu 12.04 (32 bit) on 64 bit hardware and got some sample
SDL 2.0 source to compile and run correctly. I then decided to do a
reinstall with Ubunti 12.04 (64 bit). I compiled the same sample SDL 2.0
example but now I get “No available video device” error when calling
SDL_Init(SDL_INIT_VIDEO). I have the latest AMD Radeon driver installed
correctly.

I guess there’s some library package or something missing but I can’t work
out what. I’ve searched and found other people reporting the same error but
the solutions don’t work for me. Is there anywhere that lists all the
packages that are required on a new install for SDL2.0 to work in 64 bit
Ubuntu?

I note that Ubuntu installs SDL 1.2 packages automatically. Do these clash?

When you build SDL2, make sure that when you run the initial cmake
step that all the video options are marked as ON, including
VIDEO_OPENGL and VIDEO_X11_*.

A quick way to make sure you’ve got all the dependencies you need is
to run “sudo apt-get build-dep libsdl1.2”; this installs the list of
build prerequisites for Ubuntu’s SDL 1.2 package, which are more or
less unchanged for SDL2. I believe it’s libgl1-mesa-dev which contains
the OpenGL headers.On Wed, Jan 16, 2013 at 11:07 AM, Sik the hedgehog <sik.the.hedgehog at gmail.com> wrote:

Make sure you downloaded the OpenGL development libraries (the
package should have “dev” in it, can’t remember the exact name).
Otherwise SDL won’t be able to use OpenGL at all. Could be something
else, but remember to check this.

SDL 1.2 shouldn’t clash anymore with SDL 2.0 (it used to with 1.3). If
the filename your SDL library ends up in 2, you should be safe.

2013/1/13, dwa :

I don’t know much about linux but I worked out enough to set up a fresh
installation of Ubuntu 12.04 (32 bit) on 64 bit hardware and got some sample
SDL 2.0 source to compile and run correctly. I then decided to do a
reinstall with Ubunti 12.04 (64 bit). I compiled the same sample SDL 2.0
example but now I get “No available video device” error when calling
SDL_Init(SDL_INIT_VIDEO). I have the latest AMD Radeon driver installed
correctly.

I guess there’s some library package or something missing but I can’t work
out what. I’ve searched and found other people reporting the same error but
the solutions don’t work for me. Is there anywhere that lists all the
packages that are required on a new install for SDL2.0 to work in 64 bit
Ubuntu?

I note that Ubuntu installs SDL 1.2 packages automatically. Do these clash?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

No, SDL 1.2 and 2.0 still conflict. The SDL library never used versioned
symbols. This makes it unsafe to use them both in the same process context.
This can easily happen when someone uses a library which is linked against SDL
(libav, libdevil, libdv ligai, libiulib, libmlt, libmupen64plus, …) and
tries to use libSDL2 at the same time (or through another library).

And yes, it is still possible to have conflicts even with correctly versioned
symbolsOn Tuesday 15 January 2013 23:14:49 sdl-request at lists.libsdl.org wrote:

SDL 1.2 shouldn’t clash anymore with SDL 2.0 (it used to with 1.3). If
the filename your SDL library ends up in 2, you should be safe.


Franz Schrober