Build for wsl2 ubuntu 20.04

Hi all! I am trying to build glow so i can start learning and contributing :grinning:

are these warnings below ignorable?
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

muhd@mud:/opensource/build_Debug$ ninja all
[218/653] Building CXX object thirdparty/folly/CMakeFiles/folly_base.dir/folly/synchronization/detail/Hardware.cpp.o
/home/muhd/opensource/glow/thirdparty/folly/folly/synchronization/detail/Hardware.cpp:122:72: warning: unused parameter ‘status’ [-Wunused-parameter]
[[noreturn]] FOLLY_DISABLE_SANITIZERS static void rtmAbortFunc(uint8_t status) {
^
1 warning generated.
[258/653] NodeGen: Generating nodes.
Writing node descriptors to:
/home/muhd/opensource/build_Debug/glow/AutoGenNodes.h
/home/muhd/opensource/build_Debug/glow/AutoGenNodes.cpp
/home/muhd/opensource/build_Debug/glow/AutoGenNodes.def
/home/muhd/opensource/build_Debug/glow/AutoGenNodesImport.h
/home/muhd/opensource/build_Debug/glow/AutoGenNodesExport.h
[262/653] InstrGen: Generating instructions.
Writing instr descriptors to:
/home/muhd/opensource/build_Debug/glow/AutoGenInstr.h
/home/muhd/opensource/build_Debug/glow/AutoGenInstr.cpp
/home/muhd/opensource/build_Debug/glow/AutoGenInstr.def
/home/muhd/opensource/build_Debug/glow/AutoGenIRBuilder.h
/home/muhd/opensource/build_Debug/glow/AutoGenIRBuilder.cpp
/home/muhd/opensource/build_Debug/glow/AutoGenIRGen.h
[320/653] Building CXX object lib/LLVMIRCodeGen/CMakeFiles/LLVMIRCodeGen.dir/GlowJIT.cpp.o
/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]
cxxSymbolOverride_(
^
/usr/lib/llvm-9/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h:224:33: note: ‘LegacyLocalCXXRuntimeOverrides’ has been explicitly marked deprecated here
LegacyLocalCXXRuntimeOverrides::LegacyLocalCXXRuntimeOverrides(
^
/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]
objectLayer_(ES_,
^
/usr/lib/llvm-9/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h:356:3: note: ‘LegacyRTDyldObjectLinkingLayer’ has been explicitly marked deprecated here
LLVM_ATTRIBUTE_DEPRECATED(
^
/usr/lib/llvm-9/include/llvm/Support/Compiler.h:277:23: note: expanded from macro ‘LLVM_ATTRIBUTE_DEPRECATED’
decl attribute ((deprecated(message)))
^
/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]
compileLayer_(objectLayer_, SimpleCompiler(TM_)) {
^
/usr/lib/llvm-9/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h:66:3: note: ‘LegacyIRCompileLayer’ has been explicitly marked deprecated here
LLVM_ATTRIBUTE_DEPRECATED(
^
/usr/lib/llvm-9/include/llvm/Support/Compiler.h:277:23: note: expanded from macro ‘LLVM_ATTRIBUTE_DEPRECATED’
decl attribute ((deprecated(message)))
^
/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]
LegacyCtorDtorRunner<decltype(compileLayer_)> ctorRunner(std::move(ctorNames),
^
/usr/lib/llvm-9/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h💯3: note: ‘LegacyCtorDtorRunner’ has been explicitly marked deprecated here
LLVM_ATTRIBUTE_DEPRECATED(
^
/usr/lib/llvm-9/include/llvm/Support/Compiler.h:277:23: note: expanded from macro ‘LLVM_ATTRIBUTE_DEPRECATED’
decl attribute ((deprecated(message)))
^
4 warnings generated.
[653/653] Linking CXX executable tests/ConcatBench
muhd@mud:/opensource/build_Debug$

Hmm, think these warnings can be ignored. Please feel free to upstream fixes if you’d like! :slight_smile:

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 -DGLOW_WITH_CPU=OFF -DGLOW_WITH_OPENCL=OFF when you run cmake. But not sure how you’re using Glow/if that helps you at all.

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?

The subset i am interested in, is to do with this issue [Support for LogSoftmax operator is missing] https://github.com/pytorch/glow/issues/4399#, was trying to implement it when i faced this alert. so since its ignorable now should be fine :slight_smile: