Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: Unknown attribute kind (52) (Producer: 'LLVM4.0.0' Reader: 'LLVM 3.8.0') #5499

Closed
akshay-hazari opened this issue Aug 22, 2017 · 3 comments

Comments

@akshay-hazari
Copy link

akshay-hazari commented Aug 22, 2017

The example I have been trying to compile gets done via cmake which creates a cpp.o file.
The .js file created gives a corrupted heap memory area error.

But when I try to run the compiled cpp.o code like this it shows.

./webcam_face_pose_ex.cpp.o
error: Unknown attribute kind (52) (Producer: 'LLVM4.0.0' Reader: 'LLVM 3.8.0')

clang -v on the system showed 3.8.0

So I tried to install clang-4.0.0 by adding a ppa to apt-get and update-alternatives to use clang-4.0 on the system But it doesn't resolve the error.

Is there a way to use LLVM3.8.0 in emscripten or any other way to solve it.

The .emscripten file reads like.

import os
LLVM_ROOT='/home/akshay/Downloads/emsdk-portable/clang/fastcomp/build_incoming_64/bin'
NODE_JS='/home/akshay/Downloads/emsdk-portable/node/4.1.1_64bit/bin/node'
EMSCRIPTEN_ROOT='/home/akshay/Downloads/emsdk-portable/emscripten/incoming'
EMSCRIPTEN_NATIVE_OPTIMIZER='/home/akshay/Downloads/emsdk-portable/emscripten/incoming_64bit_optimizer/optimizer'
SPIDERMONKEY_ENGINE = ''
V8_ENGINE = ''
TEMP_DIR = '/tmp'
COMPILER_ENGINE = NODE_JS
JS_ENGINES = [NODE_JS]

Any help is appreciated,

@juj
Copy link
Collaborator

juj commented Aug 22, 2017

This is a duplicate of #5435 (comment), where we are already discussing the issue, so let's not make two copies of it.

@juj juj closed this as completed Aug 22, 2017
@Rtoax
Copy link

Rtoax commented Nov 4, 2021

My problem: error: Unknown attribute kind (61) (Producer: 'LLVM11.0.0' Reader: 'LLVM 7.0.1')

when i $ whereis opt, get

$ whereis opt 
opt: /usr/bin/opt /etc/opt /usr/local/bin/opt /usr/share/man/man1/opt.1.gz
$ /usr/local/bin/opt --version
LLVM (http://llvm.org/):
  LLVM version 7.0.1
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: skylake
$ /usr/bin/opt --version
LLVM (http://llvm.org/):
  LLVM version 11.0.0
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: skylake

i delete opt in local($ rm -f /usr/local/bin/opt), the same as llc command.
#5435

@sbc100
Copy link
Collaborator

sbc100 commented Nov 4, 2021

@Rtoax emscripten uses it own version of llvm / opt, and is likely not compatible with the system version (/usr/bin/opt etc). We build and ship llvm tip-of-tree which is currently llvm-14 (i.e. an unreleased version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants