About Store Forum Documentation Contact



Post Reply 
Emscripten error
Author Message
Prodigy Offline
Member

Post: #1
Emscripten error
How to properly build the engine?, i am using visual studio 2012, with emscripten 1.27 sdk but stopped at compiling for web
[Image: wK2s54i.png]

How to fix this warning
Code:
C:\Users\Prodigy\Documents\tmp\EsenthelEngine-master\Engine\EsenthelEngine.vcxproj : warning  : Platform 'Emscripten' referenced in the project file 'EsenthelEngine' cannot be found.
12-26-2014 05:18 PM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #2
RE: Emscripten error
Did you install Emscripten? Per the documentation:
Quote:Web

Creating applications for Web is supported from Windows platform.



Please download and install Emscripten (please select Web or Full Installer so it will automatically set its paths, but not the Portable version).

Emscripten is a technology allowing to convert C++ codes into JavaScript.

Once you have installed Emscripten, you can specify "Web JS" build platform in Esenthel Editor, and start creating apps for Web.

You should probably also have put this in the source forum.
12-26-2014 05:34 PM
Find all posts by this user Quote this message in a reply
Prodigy Offline
Member

Post: #3
RE: Emscripten error
How to make compile for web then?, the EsenthelEngine.bc doesn't exist in engine folder. How to get access into source forums?.
12-26-2014 06:07 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
RE: Emscripten error
Hello,

The Error "emscripten, llvm and clang versions do not match.." looks like it could have something to do with this.
Looks like this is an issue related to your emscripten/llvm/clang installation.

I'd try looking around emscripten website
https://github.com/kripken/emscripten
http://kripken.github.io/emscripten-site/
or google for something related to this issue.

You mention you have 1.27 Emscripten SDK, please try installing the one from the main website (1.25) :
http://kripken.github.io/emscripten-site...-downloads

Please try using the installer (not portable) versions.
12-27-2014 12:31 AM
Find all posts by this user Quote this message in a reply
Prodigy Offline
Member

Post: #5
RE: Emscripten error
I have already using the emsdk installer, now reinstalling it, now the error mentioned "EsenthelEngine.bc" no such file or directory.
[Image: K5BXeyn.png]

@aceio76 running Essentel builder as administrator also returning the same error as above.
(This post was last modified: 12-27-2014 09:11 AM by Prodigy.)
12-27-2014 09:07 AM
Find all posts by this user Quote this message in a reply
Prodigy Offline
Member

Post: #6
RE: Emscripten error
Probably related with this warning " warning : Platform 'Emscripten' referenced in the project file 'EsenthelEngine' cannot be found. ", on visual studio 2013 i cannot edit or view emscripten platform!

[Image: PcpPwYq.png]

Afaik from what i have understand the build process will invoke emcc.bat from the emscripten build platform on visual studio?, then the project convertion from visual studio 2008 into visual studio 2013 doesn't work properly. Because i have tried building Release_|Emscripten and rename EsenthelEngine.lib into EsenthelEngine.bc it will error when building the weblib

[Image: 9AUQOrx.png]

@Esenthel
Would you please try it yourself with visual studio 2013?, i think you need to recreate emscripten build platform on visual studio 2013?.
12-27-2014 04:48 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #7
RE: Emscripten error
Hello,

I have VS 2013 installed and I have platform 'emscripten' available.

Perhaps the problem is around here:
The VS-Tool utility http://kripken.github.io/emscripten-site...rm-vs-tool
needs to be installed, which I think is bundled with emscripten installation, however from the vs-tool readme I see the following:
Quote:vs-tool is a Visual Studio 2010 plugin for integrating MinGW, Clang and Emscripten into the VS IDE. The plugin is automatically added by the Windows NSIS Installer Emscripten SDK if Visual Studio 2010 is present on the target system.
Perhaps you need to install VS 2010, and then install emscripten after that.

On my system I had already installed VS 2008, 2010, 2012, 2013.
After that I've installed Emscripten SDK and things just work.

Please let me know if this helps, if yes, then I'll add this information to the documentation, saying that VS 2010 needs to be installed before installing Emscripten.
Do any other users here faced the same problem with emscripten installation?
12-28-2014 12:06 AM
Find all posts by this user Quote this message in a reply
Prodigy Offline
Member

Post: #8
RE: Emscripten error
Yup, vstools seems to be culprit, i need to use VS 2010 manually to build web, but building weblibs seems have some quirks, i think you cannot output with the same file name, you need to -o it into different file name and after finished rename back to EsenthelEngine.bc. Now i have batch script to manually build it :
Code:
emcc Engine\EsenthelEngine.bc ThirdPartyLibs\Bullet\Windows\Emscripten\Release\BulletCollision.bc ThirdPartyLibs\Bullet\Windows\Emscripten\Release\BulletDynamics.bc ThirdPartyLibs\Bullet\Windows\Emscripten\Release\LinearMath.bc ThirdPartyLibs\Jpeg\Windows\Emscripten\Release\Jpeg.bc ThirdPartyLibs\LZ4\Windows\Emscripten\Release\LZ4.bc ThirdPartyLibs\LZMA\Windows\Emscripten\Release\Lzma.bc ThirdPartyLibs\Mpg123\Windows\Emscripten\Release_Generic\mpg123.bc ThirdPartyLibs\Ogg\Windows\Emscripten\Release\Ogg.bc "ThirdPartyLibs\Png\Windows\Emscripten\LIB Release\Png.bc" ThirdPartyLibs\Recast\Windows\Emscripten\Release\Recast.bc ThirdPartyLibs\Snappy\Windows\Emscripten\Release\snappy.bc ThirdPartyLibs\SQLite\Windows\Emscripten\Release\SQLite.bc ThirdPartyLibs\Theora\Windows\Emscripten\Release\Theora.bc ThirdPartyLibs\Vorbis\Windows\Emscripten\Release\Vorbis.bc "ThirdPartyLibs\Vorbis\Windows\Emscripten\Release\Vorbis File.bc" ThirdPartyLibs\Webp\Windows\Emscripten\Release\WebP.bc ThirdPartyLibs\Zlib\Windows\Emscripten\Release\Zlib.bc -o Engine\EsenthelEngineFull.bc

del Engine\EsenthelEngine.bc
ren Engine\EsenthelEngineFull.bc Engine\EsenthelEngine.bc

I have seems cannot managed to build a working webjs built, always "Exception thrown, see JavaScript console"

From javascript console :
Code:
missing function: _Z7Preloadv
    

console.error(text);

1 - Bas...pp.html (line 1245)
-1
1 - Bas...pp.html (line 1233)
-1
    

console.error(text);

1 - Bas...pp.html (line 1245)
uncaught exception: abort() at jsStackTrace@file:///C:/Users/Prodigy/Documents/Esenthel/Projects/_Build_/1%20-%20Basic%20App/Emscripten/Release/1%20-%20Basic%20App.js:853:12 stackTrace@file:///C:/Users/Prodigy/Documents/Esenthel/Projects/_Build_/1%20-%20Basic%20App/Emscripten/Release/1%20-%20Basic%20App.js:867:21 abort@file:///C:/Users/Prodigy/Documents/Esenthel/Projects/_Build_/1%20-%20Basic%20App/Emscripten/Release/1%20-%20Basic%20App.js:300727:24 __Z7Preloadv [Preload()]@file:///C:/Users/Prodigy/Documents/Esenthel/Projects/_Build_/1%20-%20Basic%20App/Emscripten/Release/1%20-%20Basic%20App.js:7682:2 Pg@file:///C:/Users/Prodigy/Documents/Esenthel/Projects/_Build_/1%20-%20Basic%20App/Emscripten/Release/1%20-%20Basic%20App.js:258785:6 hva@file:///C:/Users/Prodigy/Documents/Esenthel/Projects/_Build_/1%20-%20Basic%20App/Emscripten/Release/1%20-%20Basic%20App.js:297983:2 Runtime.dynCall@file:///C:/Users/Prodigy/Documents/Esenthel/Projects/_Build_/1%20-%20Basic%20App/Emscripten/Release/1%20-%20Basic%20App.js:189:11 Browser_mainLoop_runner/<@file:///C:/Users/Prodigy/Documents/Esenthel/Projects/_Build_/1%20-%20Basic%20App/Emscripten/Release/1%20-%20Basic%20App.js:8411:5 Browser.mainLoop.runIter@file:///C:/Users/Prodigy/Documents/Esenthel/Projects/_Build_/1%20-%20Basic%20App/Emscripten/Release/1%20-%20Basic%20App.js:6503:5 Browser_mainLoop_runner@file:///C:/Users/Prodigy/Documents/Esenthel/Projects/_Build_/1%20-%20Basic%20App/Emscripten/Release/1%20-%20Basic%20App.js:8407:3 If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

Compilation log :
Code:
0>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.Redirect.10.props(2​3,3): warning MSB4011: "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Emscripten\Microsoft.Cpp.Emscripten.d​efault.props" cannot be imported again. It was already imported at "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Default.props (113,3)". This is most likely a build authoring error. This subsequent import will be ignored. [C:\Users\Prodigy\Documents\Esenthel\Projects\_Build_\1 - Basic App\Project.vcxproj]
Build started 12/28/2014 2:47:00 PM.
     1>Project "C:\Users\Prodigy\Documents\Esenthel\Projects\_Build_\1 - Basic App\Project.vcxproj" on node 2 (Build target(s)).
     1>ClCompile:
         C:\Program Files\Emscripten\emscripten\1.25.0\emcc.bat
         stdafx.cpp
         Auto.cpp
         Main.cpp
         Commands.cpp
       Link:
         C:\Program Files\Emscripten\emscripten\1.25.0\emcc.bat Emscripten/Release/stdafx.o Emscripten/Release/Auto.o Emscripten/Release/Main.o Emscripten/Release/Commands.o -o "C:/Users/Prodigy/Documents/Esenthel/Projects/_Build_/1 - Basic App/Emscripten/Release/1 - Basic App.html" -O2 C:/Users/Prodigy/Documents/Esenthel/Bin/EsenthelEngine.bc --memory-init-file 1 -s ALLOW_MEMORY_GROWTH=1 --closure 0 --minify 0
     1>GCCLINK : warning root: Disabling asm.js validation for memory growth (memory can grow, but you lose some amount of speed)
     1>GCCLINK : warning : unresolved symbol: _Z7Preloadv
     1>GCCLINK : warning : unresolved symbol: pthread_create
     1>GCCLINK : warning : Output contains some very large functions (8631 lines in kna), 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)
         Project.vcxproj -> C:\Users\Prodigy\Documents\Esenthel\Projects\_Build_\1 - Basic App\Emscripten\Release\1 - Basic App.html
     1>Done Building Project "C:\Users\Prodigy\Documents\Esenthel\Projects\_Build_\1 - Basic App\Project.vcxproj" (Build target(s)).

Build succeeded.

Time Elapsed 00:00:54.14

Publish also resulting the same error, hmm.
(This post was last modified: 12-28-2014 09:48 AM by Prodigy.)
12-28-2014 08:51 AM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #9
RE: Emscripten error
Hello,

Quote:Now i have batch script to manually build it
This is handled by "Make Web Libs" in "Esenthel Builder" tool
There's no problem linking the libraries, because they're not linked to the original location, but from "Engine\EsenthelEngine.bc" to "Editor/Bin/EsenthelEngine.bc"
Does the "Make Web Libs" option not work ok for you?

Quote:missing function: _Z7Preloadv
This error looks normal, for Web apps you need to provide a 'Preload' function.
Please look into "Apps/15 - Demos/Web App" tutorial in the Engine's tutorials project.
Try compiling/starting that app first before making other apps for Web.
12-28-2014 11:07 AM
Find all posts by this user Quote this message in a reply
Prodigy Offline
Member

Post: #10
RE: Emscripten error
You are right about weblibs smile, now managed to run webjs on nginx, is there anyway to run it without webserver ?
(This post was last modified: 12-28-2014 11:28 AM by Prodigy.)
12-28-2014 11:22 AM
Find all posts by this user Quote this message in a reply
Post Reply