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

issue when trying to compile the lib #78

Closed
kalwalt opened this issue Feb 10, 2019 · 7 comments
Closed

issue when trying to compile the lib #78

kalwalt opened this issue Feb 10, 2019 · 7 comments

Comments

@kalwalt
Copy link

kalwalt commented Feb 10, 2019

I'm trying to build the libs but it fails:
i have in package.json set:
"build": "cd emscripten/artoolkit5/ && /home/walter/emsdk/emscripten/1.38.26/emconfigure ./Configure && cd ../../ && node tools/makem.js; echo Built at date",

to explictly point to my latest emscripten install.
i need to do some minor changes in makem.js:

- 'Video/VideoLuma.c',

+ 'Video/videoLuma.c',

i run the command:
EMSCRIPTEN=/home/walter/emsdk/emscripten/1.38.26 ARTOOLKIT5_ROOT=/home/walter/jsartoolkit5/emscripten/artoolkit5 npm run build

and then the build process fails with this end error:

/home/walter/jsartoolkit5/emscripten/artoolkit5/lib/SRC/Video/videoLuma.c:55:12: fatal error: 'emmintrin.h' file not found
#  include <emmintrin.h> // SSE2.
           ^~~~~~~~~~~~~
1 error generated.
shared:ERROR: compiler frontend failed to generate LLVM bitcode, halting

exec error: 1

see the gist
i receive the same error even if i choose the clang or the standard compiler, i was able instead to build the lib with the old version here
i hope that someone could give some hints and suggestions 😄

Post Edit: i'm working in linux 64bit - Ubuntu 18.04

@kalwalt
Copy link
Author

kalwalt commented Feb 11, 2019

i receive the same error even if i pass the emscripten clang env var:

EMSCRIPTEN=/home/walter/emsdk/emscripten/1.38.26
ARTOOLKIT5_ROOT=/home/walter/jsartoolkit5/emscripten/artoolkit5
LLVM_ROOT=/home/walter/emsdk/clang/e1.38.26_64bit
EMSCRIPTEN_NATIVE_OPTIMIZER=/home/walter/emsdk/clang/e1.38.26_64bit/optimizer
npm run build

@kalwalt
Copy link
Author

kalwalt commented Feb 11, 2019

i'm using this emscripten version:

./emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.38.26
clang version 6.0.1  (emscripten 1.38.26 : 1.38.26)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/walter/emsdk/clang/e1.38.26_64bit
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
shared:INFO: (Emscripten: Running sanity checks)

if i add in makem.js:

FLAGS += '-I/usr/lib/gcc/x86_64-linux-gnu/7.3.0/include'

i receive another type of error:

/usr/lib/gcc/x86_64-linux-gnu/7.3.0/include/mmintrin.h:236:73: warning: unknown attribute '__artificial__' ignored [-Wunknown-attributes]
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
                                                                        ^
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/include/mmintrin.h:239:18: error: use of unknown builtin '__builtin_ia32_punpcklbw' [-Wimplicit-function-declaration]
  return (__m64) __builtin_ia32_punpcklbw ((__v8qi)__m1, (__v8qi)__m2);
                 ^
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/include/mmintrin.h:239:10: error: invalid conversion between vector type '__m64' (vector of 2 'int' values) and integer type 'int' of different size
  return (__m64) __builtin_ia32_punpcklbw ((__v8qi)__m1, (__v8qi)__m2);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/include/mmintrin.h:242:73: warning: unknown attribute '__artificial__' ignored [-Wunknown-attributes]
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
                                                                        ^
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/include/mmintrin.h:250:73: warning: unknown attribute '__artificial__' ignored [-Wunknown-attributes]
extern __inline __m64 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
                                                                        ^
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/include/mmintrin.h:253:18: error: use of unknown builtin '__builtin_ia32_punpcklwd' [-Wimplicit-function-declaration]
  return (__m64) __builtin_ia32_punpcklwd ((__v4hi)__m1, (__v4hi)__m2);
                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
21 warnings and 20 errors generated.
shared:ERROR: compiler frontend failed to generate LLVM bitcode, halting

exec error: 1
Built at lun 11 feb 2019, 18.03.44, CET

@kalwalt
Copy link
Author

kalwalt commented Feb 11, 2019

additional information: i'm using artoolkit5 from this commit as pointed from master https://github.com/artoolkitx/artoolkit5/tree/6742d9f5c4a06673a3805e097d924f8e0c55f8ca
i will try instead with the latest from artoolkit5

@ThorstenBux
Copy link

ThorstenBux commented Feb 12, 2019 via email

@kalwalt
Copy link
Author

kalwalt commented Feb 12, 2019

Did you try the instructions?

yes, thank you for the answer, i think it' is related to emscripten, i'm investigating it.

@kalwalt
Copy link
Author

kalwalt commented Feb 12, 2019

Finally i get it to build the libs! 😄

You should exclude 'Video/videoLuma.c', from the compilation.
I will explain better later, i have not so much time now....

@kalwalt
Copy link
Author

kalwalt commented Feb 7, 2020

Solved with #86

@kalwalt kalwalt closed this as completed Feb 7, 2020
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

2 participants