I hope this is the right place for this issue. After a great deal of trouble getting sdk-incoming-64bit to install successfully (running out of memory, etc.) I am now having trouble getting binaryen-master-64bit to install. Running ./emsdk install binaryen-master-64bit fails consistently at the same point and I am unable to parse the error to find useful information.
I have uploaded the entire output of the above command to pastebin, which can be found here: https://pastebin.com/yf8Sewew .
In case it is useful, the output of running emcc -v is
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.37.21
clang version 4.0.0 (https://github.com/kripken/emscripten-fastcomp-clang.git 974b55fd84ca447c4297fc3b00cefb6394571d18) (https://github.com/kripken/emscripten-fastcomp.git 087c6b7b18b7b769d4ad8f2ac3e0dd0ae6b924c2) (emscripten 1.37.21 : 1.37.21)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jaday/dev/wasm/emsdk/clang/fastcomp/build_incoming_64/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0
Found candidate GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/7.2.0
Selected GCC installation: /usr/lib64/gcc/x86_64-pc-linux-gnu/7.2.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
INFO:root:(Emscripten: Running sanity checks)
I am at a bit of a loss as to what to do next or how to approach debugging this. Have other people had similar problems? Is there something I can do to get a more verbose error message to try and figure out where the build fails?
I am new to emscripten and WebAssembly in general, so my apologies if my ignorance is obvious in this issue.
The error is
/home/jaday/dev/wasm/emsdk/binaryen/master/src/wasm/wasm-s-parser.cpp: In member function ‘wasm::Expression* wasm::SExpressionWasmBuilder::makeExpression(wasm::Element&)’:
/home/jaday/dev/wasm/emsdk/binaryen/master/src/wasm/wasm-s-parser.cpp:876:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
if (!strncmp(str, "wake", strlen("wake"))) return makeAtomicWake(s);
^~
/home/jaday/dev/wasm/emsdk/binaryen/master/src/wasm/wasm-s-parser.cpp:878:7: note: here
default: abort_on(str);
^~~~~~~
Try changing
case 'w': {
if (!strncmp(str, "wake", strlen("wake"))) return makeAtomicWake(s);
}
to
case 'w': {
if (!strncmp(str, "wake", strlen("wake"))) return makeAtomicWake(s);
abort_on(str);
}
to see if that fixes the build. @kripken: does that look like a good fix to have overall?
Yeah, that looks like a good fix, we shouldn't use fallthrough that way.
Awesome, the build got much farther with that fix @juj. It failed again for a similar reason further along but I was able to resolve the new issue now that I knew what to look for. Lines 641-645 of src/tools/translate-to-fuzz.h read:
switch (conditions) {
case 0: if (!oneIn(4)) continue;
case 1: if (!oneIn(2)) continue;
default: if (oneIn(conditions + 1)) continue;
}
which I changed to:
switch (conditions) {
case 0: if (!oneIn(4)) continue; break;
case 1: if (!oneIn(2)) continue; break;
default: if (oneIn(conditions + 1)) continue;
}
and then I was able to build successfully!
Thanks for the assistance! Since I already have these changes made locally, I would be happy to make a PR for them if there is interest.
Thanks, yeah, a PR would be great.
Most helpful comment
The error is
Try changing
to
to see if that fixes the build. @kripken: does that look like a good fix to have overall?