emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.76k stars 3.3k forks source link

Latest emscript: WARNING root: LLVM version appears incorrect (seeing "3.5", expected "3.7") #3626

Closed looopTools closed 8 years ago

looopTools commented 9 years ago

With the latest emsdk, I get this error on Fedora 22

CRITICAL root: 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
INFO     root: (Emscripten: Running sanity checks)
CRITICAL root: failing sanity checks due to previous fastcomp failure

WARNING  root: LLVM version appears incorrect (seeing "3.5", expected "3.7")
CRITICAL root: fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:
===========================================================================
LLVM (http://llvm.org/):
  LLVM version 3.5.0
  Optimized build.
  Built Feb 18 2015 (09:57:24).
  Default target: x86_64-redhat-linux-gnu
  Host CPU: core-avx2

  Registered Targets:
    aarch64    - AArch64 (little endian)
    aarch64_be - AArch64 (big endian)
    arm        - ARM
    arm64      - AArch64 (little endian)
    arm64_be   - AArch64 (big endian)
    armeb      - ARM (big endian)
    cpp        - C++ backend
    nvptx      - NVIDIA PTX 32-bit
    nvptx64    - NVIDIA PTX 64-bit
    ppc32      - PowerPC 32
    ppc64      - PowerPC 64
    ppc64le    - PowerPC 64 LE
    r600       - AMD GPUs HD2XXX-HD6XXX
    systemz    - SystemZ
    thumb      - Thumb
    thumbeb    - Thumb (big endian)
    x86        - 32-bit X86: Pentium-Pro and above
    x86-64     - 64-bit X86: EM64T and AMD64
===========================================================================

However in the fedora repo, 3.5 is the latest llvm and on llvm's website, is the newest I can find 3.6.1 for download, how can this be fixed ?

EDIT: And from llvm website: 21 August: Release LLVM 3.7.0.

kripken commented 9 years ago

If fedora repos don't have a new enough version, you need to install it from the LLVM website. But even better is to use a recent emscripten too, together with it's own LLVM, either using the SDK or building manually, http://kripken.github.io/emscripten-site/docs/getting_started/downloads.html

looopTools commented 9 years ago

I downloaded the latest version of Portable Emscripten SDK from the project site and did:

./emsdk update 
./emsdk install latest
./emsdk activate latest

And I have the same problem on OpenSUSE by the way :)

looopTools commented 9 years ago

I have downloaded llvm 3.6.1 from the projects website and build from source. Seems to work on Fedora, but not OpenSUSE

juj commented 9 years ago

After running

./emsdk update 
./emsdk install latest
./emsdk activate latest

you may still need to call source ./emsdk_env.sh in order to add the Emscripten tools to your environment PATH, depending on whether your build system expects to find the tools in PATH (if your build never looks e.g. for emcc or clang in PATH, this step can be omitted). Can you post the results of

which emcc
which clang
cat ~/.emscripten
./emsdk list

on your system, in order to debug what the state of the environment and Emscripten configuration is?

juj commented 9 years ago

Does the issue here still persist?

juj commented 8 years ago

New emsdk went live today: https://groups.google.com/d/msg/emscripten-discuss/TW-AvHt-lc4/_59T4YBxBQAJ . Let me close this as stale - I assume the above error could occur if one was missing either ./emsdk activate latest step or source ./emsdk_env.sh step, and as a result, Emscripten is trying to generate ~/.emscripten on its own, and incorrectly finds system clang in PATH, and not the Emscripten fork of LLVM. If the issue still occurs with the abovementioned steps on the new emsdk, feel free to reopen!

ghost commented 8 years ago

Hey I am still getting this error using the latest sdk and following the above steps:

WARNING root: LLVM version appears incorrect (seeing "clang version 3.7.0 (https://github.com/kripken/emscripten-fastcomp-clang dbe68fecd03d6f646bd075963c3cc0e7130e5767) (https://github.com/kripken/emscripten-fastcomp 4e83be90903250ec5142edc57971ed4c633c5e25)", expected "clang version 3.2")

I may be looking for an older version of emscripten with clang 3.2...

grapechenxy commented 8 years ago

Hey I got this error: LLVM version appears incorrect (seeing "(tags/RELEASE_380/final)" , expected "3.4") I've uppdated to the latest version of emscripten and LLVM(3.8.1). Since it especially mentioned LLVM 3.4, I tried to install this version as well, but it said "is not recoverable: exiting now".

Could anyone help me? thanks!

DeadNumbers commented 8 years ago

@grapechenxy have you find a solution?

juj commented 8 years ago

Most likely the issues originate from mixing system LLVM with Emscripten, but it's unsure how that would happen with emsdk, since emsdk installs both tools at the same time. For anyone still having issues here, please open a new bug item with exact command line steps that were used to install, so we can go from there.