pytorch / glow

Compiler for Neural Network hardware accelerators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linker error : undefined reference to `typeinfo for llvm::cl::Option'

xgupta opened this issue · comments

Hi,
I am having an issue while building glow.
Can I get some help, please.

[137/224] Linking CXX executable bin/png2bin
FAILED: bin/png2bin
: && /usr/bin/c++ -Wall -Wnon-virtual-dtor -Wno-psabi -g -fno-omit-frame-pointer -O0 tools/png2bin/CMakeFiles/png2bin.dir/png2bin.cpp.o -o bin/png2bin lib/Base/libBase.a lib/Quantization/Base/libQuantizationBase.a lib/Support/libSupport.a lib/Base/libBase.a lib/Support/libSupport.a lib/Flags/libFlags.a libMiniz.a thirdparty/folly/libfolly.a /usr/lib/libboost_context.so.1.79.0 /usr/lib/libboost_filesystem.so.1.79.0 /usr/lib/libboost_atomic.so.1.79.0 /usr/lib/libboost_program_options.so.1.79.0 /usr/lib/libboost_regex.so.1.79.0 /usr/lib/libboost_system.so.1.79.0 /usr/lib/libboost_thread.so.1.79.0 /usr/lib/libdouble-conversion.so /usr/lib/libgflags.so.2.2.2 /usr/lib/libglog.so /usr/lib/libevent.so /usr/lib/libssl.so /usr/lib/libcrypto.so /usr/lib/libz.so /usr/lib/libbz2.so /usr/lib/liblzma.so /usr/lib/liblz4.so /usr/lib/libzstd.so /usr/lib/libsnappy.so /usr/lib/libiberty.a /usr/lib/libaio.so /usr/lib/libsodium.so /usr/lib/libunwind.so /usr/local/lib/libfmt.a /usr/lib/libjemalloc.so /usr/lib/libglog.so.0.6.0 /usr/lib/libgflags.so.2.2.2 -lpthread /usr/lib/libpng.so /home/xgupta/llvm/llvm-8/build/lib/libLLVMSupport.a -lz -lrt -ldl -ltinfo -lm /home/xgupta/llvm/llvm-8/build/lib/libLLVMDemangle.a && :
/usr/bin/ld: tools/png2bin/CMakeFiles/png2bin.dir/png2bin.cpp.o:(.data.rel.ro._ZTIN4llvm2cl3optIfLb0ENS0_6parserIfEEEE[_ZTIN4llvm2cl3optIfLb0ENS0_6parserIfEEEE]+0x18): undefined reference to typeinfo for llvm::cl::Option' /usr/bin/ld: tools/png2bin/CMakeFiles/png2bin.dir/png2bin.cpp.o:(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyIfEE[_ZTIN4llvm2cl15OptionValueCopyIfEE]+0x10): undefined reference to typeinfo for llvm::cl::GenericOptionValue'
/usr/bin/ld: tools/png2bin/CMakeFiles/png2bin.dir/png2bin.cpp.o:(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyIiEE[_ZTIN4llvm2cl15OptionValueCopyIiEE]+0x10): undefined reference to typeinfo for llvm::cl::GenericOptionValue' /usr/bin/ld: tools/png2bin/CMakeFiles/png2bin.dir/png2bin.cpp.o:(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE[_ZTIN4llvm2cl15OptionValueCopyINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE]+0x10): undefined reference to typeinfo for llvm::cl::GenericOptionValue'
/usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl3optINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ENS0_6parserIS7_EEEE[_ZTIN4llvm2cl3optINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEELb1ENS0_6parserIS7_EEEE]+0x18): undefined reference to typeinfo for llvm::cl::Option' /usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl3optIbLb1ENS0_6parserIbEEEE[_ZTIN4llvm2cl3optIbLb1ENS0_6parserIbEEEE]+0x18): undefined reference to typeinfo for llvm::cl::Option'
/usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl4listIN4glow11ImageLayoutESt6vectorIS3_SaIS3_EENS0_6parserIS3_EEEE[_ZTIN4llvm2cl4listIN4glow11ImageLayoutESt6vectorIS3_SaIS3_EENS0_6parserIS3_EEEE]+0x18): undefined reference to typeinfo for llvm::cl::Option' /usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl6parserIN4glow11ImageLayoutEEE[_ZTIN4llvm2cl6parserIN4glow11ImageLayoutEEE]+0x10): undefined reference to typeinfo for llvm::cl::generic_parser_base'
/usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyIN4glow11ImageLayoutEEE[_ZTIN4llvm2cl15OptionValueCopyIN4glow11ImageLayoutEEE]+0x10): undefined reference to typeinfo for llvm::cl::GenericOptionValue' /usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl4listIN4glow17ImageChannelOrderESt6vectorIS3_SaIS3_EENS0_6parserIS3_EEEE[_ZTIN4llvm2cl4listIN4glow17ImageChannelOrderESt6vectorIS3_SaIS3_EENS0_6parserIS3_EEEE]+0x18): undefined reference to typeinfo for llvm::cl::Option'
/usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl6parserIN4glow17ImageChannelOrderEEE[_ZTIN4llvm2cl6parserIN4glow17ImageChannelOrderEEE]+0x10): undefined reference to typeinfo for llvm::cl::generic_parser_base' /usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyIN4glow17ImageChannelOrderEEE[_ZTIN4llvm2cl15OptionValueCopyIN4glow17ImageChannelOrderEEE]+0x10): undefined reference to typeinfo for llvm::cl::GenericOptionValue'
/usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl4listIN4glow22ImageNormalizationModeESt6vectorIS3_SaIS3_EENS0_6parserIS3_EEEE[_ZTIN4llvm2cl4listIN4glow22ImageNormalizationModeESt6vectorIS3_SaIS3_EENS0_6parserIS3_EEEE]+0x18): undefined reference to typeinfo for llvm::cl::Option' /usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl6parserIN4glow22ImageNormalizationModeEEE[_ZTIN4llvm2cl6parserIN4glow22ImageNormalizationModeEEE]+0x10): undefined reference to typeinfo for llvm::cl::generic_parser_base'
/usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyIN4glow22ImageNormalizationModeEEE[_ZTIN4llvm2cl15OptionValueCopyIN4glow22ImageNormalizationModeEEE]+0x10): undefined reference to typeinfo for llvm::cl::GenericOptionValue' /usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl4listIN4glow12ImgDataRangeESt6vectorIS3_SaIS3_EENS0_6parserIS3_EEEE[_ZTIN4llvm2cl4listIN4glow12ImgDataRangeESt6vectorIS3_SaIS3_EENS0_6parserIS3_EEEE]+0x18): undefined reference to typeinfo for llvm::cl::Option'
/usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl6parserIN4glow12ImgDataRangeEEE[_ZTIN4llvm2cl6parserIN4glow12ImgDataRangeEEE]+0x10): undefined reference to typeinfo for llvm::cl::generic_parser_base' /usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyIN4glow12ImgDataRangeEEE[_ZTIN4llvm2cl15OptionValueCopyIN4glow12ImgDataRangeEEE]+0x10): undefined reference to typeinfo for llvm::cl::GenericOptionValue'
/usr/bin/ld: lib/Base/libBase.a(Image.cpp.o):(.data.rel.ro._ZTIN4llvm2cl15OptionValueCopyIbEE[_ZTIN4llvm2cl15OptionValueCopyIbEE]+0x10): undefined reference to `typeinfo for llvm::cl::GenericOptionValue'
collect2: error: ld returned 1 exit status

Glow require to build llvm with rtti info by using -DLLVM_ENABLE_RTTI=ON flag.