--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I think SDL2 is used enough that emscripten benefits from integrating the cross compiled SDL2 into master, but this could to increase in size(the cross compiled bitcode is 1.4M). Do we want to integrate this into emscripten? Thoughts?
I think SDL2 should be integrated to master. The currently
included SDL version is not useful for porting as there is no
native version.
I am still trying to get the test version to work in my project. I
was off for a couple of days but am about to resume the effort.
Regards
-Mark
NOTE: This electronic mail message may contain confidential and privileged information from HI Corporation. If you are not the intended recipient, any disclosure, photocopying, distribution or use of the contents of the received information is prohibited. If you have received this e-mail in error, please notify the sender immediately and permanently delete this message and all related copies.
On 08/07/2014 04:04, Sathyanarayanan Gunasekaran wrote:
I think SDL2 is used enough that emscripten benefits from integrating the cross compiled SDL2 into master, but this could to increase in size(the cross compiled bitcode is 1.4M). Do we want to integrate this into emscripten? Thoughts?
I think SDL2 should be integrated to master. The currently included SDL version is not useful for porting as there is no native version.
I am still trying to get the test version to work in my project. I was off for a couple of days but am about to resume the effort.
Here's more information on how to use it - http://gsathya.in/blog/mozilla/sdl2-emscripten.html
It falls at the first hurdle. "C compiler cannot create executables". What am I doing wrong?
$ emconfigure ./configure --host=asmjs-unknown-emscripten
--disable-assembly --disable-threads --enable-cpuinfo=false
CFLAGS="-O2"
cygwin warning:
MS-DOS style path detected: C:/Program
Files/Emscripten/clang/e1.21.0_64bit/pnacl-clang
Preferred POSIX equivalent is: /cygdrive/c/Program
Files/Emscripten/clang/e1.21.0_64bit/pnacl-clang
CYGWIN environment variable option "nodosfilewarning" turns off
this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
DEBUG root: JAVA not defined in ~/.emscripten, using "java"
checking build system type... x86_64-unknown-cygwin
checking host system type... asmjs-unknown-emscripten
checking how to print strings... printf
checking for asmjs-unknown-emscripten-gcc... /cygdrive/c/Program
Files/Emscripten/emscripten/1.21.0/emcc
checking whether the C compiler works... no
configure: error: in
`/cygdrive/c/Users/callow_mark/GitHub/SDL-emscripten':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR root: Configure step failed with non-zero return code 77!
Command line: ['./configure', '--host=asmjs-unknown-emscripten',
'--disable-assembly', '--disable-threads',
'--enable-cpuinfo=false', 'CFLAGS=-O2']
--
I've been working on porting SDL2 to emscripten with help from
Daft-Freak. It's in a usable state and almost all of the SDL2 tests[0]
have been ported over. The changes are going to be up streamed to SDL2
soon[1].
I think SDL2 is used enough that emscripten benefits from integrating
the cross compiled SDL2 into master, but this could to increase in
size(the cross compiled bitcode is 1.4M). Do we want to integrate this
into emscripten? Thoughts?
So it goes from 372K to 1.3MB, when moving to SDL2? That seems very high. Not on topic for this thread, but we should investigate why it's so big.
In summary, here are some options here:
1. Merge SDL2 into our main repo. People just grab emscripten, and can then build with -lSDL2 and it works. This is what we do with libc, libc++abi, libc++ (and some JS-implemented libraries like SDL1.3, glew, glut, etc.). This seems easiest for everyone.
2. Keep our SDL2 fork in a separate repo by itself. People need to grab it manually and link with it.
3. Keep our SDL2 fork in a separate repo of ported projects, that has some system for making it convenient to use. That is, there is an easy way to get and build and integrate with emcc any of the projects there.
I prefer option 1 and as Chad said, it should replace SDL 1.3
since that is now a non-existent version in native. You won't find
it at libsdl.org. I think 2 is unacceptable given that we need to
replace SDL 1.3.
As mentioned this is being done with upstream.
But the question here is whether we should import a copy SDL2 into our repo, or use a separate repo, where people would need to download it separately. I don't think the separate repo can be SDL upstream since we might need some fix before it gets reviewed and merged there, so we do need a fork. So the question is, should our fork be in the main emscripten repo, or in another.
There has been discussion in the past about a "package manager" or "package repo" system, specifically empkg by LCID Fire. That approach didn't get much interest at the time from the community (and I admit to have been too busy back then to get into it), and seems to have been taken down meanwhile. But perhaps this is a good time to revisit it.
In summary, here are some options here:1. Merge SDL2 into our main repo. People just grab emscripten, and can then build with -lSDL2 and it works. This is what we do with libc, libc++abi, libc++ (and some JS-implemented libraries like SDL1.3, glew, glut, etc.). This seems easiest for everyone.
2. Keep our SDL2 fork in a separate repo by itself. People need to grab it manually and link with it.
3. Keep our SDL2 fork in a separate repo of ported projects, that has some system for making it convenient to use. That is, there is an easy way to get and build and integrate with emcc any of the projects there.
I would recommend going for option 1), because CMake is a better cross-platform configure tool than configure.
Sathya,
Will you modify SDL's cmake files so they can be used to
configure Emscripten builds?
--
I would recommend we don't copy SDL2 source tree to Emscripten repository, because we will lose history, and we'll become detached of SDL2 updates. Instead, I'd recommend we write a script that git clones+pulls+checkouts+builds the SDL2 repository from a known good fork+branch. This gives an easy update path for each developer, but also keeps it simple (run one script at first setup) if people just want the latest master.
+1.