Build for wsl2 ubuntu 20.04

username: muhdmud
cooked: <p>Hi all! I am trying to build glow so i can start learning and contributing <img src="https://discuss.pytorch.org/images/emoji/apple/grinning.png?v=9" title=":grinning:" class="emoji" alt=":grinning:"></p>
<p>are these warnings below ignorable?<br>
also, could you point to the right direction where i can build a subset of the project? or i have to use debug/release everytime to ensure everything goes nicely</p>
<p>muhd@mud:/opensource/build_Debug$ ninja all<br>
[218/653] Building CXX object thirdparty/folly/CMakeFiles/folly_base.dir/folly/synchronization/detail/Hardware.cpp.o<br>
/home/muhd/opensource/glow/thirdparty/folly/folly/synchronization/detail/Hardware.cpp:122:72: warning: unused parameter ‘status’ [-Wunused-parameter]<br>
[[noreturn]] FOLLY_DISABLE_SANITIZERS static void rtmAbortFunc(uint8_t status) {<br>
^<br>
1 warning generated.<br>
[258/653] NodeGen: Generating nodes.<br>
Writing node descriptors to:<br>
/home/muhd/opensource/build_Debug/glow/AutoGenNodes.h<br>
/home/muhd/opensource/build_Debug/glow/AutoGenNodes.cpp<br>
/home/muhd/opensource/build_Debug/glow/AutoGenNodes.def<br>
/home/muhd/opensource/build_Debug/glow/AutoGenNodesImport.h<br>
/home/muhd/opensource/build_Debug/glow/AutoGenNodesExport.h<br>
[262/653] InstrGen: Generating instructions.<br>
Writing instr descriptors to:<br>
/home/muhd/opensource/build_Debug/glow/AutoGenInstr.h<br>
/home/muhd/opensource/build_Debug/glow/AutoGenInstr.cpp<br>
/home/muhd/opensource/build_Debug/glow/AutoGenInstr.def<br>
/home/muhd/opensource/build_Debug/glow/AutoGenIRBuilder.h<br>
/home/muhd/opensource/build_Debug/glow/AutoGenIRBuilder.cpp<br>
/home/muhd/opensource/build_Debug/glow/AutoGenIRGen.h<br>
[320/653] Building CXX object lib/LLVMIRCodeGen/CMakeFiles/LLVMIRCodeGen.dir/GlowJIT.cpp.o<br>
/home/muhd/opensource/glow/lib/LLVMIRCodeGen/GlowJIT.cpp:139:7: warning: ‘LegacyLocalCXXRuntimeOverrides’ is deprecated: ORCv1 utilities (utilities with the ‘Legacy’ prefix) are deprecated. Please use the ORCv2 LocalCXXRuntimeOverrides utility instead [-Wdeprecated-declarations]<br>
cxxSymbolOverride_(<br>
^<br>
/usr/lib/llvm-9/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h:224:33: note: ‘LegacyLocalCXXRuntimeOverrides’ has been explicitly marked deprecated here<br>
LegacyLocalCXXRuntimeOverrides::LegacyLocalCXXRuntimeOverrides(<br>
^<br>
/home/muhd/opensource/glow/lib/LLVMIRCodeGen/GlowJIT.cpp:183:7: warning: ‘LegacyRTDyldObjectLinkingLayer’ is deprecated: ORCv1 layers (layers with the ‘Legacy’ prefix) are deprecated. Please use ORCv2 (see docs/ORCv2.rst) [-Wdeprecated-declarations]<br>
objectLayer_(ES_,<br>
^<br>
/usr/lib/llvm-9/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h:356:3: note: ‘LegacyRTDyldObjectLinkingLayer’ has been explicitly marked deprecated here<br>
LLVM_ATTRIBUTE_DEPRECATED(<br>
^<br>
/usr/lib/llvm-9/include/llvm/Support/Compiler.h:277:23: note: expanded from macro ‘LLVM_ATTRIBUTE_DEPRECATED’<br>
decl  <strong>attribute</strong> ((deprecated(message)))<br>
^<br>
/home/muhd/opensource/glow/lib/LLVMIRCodeGen/GlowJIT.cpp:191:7: warning: ‘LegacyIRCompileLayer’ is deprecated: ORCv1 layers (layers with the ‘Legacy’ prefix) are deprecated. Please use the ORCv2 IRCompileLayer instead [-Wdeprecated-declarations]<br>
compileLayer_(objectLayer_, SimpleCompiler(TM_)) {<br>
^<br>
/usr/lib/llvm-9/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h:66:3: note: ‘LegacyIRCompileLayer’ has been explicitly marked deprecated here<br>
LLVM_ATTRIBUTE_DEPRECATED(<br>
^<br>
/usr/lib/llvm-9/include/llvm/Support/Compiler.h:277:23: note: expanded from macro ‘LLVM_ATTRIBUTE_DEPRECATED’<br>
decl  <strong>attribute</strong> ((deprecated(message)))<br>
^<br>
/home/muhd/opensource/glow/lib/LLVMIRCodeGen/GlowJIT.cpp:233:49: warning: ‘LegacyCtorDtorRunner’ is deprecated: ORCv1 utilities (utilities with the ‘Legacy’ prefix) are deprecated. Please use the ORCv2 CtorDtorRunner utility instead [-Wdeprecated-declarations]<br>
LegacyCtorDtorRunner&lt;decltype(compileLayer_)&gt; ctorRunner(std::move(ctorNames),<br>
^<br>
/usr/lib/llvm-9/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h💯3: note: ‘LegacyCtorDtorRunner’ has been explicitly marked deprecated here<br>
LLVM_ATTRIBUTE_DEPRECATED(<br>
^<br>
/usr/lib/llvm-9/include/llvm/Support/Compiler.h:277:23: note: expanded from macro ‘LLVM_ATTRIBUTE_DEPRECATED’<br>
decl  <strong>attribute</strong> ((deprecated(message)))<br>
^<br>
4 warnings generated.<br>
[653/653] Linking CXX executable tests/ConcatBench<br>
muhd@mud:/opensource/build_Debug$</p>

username: jfix
cooked: <p>Hmm, think these warnings can be ignored. Please feel free to upstream fixes if you’d like! <img src="https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>
<p>What subset are you interested in? You could always disable e.g. the OpenCL and/or CPU backends when you build, in order to build/test a bit less, e.g. via <code>-DGLOW_WITH_CPU=OFF -DGLOW_WITH_OPENCL=OFF</code> when you run <code>cmake</code>. But not sure how you’re using Glow/if that helps you at all.</p>

username: muhdmud
cooked: <p>Thank you for the reply! When you say upstream fix, do you mean fix this error so that we can use wsl2 for the future?</p>
<p>The subset i am interested in, is to do with this issue [Support for LogSoftmax operator is missing] <a href="https://github.com/pytorch/glow/issues/4399#" rel="nofollow noopener">https://github.com/pytorch/glow/issues/4399#</a>, was trying to implement it when i faced this alert. so since its ignorable now should be fine <img src="https://discuss.pytorch.org/images/emoji/apple/slight_smile.png?v=9" title=":slight_smile:" class="emoji" alt=":slight_smile:"></p>