Setting up SDL2 on Linux Ubuntu distrobution

Hi, i greatly appriciate this mailing list and hope i can contribute with
help in the future!
I’m a beginner at programming and SDL, and
i am trying to set set up SDL2 on my computer with Linux Ubuntu 12.04
installed.
As i understand, to be able to use SDL you need: SDL header & source files,
dev libaries and runtime binaries. On the libsdl.org site you can download
these for windows and mac but with linux you need to “contact your
distrbution maintainer”. With more research i understand that for Linux OS
distrobutions, SDL lib & runtime libraries are downloaded with terminal
through mercurial or cmake, but this could be incorrect?
To put it simply, how do you download/install SDL on Linux Ubuntu 12.04?

Hi
Personally, I do not use Ubuntu, so I can’t really test what I am about to propose. But since Ubuntu uses the Debian package manager, you should be able to just download the SDL2 libraries and include files via apt.
Do:

Code:
apt-cache search libsdl2

This shows you the available packages in the repo.
Then (as root) install the ones you want with:

Code:
apt-get install packagename

I just had a quick look at the Ubuntu repo through their web interface. All packages, except libsdl2-ttf, seem to be available. Hope that helps. :slight_smile:

P.S. Of course, you can also download the source from the SDL website and compile it.

Mercurial (hg) and cmake are two very different things.

However, instead of talking endless instructions, here is how you would do something like this:

[code]

– install needed tools, depencies:
– note: this will not install SDL-1.2, just fetch the appropriate deps
$ sudo apt-get build-dep libsdl1.2-dev
$ sudo apt-get install mercurial

– get the latest version
$ mkdir libraries && cd libraries
$ hg clone https://hg.libsdl.org/SDL

– compile and install
$ cd SDL
$ mkdir build && cd build
$ …/configure
$ make
$ sudo make install

[/code]On 16 ??? 2013, at 12:34 ?.?., Josef tigert? <josefcool.95 at gmail.com> wrote:

Hi, i greatly appriciate this mailing list and hope i can contribute with help in the future!
I’m a beginner at programming and SDL, and
i am trying to set set up SDL2 on my computer with Linux Ubuntu 12.04 installed.
As i understand, to be able to use SDL you need: SDL header & source files, dev libaries and runtime binaries. On the libsdl.org site you can download these for windows and mac but with linux you need to “contact your distrbution maintainer”. With more research i understand that for Linux OS distrobutions, SDL lib & runtime libraries are downloaded with terminal through mercurial or cmake, but this could be incorrect?
To put it simply, how do you download/install SDL on Linux Ubuntu 12.04?


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

I think SDL2 is not available on Ubuntu pre 13.10 - so building from source is your only choice.On 16 ??? 2013, at 2:40 ?.?., “lgm” <xxx.xxx at x-mail.net> wrote:

Hi
Personally, I do not use Ubuntu, so I can’t really test what I am about to propose. But since Ubuntu uses the Debian package manager, you should be able to just download the SDL2 libraries and include files via apt.
Do:

Code:
apt-cache search libsdl2

This shows you the available packages in the repo.
Then (as root) install the ones you want with:

Code:
apt-get install packagename

I just had a quick look at the Ubuntu repo through their web interface. All packages, except libsdl2-ttf, seem to be available. Hope that helps.

P.S. Of course, you can also download the source from the SDL website and compile it.


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

Hi,

If you prefer .deb’s, I’ve had success by cloning the repository, then running:
dpkg-buildpackage -rfakeroot -b
inside it. It builds some new .deb’s in the parent directory (so
remember to check the … directory!).

dpkg-buildpackage can be installed by:
apt-get install dpkg-dev

After the .debs have been built, just install them with:
dpkg -i .deb

One advantage: you’ll gain package management control. It really
depends on your personal taste, however.

This seems to work for SDL, SDL_image, SDL_mixer, SDL_net, SDL_rtf,
and SDL_ttf on Ubuntu 12.04.

JanOn Wed, Oct 16, 2013 at 1:46 PM, wrote:

I think SDL2 is not available on Ubuntu pre 13.10 - so building from source
is your only choice.

On 16 ??? 2013, at 2:40 ?.?., “lgm” <xxx.xxx at x-mail.net> wrote:

Hi
Personally, I do not use Ubuntu, so I can’t really test what I am about to
propose. But since Ubuntu uses the Debian package manager, you should be
able to just download the SDL2 libraries and include files via apt.
Do:

Code:
apt-cache search libsdl2

This shows you the available packages in the repo.
Then (as root) install the ones you want with:

Code:
apt-get install packagename

I just had a quick look at the Ubuntu repo through their web interface. All
packages, except libsdl2-ttf, seem to be available. Hope that helps.

P.S. Of course, you can also download the source from the SDL website and
compile it.


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


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

Thanks for all the answers!
I followed your instructions neoaggelos at gmail.com, but im stuck at
"…/configure". I am sure it is something really easy and obvious but i
don’t understand what /configure means.
Thanks again, hope i am not being annoying asking this question.

2013/10/16 Jan Gutter > Hi,

If you prefer .deb’s, I’ve had success by cloning the repository, then
running:
dpkg-buildpackage -rfakeroot -b
inside it. It builds some new .deb’s in the parent directory (so
remember to check the … directory!).

dpkg-buildpackage can be installed by:
apt-get install dpkg-dev

After the .debs have been built, just install them with:
dpkg -i .deb

One advantage: you’ll gain package management control. It really
depends on your personal taste, however.

This seems to work for SDL, SDL_image, SDL_mixer, SDL_net, SDL_rtf,
and SDL_ttf on Ubuntu 12.04.

Jan

On Wed, Oct 16, 2013 at 1:46 PM, wrote:

I think SDL2 is not available on Ubuntu pre 13.10 - so building from
source
is your only choice.

On 16 ??? 2013, at 2:40 ?.?., “lgm” <xxx.xxx at x-mail.net> wrote:

Hi
Personally, I do not use Ubuntu, so I can’t really test what I am about
to
propose. But since Ubuntu uses the Debian package manager, you should be
able to just download the SDL2 libraries and include files via apt.
Do:

Code:
apt-cache search libsdl2

This shows you the available packages in the repo.
Then (as root) install the ones you want with:

Code:
apt-get install packagename

I just had a quick look at the Ubuntu repo through their web interface.
All
packages, except libsdl2-ttf, seem to be available. Hope that helps.

P.S. Of course, you can also download the source from the SDL website and
compile it.


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


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


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

SDL 1.2’s build deps are not quite sufficient. In saucy you actually
can install libsdl2.

On anything older, you need at least these packages to build:

libdbus-1-dev libgl1-mesa-dev libglu1-mesa-dev libpulse-dev
libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev
libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev

On Linux (always the case for Ubuntu?) you also need:

libasound2-dev libts-dev libudev-dev

On a Debianish system with a FreeBSD kernel, you need:

libusb2-dev libusbhid-dev

The major change I know about from SDL 1.2 to 2.0/2.0.1 is the use of
libudev. Possibly also libdbus, but I couldn’t swear to that.
Without libudev, joysticks don’t work the way they’re supposed to on
Linux. And it’s likely that libsdl1.2’s dependencies pull in some
old cruft SDL doesn’t actually use anymore. Some of that was my
fault?I see that some of my packaging mistakes on SDL 1.2 made back
when dinosaurs ruled the earth persist to this day. sigh :slight_smile:

JosephOn Wed, Oct 16, 2013 at 02:43:20PM +0300, neoaggelos at gmail.com wrote:

Mercurial (hg) and cmake are two very different things.

However, instead of talking endless instructions, here is how you would do something like this:


>-- install needed tools, depencies:
>-- note: this will not install SDL-1.2, just fetch the appropriate deps
>$ sudo apt-get build-dep libsdl1.2-dev
>$ sudo apt-get install mercurial
>
>-- get the latest version
>$ mkdir libraries && cd libraries
>$ hg clone https://hg.libsdl.org/SDL
>
>-- compile and install
>$ cd SDL
>$ mkdir build && cd build
>$ ../configure
>$ make
>$ sudo make install
>

On 16 ??? 2013, at 12:34 ?.?., Josef tigert? <josefcool.95 at gmail.com> wrote:

Hi, i greatly appriciate this mailing list and hope i can contribute with help in the future!
I’m a beginner at programming and SDL, and
i am trying to set set up SDL2 on my computer with Linux Ubuntu 12.04 installed.
As i understand, to be able to use SDL you need: SDL header & source files, dev libaries and runtime binaries. On the libsdl.org site you can download these for windows and mac but with linux you need to “contact your distrbution maintainer”. With more research i understand that for Linux OS distrobutions, SDL lib & runtime libraries are downloaded with terminal through mercurial or cmake, but this could be incorrect?
To put it simply, how do you download/install SDL on Linux Ubuntu 12.04?


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


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

What’s the error?

– Aggelos KolaitisOn 16 ??? 2013, at 7:33 ?.?., Josef tigert? <josefcool.95 at gmail.com> wrote:

Thanks for all the answers!
I followed your instructions @Aggelos_Kolaitis, but im stuck at “…/configure”. I am sure it is something really easy and obvious but i don’t understand what /configure means.
Thanks again, hope i am not being annoying asking this question.

2013/10/16 Jan Gutter
Hi,

If you prefer .deb’s, I’ve had success by cloning the repository, then running:
dpkg-buildpackage -rfakeroot -b
inside it. It builds some new .deb’s in the parent directory (so
remember to check the … directory!).

dpkg-buildpackage can be installed by:
apt-get install dpkg-dev

After the .debs have been built, just install them with:
dpkg -i .deb

One advantage: you’ll gain package management control. It really
depends on your personal taste, however.

This seems to work for SDL, SDL_image, SDL_mixer, SDL_net, SDL_rtf,
and SDL_ttf on Ubuntu 12.04.

Jan

On Wed, Oct 16, 2013 at 1:46 PM, <@Aggelos_Kolaitis> wrote:

I think SDL2 is not available on Ubuntu pre 13.10 - so building from source
is your only choice.

On 16 ??? 2013, at 2:40 ?.?., “lgm” <xxx.xxx at x-mail.net> wrote:

Hi
Personally, I do not use Ubuntu, so I can’t really test what I am about to
propose. But since Ubuntu uses the Debian package manager, you should be
able to just download the SDL2 libraries and include files via apt.
Do:

Code:
apt-cache search libsdl2

This shows you the available packages in the repo.
Then (as root) install the ones you want with:

Code:
apt-get install packagename

I just had a quick look at the Ubuntu repo through their web interface. All
packages, except libsdl2-ttf, seem to be available. Hope that helps.

P.S. Of course, you can also download the source from the SDL website and
compile it.


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


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


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


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

Correct, but build-dep libsdl1.2-dev is easier for starters. Also, libsdl2 is for the salamander (Ubuntu 13.10), and that’s Ubuntu 12.04.

– Aggelos KolaitisOn 16 ??? 2013, at 8:10 ?.?., “T. Joseph Carter” wrote:

SDL 1.2’s build deps are not quite sufficient. In saucy you actually can install libsdl2.

On anything older, you need at least these packages to build:

libdbus-1-dev libgl1-mesa-dev libglu1-mesa-dev libpulse-dev
libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev
libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev

On Linux (always the case for Ubuntu?) you also need:

libasound2-dev libts-dev libudev-dev

On a Debianish system with a FreeBSD kernel, you need:

libusb2-dev libusbhid-dev

The major change I know about from SDL 1.2 to 2.0/2.0.1 is the use of libudev. Possibly also libdbus, but I couldn’t swear to that. Without libudev, joysticks don’t work the way they’re supposed to on Linux. And it’s likely that libsdl1.2’s dependencies pull in some old cruft SDL doesn’t actually use anymore. Some of that was my fault?I see that some of my packaging mistakes on SDL 1.2 made back when dinosaurs ruled the earth persist to this day. sigh :slight_smile:

Joseph

On Wed, Oct 16, 2013 at 02:43:20PM +0300, @Aggelos_Kolaitis wrote:

Mercurial (hg) and cmake are two very different things.

However, instead of talking endless instructions, here is how you would do something like this:


>> -- install needed tools, depencies:
>> -- note: this will not install SDL-1.2, just fetch the appropriate deps
>> $ sudo apt-get build-dep libsdl1.2-dev
>> $ sudo apt-get install mercurial
>> 
>> -- get the latest version
>> $ mkdir libraries && cd libraries
>> $ hg clone https://hg.libsdl.org/SDL
>> 
>> -- compile and install
>> $ cd SDL
>> $ mkdir build && cd build
>> $ ../configure
>> $ make
>> $ sudo make install
>> 

On 16 ??? 2013, at 12:34 ?.?., Josef tigert? <josefcool.95 at gmail.com> wrote:

Hi, i greatly appriciate this mailing list and hope i can contribute with help in the future!
I’m a beginner at programming and SDL, and
i am trying to set set up SDL2 on my computer with Linux Ubuntu 12.04 installed.
As i understand, to be able to use SDL you need: SDL header & source files, dev libaries and runtime binaries. On the libsdl.org site you can download these for windows and mac but with linux you need to “contact your distrbution maintainer”. With more research i understand that for Linux OS distrobutions, SDL lib & runtime libraries are downloaded with terminal through mercurial or cmake, but this could be incorrect?
To put it simply, how do you download/install SDL on Linux Ubuntu 12.04?


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


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


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

The …/configure is running configure from the directory above it. ./ means
the current directory and …/ means the directory above it. In Linux, when
running an executable from the same directory would be ./executableName

Hope that helps explain some :slight_smile:

  • Swyped from my droid.

Thanks for all the answers!
I followed your instructions neoaggelos at gmail.com, but im stuck at
"…/configure". I am sure it is something really easy and obvious but i
don’t understand what /configure means.
Thanks again, hope i am not being annoying asking this question.

2013/10/16 Jan Gutter On Oct 16, 2013 11:33 AM, “Josef tigert?” <josefcool.95 at gmail.com> wrote:

Hi,

If you prefer .deb’s, I’ve had success by cl…


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

Sorry, I got my names wrong.

But 12.04 backports does include libsdl2. No support in raring.

JosephOn Wed, Oct 16, 2013 at 08:14:53PM +0300, neoaggelos at gmail.com wrote:

Correct, but build-dep libsdl1.2-dev is easier for starters. Also, libsdl2 is for the salamander (Ubuntu 13.10), and that’s Ubuntu 12.04.

– Aggelos Kolaitis

On 16 ??? 2013, at 8:10 ?.?., “T. Joseph Carter” <@T_Joseph_Carter> wrote:

SDL 1.2’s build deps are not quite sufficient. In saucy you actually can install libsdl2.

On anything older, you need at least these packages to build:

libdbus-1-dev libgl1-mesa-dev libglu1-mesa-dev libpulse-dev
libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev
libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev

On Linux (always the case for Ubuntu?) you also need:

libasound2-dev libts-dev libudev-dev

On a Debianish system with a FreeBSD kernel, you need:

libusb2-dev libusbhid-dev

The major change I know about from SDL 1.2 to 2.0/2.0.1 is the use of libudev. Possibly also libdbus, but I couldn’t swear to that. Without libudev, joysticks don’t work the way they’re supposed to on Linux. And it’s likely that libsdl1.2’s dependencies pull in some old cruft SDL doesn’t actually use anymore. Some of that was my fault?I see that some of my packaging mistakes on SDL 1.2 made back when dinosaurs ruled the earth persist to this day. sigh :slight_smile:

Joseph

On Wed, Oct 16, 2013 at 02:43:20PM +0300, neoaggelos at gmail.com wrote:

Mercurial (hg) and cmake are two very different things.

However, instead of talking endless instructions, here is how you would do something like this:


>>> -- install needed tools, depencies:
>>> -- note: this will not install SDL-1.2, just fetch the appropriate deps
>>> $ sudo apt-get build-dep libsdl1.2-dev
>>> $ sudo apt-get install mercurial
>>>
>>> -- get the latest version
>>> $ mkdir libraries && cd libraries
>>> $ hg clone https://hg.libsdl.org/SDL
>>>
>>> -- compile and install
>>> $ cd SDL
>>> $ mkdir build && cd build
>>> $ ../configure
>>> $ make
>>> $ sudo make install
>>>

On 16 ??? 2013, at 12:34 ?.?., Josef tigert? <josefcool.95 at gmail.com> wrote:

Hi, i greatly appriciate this mailing list and hope i can contribute with help in the future!
I’m a beginner at programming and SDL, and
i am trying to set set up SDL2 on my computer with Linux Ubuntu 12.04 installed.
As i understand, to be able to use SDL you need: SDL header & source files, dev libaries and runtime binaries. On the libsdl.org site you can download these for windows and mac but with linux you need to “contact your distrbution maintainer”. With more research i understand that for Linux OS distrobutions, SDL lib & runtime libraries are downloaded with terminal through mercurial or cmake, but this could be incorrect?
To put it simply, how do you download/install SDL on Linux Ubuntu 12.04?


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


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


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


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