Package Details: sdl2-hg 2.0.4.r3.d91a2c45825e-1

Git Clone URL: (read-only)
Package Base: sdl2-hg
Description: A library for portable low-level access to video, audio and input (Version 2, development version)
Upstream URL:
Licenses: zlib
Conflicts: sdl2
Provides: sdl2
Submitter: skystrife
Maintainer: carstene1ns
Last Packager: carstene1ns
Votes: 54
Popularity: 0.000009
First Submitted: 2012-05-26 00:03
Last Updated: 2016-01-03 17:49

Required by (298)

Sources (1)

Latest Comments

Rakksor commented on 2016-10-11 10:43

It's definitely an issue with the PKGBUILD, also it can now be compiled with wayland support and cmake is not required anymore. Here is a working PKGBUILD:

shoober420 commented on 2016-10-05 04:35

I've been getting the " cannot open shared object file: no such file or directory" for about a week now. I'm not sure if this is a bug in the SDL2 dev build, or an issue with the way it's compiling.

carstene1ns commented on 2015-02-04 10:48

Since they merged in emscripten support, it seems it is now necessary to enable the shared library and usage of libdl explicitly. It should be fixed with specifying '-DSDL_SHARED=ON -DSDL_DLOPEN=ON'. Without dlopen, we would need to link directly with alsa and pulse, the error @canurabus describes.
However, I think this is a bug and should be fixed upstream.

@josefnpat, @canurabus: Please try again with this PKGBUILD.

josefnpat commented on 2015-02-04 06:26

Perhaps I am missing something, but sdl2 installs /usr/lib/, shouldn't sdl2-hg as well?

When I replace sdl2 with sdl2-hg, the .so does not exist.

Am I doing something wrong, or is the PKGBUILD missing something?

canurabus commented on 2015-01-09 22:21

This package doesn't build correctly. Here's what my build output looks like:

Scanning dependencies of target SDL2main
[100%] Building C object CMakeFiles/SDL2main.dir/src/main/dummy/SDL_dummy_main.c.o
Linking C static library libSDL2main.a

Obviously more than just SDL_dummy_main should be built. I think the flags you pass to cmake are causing strange things to happen.

I can get SDL to start building if I pass -DSDL_SHARED=ON but the build blows up when it tries to link against pulseaudio and alsa.

carstene1ns commented on 2014-04-14 02:53

Package adopted.
- reworked the dependencies to be closer to sdl2 in community repo
- switched build system to cmake again
- added version number to pkgver() function
- disabled wayland support for now (does not build)

Svenstaro commented on 2013-08-08 13:02

Looks good to me, good job.

Svenstaro commented on 2013-08-08 13:02

axper commented on 2013-08-08 13:01

Done. Thanks Svenstaro.

Svenstaro commented on 2013-08-08 12:09

Yes and they are apparently outdated. You can just put the hg repo in there directly. Check man PKGBUILD.

axper commented on 2013-08-08 12:06

What do you mean? I follow the wiki and hg PKGBUILD protoype.

Svenstaro commented on 2013-08-08 09:12

Please change the PKGBUILD to use the pacman hg support.

Svenstaro commented on 2013-08-08 09:09

Merging into sdl2-hg due to improper name of this package.

axper commented on 2013-07-26 12:54

Oops, excuse my newbiness, this was a problem with me not reading install.txt.
Everything should work fine now.

axper commented on 2013-07-26 11:24

OK try now.
Temporarily forcing version 7506, seems like it doesn't compile after that. I'll report that soon.

axper commented on 2013-07-26 10:41

Me too, seems like a problem with upstream, looking into this now.

nNa commented on 2013-07-26 10:40

I get this error while configuring the source:

axper commented on 2013-07-23 11:48

Updated to 7501.

Boohbah commented on 2013-05-30 00:44

Adopted and updated with linkmauve's PKGBUILD.

Svenstaro commented on 2013-05-29 08:37

Someone take over.

ekpyron commented on 2013-05-27 22:49

It seems that COPYING has been renamed to COPYING.txt, so you have to change

install -Dm644 ../COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"


install -Dm644 ../COPYING.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

in the PKGBUILD.

linkmauve commented on 2013-05-08 23:57

Here is a new version that fixes the bugs:

The first one (and most important) is the change in makepkg 4.1 from the _hgrepo variable to source for Mercurial repositories.
That also removed the need to copy the clone before doing anything in it, because it will be recloned from the bare repository in $startdir at each rebuild.
And then with mesa 9.1 and since quite a lot of revisions in sdl, OpenGLES works fine even with OpenGL enabled, the program then can just choose which library to use at link-time.

sl1pkn07 commented on 2013-04-14 11:07

test now

Lucas8 commented on 2013-04-14 08:25

This package does not install sdl2.m4, which is needed to install sdl2-image-hg.

computerquip commented on 2013-04-07 01:09

Here's a version I made that works for me:

Maintainer should really fix his package or drop it.

sl1pkn07 commented on 2013-03-11 16:43

"update" pkgbuild (use cmake instead configure)


bu.domino commented on 2013-01-20 15:29

It seems the site may be under construction... You can apparently fix the 404 by replacing the hgroot variable from to

talsemgeest commented on 2013-01-20 03:07

Yeah, I'm also getting a 404.

m0narch commented on 2013-01-19 13:39

Erreur 404: (du au fait que renvoie un 404 )
==> Lancer la compilation de sdl-hg ? [O/n]
==> ---------------------------------------
==> Construction et installation du paquet
==> Détermination de la dernière révision hg...

abandon : HTTP Error 404: Not Found

==> ERREUR : Une erreur inconnue est survenue. Arrêt du programme…
/usr/lib/yaourt/ : ligne 200 : 17022 Signal #1 défini par l'usager PKGDEST="$YPKGDEST" makepkg "${MAKEPKG_ARG[@]}" -s -f -p ./PKGBUILD
==> ERREUR: Makepkg n'a pas pu construire sdl-hg.
==> Relancer la compilation de sdl-hg ? [o/N]
==> -----------------------------------------

totte commented on 2012-12-25 20:26

I had to edit line 29 from "hg clone $_hgroot $_hgrepo || true" to "hg clone $_hgroot/$_hgrepo || true" in order to have it find the repository, mercurial 2.4.1.

Anonymous comment on 2012-12-20 20:48

Fififox stated that the patch is not needed - just comment out lines with source, md5sums and 3 lines below "msg "patching"" and the package builds and installs fine. In a minute I'll check if it actually works :)

bluewind commented on 2012-12-20 19:42

Please put patches into the tarball (no URL in the sources array) rather than hosting them somewhere else.

excieve commented on 2012-12-20 18:42

Looks like, which hosts the patch, is down... and nowhere else to find it. Could anyone share it please?

Thaodan commented on 2012-12-20 17:09

Please clean up the PKGBUILD

cocreature commented on 2012-09-03 20:36

Correct md5sum is 5951ce6f777608738a8d710353eddc00.

cocreature commented on 2012-09-03 20:31

Correct md5sum is cb24e491817fd36960ef6922fb2c323f.

salviati commented on 2012-08-29 15:23

==> Validating source files with md5sums...
SDL_x11_patch.diff ... FAILED
==> ERROR: One or more files did not pass the validity check!
==> ERROR: Makepkg was unable to build sdl2-hg.

Fififox commented on 2012-06-12 16:17

Hi! Thanks for making this PKGBUILD!
It seems that the problem you were patching has been corrected upstream!

Svenstaro commented on 2012-04-20 18:57

Report it upstream. I'm not doing downstream patches.

Anonymous comment on 2012-04-20 18:03

The package, when compiled, stops with the following error:

In file included from .././src/video/x11/SDL_x11dyn.c:110:0:
.././src/video/x11/SDL_x11sym.h:106:1: error: conflicting types for ‘XextAddDisplay’
/usr/include/X11/extensions/extutil.h:123:25: note: previous declaration of ‘XextAddDisplay’ was here
make: *** [build/SDL_x11dyn.lo] Error 1

Please note that, in order to solve this problem and be able to compile successfully, you've to change one header file accordingly to the following instructions, provided by this guy on Arch forums:

Svenstaro commented on 2012-02-21 14:46

All done.

ducakar commented on 2012-02-19 20:37

Please add --disable-video-opengles to configure. If OpenGL ES is found when compiling (it's a dependency of KDE at least), both OpenGL/GLX and OpenGL ES are enabled in SDL. Since SDL obviously wasn't written with this situation in mind, OpenGL window creation fails. (It initialises GLES instead of GL and then fails because GL is not initialised. See for details.)

ducakar commented on 2012-02-19 18:14

Please change licence to custom (and install COPYING file). SDL switched to ZLIB licence.

ducakar commented on 2012-02-19 18:11

Please change licence to ZLIB (and install COPYING file).

Svenstaro commented on 2012-02-05 21:39

This is a bug due to new mercurial which now returns 1 on a pull if there were no changes. I added a temporary workaround to the package but you will need to do this with a clean srcdir.

Anonymous comment on 2012-02-05 09:23

Can't install from scratch with verbatim PKGBUILD. The version-checking step clones the repo, then the source-getting step pulls the repo and fails because it's already up to date.

Svenstaro commented on 2012-01-24 14:36

Quite right.

neuromancer85 commented on 2012-01-24 14:30

I think it should provide sdl-2.0 instead of sdl-1.3 now :)

Svenstaro commented on 2012-01-24 07:09

Indeed, updated.

giniu commented on 2012-01-23 21:24

since yesterday it should be possible to install SDL 1.2 and 2.0 together - at least that's what states

Svenstaro commented on 2012-01-20 20:16


neuromancer85 commented on 2012-01-17 18:37

The build now (rev 6224) fails with this error:

configure: error:
*** When building from Mercurial you should configure and build in a
separate directory so you don't clobber SDL_revision.h

Svenstaro commented on 2011-09-12 11:59

Attention: Now installs into /opt prefix until devs figure out an official way to install both packages alongside each other.

torto commented on 2011-09-04 06:32

No, it's binary incompatible, but some code _might_ work after a recompilation
Anyways, ignore my comment, since having two versions causes weird errors when building other packages (it's not as easy as I thought to build against one specific version)

Svenstaro commented on 2011-09-04 05:30

Is SDL 1.3 not backwards-compatible?

torto commented on 2011-09-04 01:26

I've made a PKGBUILD that allows this package and sdl from extra to be installed simultaneously
To build against this version, you just need to export SDL_CONFIG="/usr/bin/sdl-config-1.3"

Svenstaro commented on 2011-07-28 20:59

This isn't out of date. It still builds without problems.