OK so since it appears it's a no-go for Intel TBB, I will have to get rid of this dependency, so I think I won't investigate the issue with em++ Here is how you can reproduce the issue though
OS: ubuntu 14.04 64 bits (AWS VM) I successfully built Emscripten from source on ubuntu 14.04 64bit using those instructions: https://kripken.github.io/emscripten-site/docs/building_from_source/building_emscripten_from_source_on_linux.html --> Emscripten 1.36.0 Then I downloaded the most recent source of Intel TBB library --> Intel TBB 4.4 To build Intel TBB, there is no configure script and no install, so you only have to run make. In the make procedure a lot of stuff is hardcoded so using emmake does not work, it's still g++ which is called for compilation. So, I symlinked g++ to em++ and I started having a lot of errors, for example: Unsupported machine word size or: ./include/tbb/tbb_machine.h:338:9: error: use of undeclared identifier '__TBB_Yield' __TBB_Yield(); I think the reason is that em++ probably sets a custom target OS for cross compilation (something like "emscripten" or "unknown", so the TBB configure header has no pre-made config to include for that OS and a lot of stuff end up undefined. I modified TBB headers to force it to use its pre-made linux 32 bit config and got rid of those errors. Then, I started having issues about "incorrect output for asm" errors, which were caused by various areas of TBB headers. BUT, if instead of symlinking g++ to em++, I symlink g++ to emscripten clang (fastcomp) binary, I have no error and everything builds fine! So, somehow, the em++ wrapper, either via a flag or via an environment variable, causes those errors. On Wed, May 11, 2016 at 12:47 AM, François Ruty <[email protected]> wrote: > ok many thanks for the information > > On Tue, May 10, 2016 at 9:11 PM, Charles Vaughn <[email protected]> wrote: > >> I believe TBB includes x86 specific assembly code, so it won't work. >> >> On Tuesday, May 10, 2016 at 10:22:48 AM UTC-7, François Ruty wrote: >>> >>> ok thanks I'll keep you updated when I have news, in next couple of days >>> >>> On Tue, May 10, 2016 at 6:43 PM, Alon Zakai <[email protected]> wrote: >>> >>>> 1. Emscripten supports pthreads, so if TBB uses that under the hood, >>>> things might just work? That happens with c++ standard library <thread>, >>>> for example. >>>> >>>> https://kripken.github.io/emscripten-site/docs/porting/pthreads.html >>>> >>>> 2. Yes, sounds like you are seeing a bug that should be fixed. In >>>> general that should work. >>>> >>>> On Tue, May 10, 2016 at 9:39 AM, <[email protected]> wrote: >>>> >>>>> Hello, I have 2 questions. I'm trying to port a project with >>>>> Emscripten, and the project has among its dependencies Intel TBB library. >>>>> >>>>> Question 1: do I have to rewrite all the project to get rid of all >>>>> multithreading code, or does Emscripten somehow map multithreaded code to >>>>> monothreaded code? >>>>> >>>>> Question 2: When trying to build the project with em++, it is parsing >>>>> dependencies headers and it raises errors with undeclared unidentifiers. >>>>> I isolated one particular command with em++ that raises such errors. >>>>> When I run the same command with Emscripten clang++ version, there is >>>>> no problem. >>>>> So I'm trying to go through emcc.py to find out which stuff added by >>>>> emcc, on top of clang++, is causing the problem. >>>>> Does that sound like a reasonable approach? Are there any known cause >>>>> that could explain that a compilation with Emscripten clang++ fastcomp is >>>>> OK but with em++, is not? >>>>> >>>>> many thanks >>>>> >>>>> -- >>>>> 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 [email protected]. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "emscripten-discuss" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/emscripten-discuss/-SQboIAl2ew/unsubscribe >>>> . >>>> To unsubscribe from this group and all its topics, send an email to >>>> [email protected]. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> François RUTY >>> Luna Co-Founder and CEO >>> www.luna-technology.com >>> [email protected] >>> +33 (0)6 73 44 76 69 >>> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "emscripten-discuss" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/emscripten-discuss/-SQboIAl2ew/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > François RUTY > Luna Co-Founder and CEO > www.luna-technology.com > [email protected] > +33 (0)6 73 44 76 69 > -- François RUTY Luna Co-Founder and CEO www.luna-technology.com [email protected] +33 (0)6 73 44 76 69 -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
