This is an archive of the old community forums, please visit the new site at openfl.org or the new community at community.openfl.org.

Linux target: could not initialize SDL

I've upgraded to latest openfl&libs today and now i get this error every time i try to run compiled app: [code] Could not initialize SDL : No available video device [/code] Ubuntu 12.03, 32bit. Any ideas?

Viewing 1 to 15 (15 Total)
Linux target: could not initialize SDL

RealyUniqueName

RealyUniqueName
Total Posts: 222
Joined: February 23, 2012

I've upgraded to latest openfl&libs today and now i get this error every time i try to run compiled app:

Could not initialize SDL : No available video device

Ubuntu 12.03, 32bit.

Any ideas?

Tags:
Posted on October 30, 2013 at 4:32 AM

singmajesty

singmajesty
Total Posts: 2819
Joined: August 25, 2011

Re: Linux target: could not initialize SDL

Are you running a 32-bit copy of Ubuntu, or are running a 32-bit application on 64-bit Ubuntu? Thanks!

Posted on October 30, 2013 at 8:31 AM

dynax

dynax
Total Posts: 22
Joined: December 27, 2012

Re: Linux target: could not initialize SDL

I've encountered similar issue on 32bit Ubuntu.

Posted on October 30, 2013 at 9:01 AM

RealyUniqueName

RealyUniqueName
Total Posts: 222
Joined: February 23, 2012

Re: Linux target: could not initialize SDL

32bit Ubuntu

Posted on October 30, 2013 at 10:25 AM

RealyUniqueName

RealyUniqueName
Total Posts: 222
Joined: February 23, 2012

Re: Linux target: could not initialize SDL

Still no luck with linux target. Any ideas?

Posted on November 2, 2013 at 11:23 AM

dynax

dynax
Total Posts: 22
Joined: December 27, 2012

Re: Linux target: could not initialize SDL

Downgrade to an old version of OpenFL smiling

Posted on November 2, 2013 at 11:26 AM

singmajesty

singmajesty
Total Posts: 2819
Joined: August 25, 2011

Re: Linux target: could not initialize SDL

Could you try "haxelib upgrade" to get the latest versions, or if you are building from source, make sure you update "openfl-native-dev" and clean rebuild

Posted on November 2, 2013 at 11:27 AM

singmajesty

singmajesty
Total Posts: 2819
Joined: August 25, 2011

Re: Linux target: could not initialize SDL

We build both 32- and 64-bit binaries from a 64-bit Linux install. After further testing, I found that the 32-bit version failed to configure with the needed dependency libraries, so it was building SDL2 without X11/graphic support. The current release should work on 32-bit, it's been tested and confirmed to work on a pure 32-bit install as well as from a 64-bit install (which was failing before)

Posted on November 2, 2013 at 11:29 AM

RealyUniqueName

RealyUniqueName
Total Posts: 222
Joined: February 23, 2012

Re: Linux target: could not initialize SDL

Still the same error after haxelib upgrade.
What are the dependencies? Do i need to have libsdl2 installed?

Posted on November 2, 2013 at 11:57 AM

RealyUniqueName

RealyUniqueName
Total Posts: 222
Joined: February 23, 2012

Re: Linux target: could not initialize SDL

Still no luck with openfl-1.1.1 and openfl-native-1.1.4 smiling

I've found a workaround: installing SDL2 on host machine:http://blog.stablex.ru/2013/11/06/openfl-1-1-linux-target-bug-could...
But it's better to fix this issue in OpenFL.

Posted on November 6, 2013 at 6:21 AM

dukope

dukope
Total Posts: 18
Joined: March 5, 2013

Re: Linux target: could not initialize SDL

I've found a workaround: installing SDL2 on host machine:http://blog.stablex.ru/2013/11/06/openfl-1-1-linux-target-bug-could...


Unfortunately, this didn't work for me.

I recall "openfl setup linux" (openfl-1.1.1) installing SDL1.2 libs which seems weird if openfl is SDL2 by default now. I followed your steps to install SDL2 so now both SDL1.2 and SDL2 are on my system (Ubuntu 12.10 32-bit running in a VM) but I get the same error: "Could not initialize SDL : No available video device".

Posted on November 12, 2013 at 6:59 AM

dukope

dukope
Total Posts: 18
Joined: March 5, 2013

Re: Linux target: could not initialize SDL

I finally got past this error by building openfl-native-dev locally following the instructions here:

http://github.com/openfl/openfl-native...

Also, it wasn't enough to just rebuild linux, I had to also rebuild the tools:

openfl rebuild linux,tools

Funny thing is, now I can even switch off the dev branches for everything and it still compiles/runs properly. Maybe the dev stuff installed a required library?

Posted on November 13, 2013 at 3:55 AM

cambiata

cambiata
Total Posts: 39
Joined: November 4, 2011

Re: Linux target: could not initialize SDL

Hi!

I just installed Elementary OS (basedn on Ubuntu 12.04 LTS), both 32-bit and 64-bit, and had the same SDL problem on both.
Both cases solved by building openfl-native-dev as suggested by dukope. smiling

Thanks!

Posted on November 21, 2013 at 7:12 AM

dukope

dukope
Total Posts: 18
Joined: March 5, 2013

Re: Linux target: could not initialize SDL

Sorry, forgot to followup here. This issue actually originates with the static SDL2 libraries that OpenFL builds and links.

The simplest way I found to "fix" the problem on my dev machine with a fresh Ubuntu was: sudo apt-get install libxext-dev

So you don't need to rebuild openfl-native-dev from source at least.

Luckily, one of the SDL2 maintainers had a look and fixed the problem for SDL2.0.1 (or so). Hopefully that fix will get integrated back into OpenFL soon so end-users won't be required to install anything dev-related.

Posted on November 21, 2013 at 8:22 AM

cambiata

cambiata
Total Posts: 39
Joined: November 4, 2011

Re: Linux target: could not initialize SDL

Even better! Works on both 32-bit and 64-bit Elementary OS, so I guess it works on the Ubuntus too..!
Thanks again, dukope!

Posted on November 22, 2013 at 7:05 AM