About Store Forum Documentation Contact



Post Reply 
Emscripten with latest EE
Author Message
Houge Offline
Member

Post: #1
Emscripten with latest EE
Hi!
How can i use Emscripten if it supports VS 2010 and EE supports only VS 2015? smile
I get compilation errors when i try to use it.
03-21-2017 09:32 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Emscripten with latest EE
You need to have VS 2010 and 2015 installed.
Sorry I haven't worked with Emscripten for a long time now.
It was known to work with an older version, but I haven't checked any latest releases.
03-22-2017 03:29 AM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #3
RE: Emscripten with latest EE
Can you please check it? I installed VS 2010 and it says the following:
Code:
1>C:\Esenthel\Projects\_Build_\Web App\Emscripten\Debug DX9\Web App.pch(1,2): error : "Problem with precompiled headers. It's likely that the .gch file is not present, or you're using a combination of C and CPP files."
1>  #error "Problem with precompiled headers. It's likely that the .gch file is not present, or you're using a combination of C and CPP files."
(This post was last modified: 04-01-2017 12:22 PM by Houge.)
04-01-2017 12:22 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Emscripten with latest EE
I've just installed latest emscripten from:
https://kripken.github.io/emscripten-sit...loads.html
v 1.35.0

Recompiled the engine using Esenthel Builder - OK
Compiled a simple application using Esenthel Editor - OK
I have VS 2017 Community installed, and VS 2010

Code:
Package 'Visual C++ Package' failed to load.
1>------ Build started: Project: Application, Configuration: Release DX9 Emscripten ------
1>stdafx.cpp
1>Auto.cpp
1>Main.cpp
1>GCCLINK : warning : root:generating system library: libcxxabi.bc...
1>GCCLINK : warning : root:                                          ok
1>GCCLINK : warning : root:generating system library: libc.bc...
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\dirent\__getdents.c(​12,1): warning : alias will always resolve to __getdents even if weak definition of alias getdents is overridden [-Wignored-attributes]
1>LFS64(getdents);
1>^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(72,1​8):  note: expanded from macro 'LFS64'
1>#define LFS64(x) LFS64_2(x, x##64)
1>                 ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(69,2​3):  note: expanded from macro 'LFS64_2'
1>#define LFS64_2(x, y) weak_alias(x, y)
1>                      ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(66,4​8):  note: expanded from macro 'weak_alias'
1>        extern __typeof(old) new __attribute__((weak, alias(#old)))
1>                                                      ^
1>1 warning generated.
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\math\fma.c(276,22): warning : ^ has lower precedence than !=; != will be evaluated first [-Wparentheses]
1>                if (bits_lost != 1 ^ (int)(uhi.i & 1)) {
1>                    ~~~~~~~~~~~~~~~^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\math\fma.c(276,22):  note: place parentheses around the '!=' expression to silence this warning
1>                if (bits_lost != 1 ^ (int)(uhi.i & 1)) {
1>                                   ^
1>                    (             )
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\math\fma.c(276,22):  note: place parentheses around the ^ expression to evaluate it first
1>                if (bits_lost != 1 ^ (int)(uhi.i & 1)) {
1>                                   ^
1>                                 (                   )
1>1 warning generated.
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\mman\mmap.c(40,1): warning : alias will always resolve to __mmap even if weak definition of alias mmap is overridden [-Wignored-attributes]
1>LFS64(mmap);
1>^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(72,1​8):  note: expanded from macro 'LFS64'
1>#define LFS64(x) LFS64_2(x, x##64)
1>                 ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(69,2​3):  note: expanded from macro 'LFS64_2'
1>#define LFS64_2(x, y) weak_alias(x, y)
1>                      ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(66,4​8):  note: expanded from macro 'weak_alias'
1>        extern __typeof(old) new __attribute__((weak, alias(#old)))
1>                                                      ^
1>1 warning generated.
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\stat\statvfs.c(62,1)​: warning : alias will always resolve to __statfs even if weak definition of alias statfs is overridden [-Wignored-attributes]
1>LFS64(statfs);
1>^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(72,1​8):  note: expanded from macro 'LFS64'
1>#define LFS64(x) LFS64_2(x, x##64)
1>                 ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(69,2​3):  note: expanded from macro 'LFS64_2'
1>#define LFS64_2(x, y) weak_alias(x, y)
1>                      ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(66,4​8):  note: expanded from macro 'weak_alias'
1>        extern __typeof(old) new __attribute__((weak, alias(#old)))
1>                                                      ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\stat\statvfs.c(64,1)​: warning : alias will always resolve to __fstatfs even if weak definition of alias fstatfs is overridden [-Wignored-attributes]
1>LFS64(fstatfs);
1>^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(72,1​8):  note: expanded from macro 'LFS64'
1>#define LFS64(x) LFS64_2(x, x##64)
1>                 ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(69,2​3):  note: expanded from macro 'LFS64_2'
1>#define LFS64_2(x, y) weak_alias(x, y)
1>                      ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(66,4​8):  note: expanded from macro 'weak_alias'
1>        extern __typeof(old) new __attribute__((weak, alias(#old)))
1>                                                      ^
1>2 warnings generated.
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\stdio\fseek.c(43,1):​ warning : alias will always resolve to __fseeko even if weak definition of alias fseeko is overridden [-Wignored-attributes]
1>LFS64(fseeko);
1>^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(72,1​8):  note: expanded from macro 'LFS64'
1>#define LFS64(x) LFS64_2(x, x##64)
1>                 ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(69,2​3):  note: expanded from macro 'LFS64_2'
1>#define LFS64_2(x, y) weak_alias(x, y)
1>                      ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(66,4​8):  note: expanded from macro 'weak_alias'
1>        extern __typeof(old) new __attribute__((weak, alias(#old)))
1>                                                      ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\stdio\ftell.c(37,1):​ warning : alias will always resolve to __ftello even if weak definition of alias ftello is overridden [-Wignored-attributes]
1>LFS64(ftello);
1>^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(72,1​8):  note: expanded from macro 'LFS64'
1>#define LFS64(x) LFS64_2(x, x##64)
1>                 ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(69,2​3):  note: expanded from macro 'LFS64_2'
1>#define LFS64_2(x, y) weak_alias(x, y)
1>                      ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\libc.h(66,4​8):  note: expanded from macro 'weak_alias'
1>        extern __typeof(old) new __attribute__((weak, alias(#old)))
1>                                                      ^
1>1 warning generated.
1>1 warning generated.
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\stdio\__lockfile.c(1​4,1): warning : control reaches end of non-void function [-Wreturn-type]
1>}
1>^
1>1 warning generated.
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\stdio\__stdio_seek.c​(7,37): warning : shift count >= width of type [-Wshift-count-overflow]
1>        if (syscall(SYS__llseek, f->fd, off>>32, off, &ret, whence)<0)
1>                                           ^ ~~
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(4​4,46):  note: expanded from macro 'syscall'
1>#define syscall(...) __syscall_ret(__syscall(__VA_ARGS__))
1>                                             ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(4​1,53):  note: expanded from macro '__syscall'
1>#define __syscall(n, ...) __syscall_emscripten(n, ##__VA_ARGS__)
1>                                                    ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(4​0,56):  note: expanded from macro '__syscall_emscripten'
1>#define __syscall_emscripten(n, ...) __syscall##n(n, ##__VA_ARGS__)
1>                                                       ^
1>1 warning generated.
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\unistd\lseek.c(9,40)​: warning : shift count >= width of type [-Wshift-count-overflow]
1>        return syscall(SYS__llseek, fd, offset>>32, offset, &result, whence) ? -1 : result;
1>                                              ^ ~~
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(4​4,46):  note: expanded from macro 'syscall'
1>#define syscall(...) __syscall_ret(__syscall(__VA_ARGS__))
1>                                             ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(4​1,53):  note: expanded from macro '__syscall'
1>#define __syscall(n, ...) __syscall_emscripten(n, ##__VA_ARGS__)
1>                                                    ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(4​0,56):  note: expanded from macro '__syscall_emscripten'
1>#define __syscall_emscripten(n, ...) __syscall##n(n, ##__VA_ARGS__)
1>                                                       ^
1>1 warning generated.
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\unistd\preadv.c(10,2​6): warning : shift count >= width of type [-Wshift-count-overflow]
1>                (long)(ofs), (long)(ofs>>32));
1>                                       ^ ~~
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(6​3,52):  note: expanded from macro 'syscall_cp'
1>#define syscall_cp(...) __syscall_ret(__syscall_cp(__VA_ARGS__))
1>                                                   ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(6​0,37):  note: expanded from macro '__syscall_cp'
1>#define __syscall_cp(...) __syscall(__VA_ARGS__)
1>                                    ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(4​1,53):  note: expanded from macro '__syscall'
1>#define __syscall(n, ...) __syscall_emscripten(n, ##__VA_ARGS__)
1>                                                    ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(4​0,56):  note: expanded from macro '__syscall_emscripten'
1>#define __syscall_emscripten(n, ...) __syscall##n(n, ##__VA_ARGS__)
1>                                                       ^
1>1 warning generated.
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\unistd\pwritev.c(10,​26): warning : shift count >= width of type [-Wshift-count-overflow]
1>                (long)(ofs), (long)(ofs>>32));
1>                                       ^ ~~
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(6​3,52):  note: expanded from macro 'syscall_cp'
1>#define syscall_cp(...) __syscall_ret(__syscall_cp(__VA_ARGS__))
1>                                                   ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(6​0,37):  note: expanded from macro '__syscall_cp'
1>#define __syscall_cp(...) __syscall(__VA_ARGS__)
1>                                    ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(4​1,53):  note: expanded from macro '__syscall'
1>#define __syscall(n, ...) __syscall_emscripten(n, ##__VA_ARGS__)
1>                                                    ^
1>C:\Program Files\Emscripten\emscripten\1.35.0\system\lib\libc\musl\src\internal\syscall.h(4​0,56):  note: expanded from macro '__syscall_emscripten'
1>#define __syscall_emscripten(n, ...) __syscall##n(n, ##__VA_ARGS__)
1>                                                       ^
1>1 warning generated.
1>GCCLINK : warning : root:                                     ok
1>GCCLINK : warning : root:generating system library: dlmalloc.bc...
1>GCCLINK : warning : root:                                         ok
1>GCCLINK : warning : unresolved symbol: alcCaptureSamples
1>GCCLINK : warning : Output contains some very large functions (10370 lines in Fja), consider building source files with -Os or -Oz, and/or trying OUTLINING_LIMIT to break them up (see settings.js; note that the parameter there affects AST nodes, while we measure lines here, so the two may not match up)
1>Project.vcxproj -> C:\Esenthel\_Projects\_Build_\Application\Emscripten\Release DX9\Application.html
1>Done building project "Project.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
04-01-2017 11:29 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #5
RE: Emscripten with latest EE
I installed VS 2010 and installed latest sdk v.1.35.0, but when i try to build it from EE editor, it uses VS 2015 and fails to compile. I need manually open VS 2010 and run build. How did you manage to build from EE editor?
04-04-2017 10:08 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Emscripten with latest EE
Hi,

I don't recall doing anything special.
I think at one point I was checking some vs-tool utility ( https://github.com/juj/vs-tool ), however I can't find it in latest emscripten docs.
I'm not sure is it because of it, or because of just installing emscripten SDK.

I can set "Web" build target in EE Editor, and press Build - OK.

I can also Open the project in VS 2017, select "4) Web" as the target platform, and build from VS 2017, because the project is configured to use emscripten toolchain and build OK.

This is the output when building from VS 2017
Code:
1>------ Build started: Project: Application, Configuration: Debug DX11 Emscripten ------
1>stdafx.cpp
1>Auto.cpp
1>Main.cpp
1>GCCLINK : warning : emitted code will contain very large numbers of local variables, which is bad for performance (build to JS with -O2 or above to avoid this - make sure to do so both on source files, and during 'linking')
1>GCCLINK : warning : unresolved symbol: alcCaptureSamples
1>Project.vcxproj -> C:\Esenthel\_Projects\_Build_\Application\Emscripten\Debug DX11\Application.html
1>Done building project "Project.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
04-04-2017 11:48 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #7
RE: Emscripten with latest EE
Let me deinstall VS 2015 and install VS 2017 and check it smile
04-05-2017 08:48 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #8
RE: Emscripten with latest EE
I had the same success with VS 2015
04-05-2017 11:41 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #9
RE: Emscripten with latest EE
That's interesting. Can you please export web app to visual studio, archive the result ans send me? If it builds OK, i will investigate my local settings. If not... i don't know yet grin
04-06-2017 05:45 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #10
RE: Emscripten with latest EE
Hi,
EE Editor will export the app exactly the same on your computer and on mine.


Attached File(s)
.7z  Application.7z (Size: 116.36 KB / Downloads: 4)
04-08-2017 11:38 PM
Find all posts by this user Quote this message in a reply
Houge Offline
Member

Post: #11
RE: Emscripten with latest EE
It seems to...
Ok, thank you, i will investigate it from my side.
04-09-2017 12:56 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Prodigy Offline
Member

Post: #12
RE: Emscripten with latest EE
@Houge & Esenthel,

I am getting :
Code:
1>------ Build started: Project: EsenthelEngine, Configuration: Release GL Emscripten ------
1>Undo.cpp
1>C:\Users\Prodigy\Documents\Works\Compiling\EsenthelEngine\Engine\Source\Edit\​Undo.cpp(2): includes this header:
1>C:\Users\Prodigy\Documents\Works\Compiling\EsenthelEngine\Engine\stdafx.h(3):​ includes this header:
1>C:\Users\Prodigy\Documents\Works\Compiling\EsenthelEngine\Engine\H\EsenthelEn​gine.h(6): includes this header:
1>C:\Users\Prodigy\Documents\Works\Compiling\EsenthelEngine\Engine\H\_\headers.​h(540,16): fatal error : 'html5.h' file not found
1>      #include <html5.h>
1>               ^~~~~~~~~
1>1 error generated.
1>GCCCOMPILE : error : root:compiler frontend failed to generate LLVM bitcode, halting
1>Done building project "EsenthelEngine.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

When trying to compile the web. The path is exist, and also on visual studio 2017 i am able to open html5.h file.

@Esenthel
Is there any plan to move the web technology into web assembly ?
(This post was last modified: 06-29-2017 09:11 AM by Prodigy.)
06-29-2017 09:10 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #13
RE: Emscripten with latest EE
Hi,

Have you installed VS 2010?

Sorry, for the moment Web platform is not my focus.
I'm focusing on improving graphics quality and performance for the Desktop right now.
06-29-2017 11:43 AM
Find all posts by this user Quote this message in a reply
Prodigy Offline
Member

Post: #14
RE: Emscripten with latest EE
The same error happened on VS 2010 :-(, could you please a moment take a look at these?. Here is the modified vs-tools to run on VS 2017 https://github.com/trippleflux/vs-tool
06-29-2017 11:56 AM
Find all posts by this user Quote this message in a reply
Prodigy Offline
Member

Post: #15
RE: Emscripten with latest EE
Found out, the compilation going by using v 1.35.0 but llvm-link crashed at the end, hmm. Anyone have any idea?
06-29-2017 01:25 PM
Find all posts by this user Quote this message in a reply
Post Reply