Just to restate the problem:
1. You need the fastcomp compiler which is different to upstream clang.
2. The pre-built fastcomp that is built as part of the emsdk requires
a more recent version of libstdc++ than the one you have so you can't
use.

One solution is to fastcomp yourself locally.  Instructions are here:
https://emscripten.org/docs/building_from_source/building_fastcomp_manually_from_source.html

Anther solution, if you don't want to spend you time and CPU building
fastcomp would be to try running emscripten inside a docker container.

On Thu, Feb 21, 2019 at 9:15 AM Mike Alberghini <[email protected]> wrote:
>
> One of our devs requested emscripten on our build nodes.  I'm trying to get 
> it working on our build nodes, which are Red Hat 7.6.  I keep hitting 
> roadblocks and I'm wondering if anyone has managed to get this working on 
> RHEL.
>
> Problem 1:  new clang meets old libstdc++
>
> When I install the SDK by following the directions, running emcc -v returns:
>
> clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required 
> by clang++)
> clang++: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required 
> by clang++)
>
> Seems the version of clang that comes with emscripten does not like the old c 
> libs on Red Hat.
>
> I know that Red Hat has a newer verison of clang available, so I track that 
> down in llvm-toolset-6.0
>
> Problem 2:  Red Hat clang is not the clang emscripten is looking for
>
> Now when I run emcc -v I get
>
> shared:CRITICAL: fastcomp in use, but LLVM has not been built with the 
> JavaScript backend as a target, llc reports
>
> shared:CRITICAL: you can fall back to the older (pre-fastcomp) compiler core, 
> although that is not recommended, see 
> http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
> shared:ERROR: failing sanity checks due to previous llvm failure
>
> Has anyone managed to get emscripten working on RHEL?  Do I need to compile 
> fastcomp to get this all working?
>
> --
> 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 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.

Reply via email to