The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Setting up SDL2 on Linux Ubuntu distrobution
Josef tigertå
Guest

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?
lgm


Joined: 05 Sep 2013
Posts: 16
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. Smile

P.S. Of course, you can also download the source from the SDL website and compile it.
Setting up SDL2 on Linux Ubuntu distrobution
neoaggelos


Joined: 02 Jan 2013
Posts: 138
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 [url=https://hg.libsdl.org/SDL]https://hg.libsdl.org/SDL[/url]


-- compile and install
$ cd SDL
$ mkdir build && cd build
$ ../configure
$ make
$ sudo make install





On 16 Οκτ 2013, at 12:34 μ.μ., Josef tigertå wrote:



Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Setting up SDL2 on Linux Ubuntu distrobution
neoaggelos


Joined: 02 Jan 2013
Posts: 138
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" wrote:



Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Setting up SDL2 on Linux Ubuntu distrobution
Jan Gutter
Guest

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 <whatever>.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:
Quote:
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" 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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Setting up SDL2 on Linux Ubuntu distrobution
Josef tigertå
Guest

Thanks for all the answers!

I followed your instructions, 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
Quote:
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 <whatever>.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:
Quote:
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" 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.


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

_______________________________________________

SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Setting up SDL2 on Linux Ubuntu distrobution
Joseph Carter


Joined: 20 Sep 2013
Posts: 279
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* :)

Joseph


On Wed, Oct 16, 2013 at 02:43:20PM +0300, wrote:
Quote:
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



On 16 Οκτ 2013, at 12:34 μ.μ., Josef tigertå wrote:

Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Quote:
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Setting up SDL2 on Linux Ubuntu distrobution
neoaggelos


Joined: 02 Jan 2013
Posts: 138
What's the error?

-- Aggelos Kolaitis

On 16 Οκτ 2013, at 7:33 μ.μ., Josef tigertå wrote:



Quote:
Thanks for all the answers!

I followed your instructions, 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
Quote:
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 <whatever>.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:
Quote:
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" 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.


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

_______________________________________________

SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org






_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Setting up SDL2 on Linux Ubuntu distrobution
neoaggelos


Joined: 02 Jan 2013
Posts: 138
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" wrote:

Quote:
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* :)

Joseph


On Wed, Oct 16, 2013 at 02:43:20PM +0300, wrote:
Quote:
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



On 16 Οκτ 2013, at 12:34 μ.μ., Josef tigertå wrote:

Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Quote:
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Setting up SDL2 on Linux Ubuntu distrobution
Jonathan Greig
Guest

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 Smile
- Swyped from my droid.
Quote:
On Oct 16, 2013 11:33 AM, "Josef tigertå" wrote:

Thanks for all the answers!

I followed your instructions, 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
Quote:

Hi,

If you prefer .deb's, I've had success by cl...
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Setting up SDL2 on Linux Ubuntu distrobution
Joseph Carter


Joined: 20 Sep 2013
Posts: 279
Sorry, I got my names wrong.

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

Joseph


On Wed, Oct 16, 2013 at 08:14:53PM +0300, wrote:
Quote:
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" wrote:

Quote:
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* :)

Joseph


On Wed, Oct 16, 2013 at 02:43:20PM +0300, wrote:
Quote:
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



On 16 Οκτ 2013, at 12:34 μ.μ., Josef tigertå wrote:

Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Quote:
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list

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

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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org