llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.15k stars 12.02k forks source link

Emscripten + pdfium: MCStreamer::SwitchSection: Assertion `Section && "Cannot switch to a null section!"' failed #45275

Closed adlr closed 4 years ago

adlr commented 4 years ago
Bugzilla Link 45930
Resolution WONTFIX
Resolved on Sep 20, 2020 13:47
Version trunk
OS Linux
Attachments Requested files (.c, .sh) to repro
CC @dschuff,@zygoloid,@sbc100

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

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.

adlr commented 4 years ago

I'm not sure how I missed this before, but I traced this to the -debug-info-kind=constructor argument. Removing that solves the issue. Apologies!

adlr commented 4 years ago

assigned to @sbc100