Closed kohakukun closed 2 months ago
That seems very strange. This seems like it must be an issue with clang itself rather than Emscripten.
Is there anything strange about that file? Can you attach /usd/pxr/base/arch/systemInfo.h
to this ticket perhaps?
Perhaps trying running that header directly through the pre-processor with /emsdk/upstream/bin/clang++ -E /usd/pxr/base/arch/systemInfo.h
?
If this started happening with 3.1.46 then bisecting is another option here: https://emscripten.org/docs/contributing/developers_guide.html#bisecting
Sorry, seems it was an internal issue with our tooling
Version of emscripten/emsdk: emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.48 (e967e20b4727956a30592165a3c1cde5c67fa0a8) clang version 18.0.0 (https://github.com/llvm/llvm-project a54545ba6514802178cf7cf1c1dd9f7efbf3cde7) Target: wasm32-unknown-emscripten Thread model: posix
Failing command line in full: In file included from /usd/pxr/base/arch/initConfig.cpp:28: /usd/pxr/base/arch/systemInfo.h:1:1: error: unknown type name 'sion' 1 | sion 2.0 (the "Apache License")
em++: error: '/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN_SHARED_MEMORY=1 -DEMSCRIPTEN --sysroot=/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -DARCH_EXPORTS=1 -DBOOST_PYTHON_NO_PY_SIGNATURES -DGLX_GLXEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES -DMFB_ALT_PACKAGE_NAME=arch -DMFB_PACKAGE_MODULE=Arch -DMFB_PACKAGE_NAME=arch -DPXR_BUILD_LOCATION=usd -DPXR_PLUGIN_BUILD_LOCATION=../plugin/usd -DPXR_STATIC=1 -DPXR_WEBGPU_SUPPORT_ENABLED -I/Builds/emscripten/build/usd/include -Wall -Wformat-security -pthread -Wno-deprecated -Wno-deprecated-declarations -Wno-unused-local-typedefs -Wno-unused-command-line-argument -O3 -DNDEBUG -std=c++14 -fPIC -fPIC -MD -MT pxr/base/arch/CMakeFiles/arch_internal.dir/initConfig.cpp.o -MF CMakeFiles/arch_internal.dir/initConfig.cpp.o.d -c -matomics -mbulk-memory /usd/pxr/base/arch/initConfig.cpp -o CMakeFiles/arch_internal.dir/initConfig.cpp.o' failed (returned 1)
Emscripten seems to be truncating the files when compiling, this is the first few lines of the "faulty" file
See how the error reports line 4 as the first line and is skipping over the comment characters.
This didn't happen before version 3.1.46. I also tried running
emcc --clear-cache
to see if it would help.