Trying to compile pdfium w/ latest emscripten SDK. I'm getting this crash on the very first file I'm compiling. (Note that I was able to compile other software w/ this setup fine, just failing on pdfium now)
Log in the terminal:
+++ dirname ../../formulatenext/build_pdfium.sh
++ cd ../../formulatenext
++ pwd
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 11.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project 57d361bd2f3668eefa7028ad4a2d616317ed437c)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /mnt/ext/adlr/FN/emsdk/upstream/bin
Registered Targets:
wasm32 - WebAssembly 32-bit
wasm64 - WebAssembly 64-bit
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
clang: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/bio-68852d.c
clang: note: diagnostic msg: /tmp/bio-68852d.sh
clang: note: diagnostic msg:
Extended Description
Trying to compile pdfium w/ latest emscripten SDK. I'm getting this crash on the very first file I'm compiling. (Note that I was able to compile other software w/ this setup fine, just failing on pdfium now)
Log in the terminal:
+++ dirname ../../formulatenext/build_pdfium.sh ++ cd ../../formulatenext ++ pwd
out/Debug' [1/779] CC obj/third_party/fx_libopenjpeg/bio.o FAILED: obj/third_party/fx_libopenjpeg/bio.o emcc -MMD -MF obj/third_party/fx_libopenjpeg/bio.o.d -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION=\"n346557-4e0d9925-3\" -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DPNG_PREFIX -DPNG_USE_READ_MACROS -DOPJ_STATIC -I../.. -Igen -I../.. -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fcolor-diagnostics -fmerge-all-constants -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -no-canonical-prefixes -O2 -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -g2 -Xclang -debug-info-kind=constructor -ggnu-pubnames -ftrivial-auto-var-init=pattern -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wno-misleading-indentation -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -std=c11 -Wno-implicit-fallthrough -c ../../third_party/libopenjpeg20/bio.c -o obj/third_party/fx_libopenjpeg/bio.o clang: /b/s/w/ir/cache/builder/emscripten-releases/llvm-project/llvm/lib/MC/MCStreamer.cpp:1098: virtual void llvm::MCStreamer::SwitchSection(llvm::MCSection *, const llvm::MCExpr *): Assertion
Section && "Cannot switch to a null section!"' failed. PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. Stack dump:0 0x00007f645ae59bf4 PrintStackTraceSignalHandler(void*) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libLLVM-11git.so+0x7cdbf4)
1 0x00007f645ae5783e llvm::sys::RunSignalHandlers() (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libLLVM-11git.so+0x7cb83e)
2 0x00007f645ae58d9d llvm::sys::CleanupOnSignal(unsigned long) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libLLVM-11git.so+0x7ccd9d)
3 0x00007f645ad90553 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libLLVM-11git.so+0x704553)
4 0x00007f645ad9068c CrashRecoverySignalHandler(int) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libLLVM-11git.so+0x70468c)
5 0x00007f645a64c520 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x13520)
6 0x00007f6456c94f61 raise /build/glibc-oCLvUT/glibc-2.29/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
7 0x00007f6456c80535 abort /build/glibc-oCLvUT/glibc-2.29/stdlib/abort.c:81:7
8 0x00007f6456c8040f _nl_load_domain /build/glibc-oCLvUT/glibc-2.29/intl/loadmsgcat.c:1177:9
9 0x00007f6456c8db92 (/lib/x86_64-linux-gnu/libc.so.6+0x32b92)
10 0x00007f645c354164 llvm::MCStreamer::SwitchSection(llvm::MCSection, llvm::MCExpr const) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libLLVM-11git.so+0x1cc8164)
11 0x00007f645b724954 llvm::DwarfDebug::emitDebugPubSections() (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libLLVM-11git.so+0x1098954)
12 0x00007f645b6f2c73 llvm::AsmPrinter::doFinalization(llvm::Module&) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libLLVM-11git.so+0x1066c73)
13 0x00007f645afb7485 llvm::FPPassManager::doFinalization(llvm::Module&) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libLLVM-11git.so+0x92b485)
14 0x00007f645afb7b4a llvm::legacy::PassManagerImpl::run(llvm::Module&) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libLLVM-11git.so+0x92bb4a)
15 0x00007f6458731058 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete >) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libclang-cpp.so.11git+0x17b7058)
16 0x00007f6458a2bf4d clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libclang-cpp.so.11git+0x1ab1f4d)
17 0x00007f6457821593 clang::ParseAST(clang::Sema&, bool, bool) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libclang-cpp.so.11git+0x8a7593)
18 0x00007f6459239440 clang::FrontendAction::Execute() (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libclang-cpp.so.11git+0x22bf440)
19 0x00007f64591d3c63 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libclang-cpp.so.11git+0x2259c63)
20 0x00007f64592a98d3 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libclang-cpp.so.11git+0x232f8d3)
21 0x0000000000410d88 cc1_main(llvm::ArrayRef<char const>, char const, void*) (/mnt/ext/adlr/FN/emsdk/upstream/bin/clang+0x410d88)
22 0x000000000040ef7c ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) (/mnt/ext/adlr/FN/emsdk/upstream/bin/clang+0x40ef7c)
23 0x00007f6458e85ad2 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool) const::$_1>(long) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libclang-cpp.so.11git+0x1f0bad2)
24 0x00007f645ad90471 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libLLVM-11git.so+0x704471)
25 0x00007f6458e850dd clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool) const (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libclang-cpp.so.11git+0x1f0b0dd)
26 0x00007f6458e53f8b clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libclang-cpp.so.11git+0x1ed9f8b)
27 0x00007f6458e54377 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libclang-cpp.so.11git+0x1eda377)
28 0x00007f6458e6c9c8 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) (/mnt/ext/adlr/FN/emsdk/upstream/bin/../lib/libclang-cpp.so.11git+0x1ef29c8)
29 0x000000000040e9a3 main (/mnt/ext/adlr/FN/emsdk/upstream/bin/clang+0x40e9a3)
30 0x00007f6456c81bbb __libc_start_main /build/glibc-oCLvUT/glibc-2.29/csu/../csu/libc-start.c:342:3
31 0x000000000040be0a _start (/mnt/ext/adlr/FN/emsdk/upstream/bin/clang+0x40be0a)
clang: error: clang frontend command failed due to signal (use -v to see invocation) clang version 11.0.0 (/b/s/w/ir/cache/git/chromium.googlesource.com-external-github.com-llvm-llvm--project 57d361bd2f3668eefa7028ad4a2d616317ed437c) Target: wasm32-unknown-emscripten Thread model: posix InstalledDir: /mnt/ext/adlr/FN/emsdk/upstream/bin Registered Targets: wasm32 - WebAssembly 32-bit wasm64 - WebAssembly 64-bit x86 - 32-bit X86: Pentium-Pro and above x86-64 - 64-bit X86: EM64T and AMD64 clang: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang: note: diagnostic msg: /tmp/bio-68852d.c clang: note: diagnostic msg: /tmp/bio-68852d.sh clang: note: diagnostic msg:
emcc: error: '/mnt/ext/adlr/FN/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -DEMSCRIPTEN_major=1 -DEMSCRIPTEN_minor=39 -DEMSCRIPTEN_tiny__=15 -D_LIBCPP_ABI_VERSION=2 -Dunix -Dunix -Dunix -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/mnt/ext/adlr/FN/emsdk/upstream/emscripten/system/include/compat -Xclang -isystem/mnt/ext/adlr/FN/emsdk/upstream/emscripten/system/include -Xclang -isystem/mnt/ext/adlr/FN/emsdk/upstream/emscripten/system/include/libc -Xclang -isystem/mnt/ext/adlr/FN/emsdk/upstream/emscripten/system/lib/libc/musl/arch/emscripten -Xclang -isystem/mnt/ext/adlr/FN/emsdk/upstream/emscripten/system/local/include -Xclang -isystem/usr/local/google/home/adlr/.emscripten_cache/wasm/include -DEMSCRIPTEN -fignore-exceptions -MMD -MF obj/third_party/fx_libopenjpeg/bio.o.d -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DCR_CLANG_REVISION="n346557-4e0d9925-3" -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DPNG_PREFIX -DPNG_USE_READ_MACROS -DOPJ_STATIC -I../.. -Igen -I../.. -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fcolor-diagnostics -fmerge-all-constants -Wno-builtin-macro-redefined -DDATE= -DTIME= -DTIMESTAMP= -no-canonical-prefixes -O2 -fno-ident -fdata-sections -ffunction-sections -fomit-frame-pointer -Xclang -debug-info-kind=constructor -ggnu-pubnames -ftrivial-auto-var-init=pattern -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wno-misleading-indentation -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -std=c11 -Wno-implicit-fallthrough -c ../../third_party/libopenjpeg20/bio.c -Xclang -isystem/mnt/ext/adlr/FN/emsdk/upstream/emscripten/system/include/SDL -c -o obj/third_party/fx_libopenjpeg/bio.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (254) ninja: build stopped: subcommand failed.