PetterS / clang-wasm

How to build webassembly files with nothing other than standard Clang/llvm.
143 stars 15 forks source link

Error when running make on Debian stable #2

Closed singpolyma-shopify closed 5 years ago

singpolyma-shopify commented 5 years ago
$ make
clang++-8 \
        -c \
        -Wall --target=wasm32 -Os -flto -nostdlib -fvisibility=hidden -std=c++14 -ffunction-sections -fdata-sections -DPRINTF_DISABLE_SUPPORT_FLOAT=1 -DPRINTF_DISABLE_SUPPORT_LONG_LONG=1 -DPRINTF_DISABLE_SUPPORT_PTRDIFF_T=1 \
        -o library.o \
        library.cpp
In file included from library.cpp:1:
In file included from /usr/include/memory.h:25:
/usr/include/features.h:364:12: fatal error: 'sys/cdefs.h' file not found
#  include <sys/cdefs.h>
           ^~~~~~~~~~~~~
1 error generated.
Makefile:36: recipe for target 'library.o' failed
make: *** [library.o] Error 1
PetterS commented 5 years ago

Hmm, I wonder what is going on here. Your installed memory.h is including a non-existing file.

Not sure what to do here. Including memory.h should work.

wdscxsj commented 5 years ago

This can be solved by installing libc6-dev-i386, or (probably better) g++-multilib. See here.

PetterS commented 5 years ago

Thanks @wdscxsj!