Skip to content

Compiler seems to truncate file when building #20718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kohakukun opened this issue Nov 15, 2023 · 3 comments
Closed

Compiler seems to truncate file when building #20718

kohakukun opened this issue Nov 15, 2023 · 3 comments

Comments

@kohakukun
Copy link
Contributor

kohakukun commented Nov 15, 2023

**Version of emscripten/emsdk: **
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.48 (e967e20)
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 -D__EMSCRIPTEN_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

//
// Copyright 2016 Pixar
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in

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.

@sbc100
Copy link
Collaborator

sbc100 commented Nov 15, 2023

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?

@kripken
Copy link
Member

kripken commented Nov 16, 2023

If this started happening with 3.1.46 then bisecting is another option here: https://emscripten.org/docs/contributing/developers_guide.html#bisecting

@kohakukun
Copy link
Contributor Author

Sorry, seems it was an internal issue with our tooling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants