Closed rsingh2083 closed 2 years ago
Your build is missing some libraries (glslang). Please existent/check/modify the location of the libraries below
/usr/lib/aarch64-linux-gnu/libvulkan.so /usr/local/lib/ncnn/libglslang.a /usr/local/lib/ncnn/libOGLCompiler.a /usr/local/lib/ncnn/libOSDependent.a /usr/local/lib/ncnn/libSPIRV.a
I'll check and get back
Your build is missing some libraries (glslang). Please existent/check/modify the location of the libraries below
/usr/lib/aarch64-linux-gnu/libvulkan.so /usr/local/lib/ncnn/libglslang.a /usr/local/lib/ncnn/libOGLCompiler.a /usr/local/lib/ncnn/libOSDependent.a /usr/local/lib/ncnn/libSPIRV.a
Ive got all these 5 libraries at their exact location as mentioned by you. Still same error
Sir its still not working. Can you share you build command, ill try that also. Or let me know if thers anything else I should try
I'm sorry to hear it's still not working. I've just downloaded the example and load it in Code::Blocks. It works right away. Below a screen dump of the build
Sir pasting my entire build log. This application ran fine on JP4.2 , but on this another jetson Ive installed JP4.5 and overclocked it succesfully with opencv4, ncnn and caffe installed from your references. I even built and installed https://github.com/KhronosGroup/glslang (which I did not do for the previous Jetson nano).
Heres the entire build log :-
nsoc@nsoc-desktop:~/Face-Recognition-Jetson-Nano$ g++ -L/usr/local/lib/ -L/usr/lib/ -o bin/Release/FaceRecognition obj/Release/src/main.o obj/Release/src/TArcface.o obj/Release/src/TBlur.o obj/Release/src/TLive.o obj/Release/src/TMtCNN.o obj/Release/src/TRetina.o obj/Release/src/TWarp.o -fopenmp -I/usr/local/include/glslang/glslang -I/usr/include/opencv4/opencv -I/usr/include/opencv4 -lopencv_gapi -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_cudabgsegm -lopencv_cudafeatures2d -lopencv_cudaobjdetect -lopencv_cudastereo -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_highgui -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_hfs -lopencv_img_hash -lopencv_line_descriptor -lopencv_quality -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_sfm -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_cudacodec -lopencv_surface_matching -lopencv_tracking -lopencv_datasets -lopencv_text -lopencv_dnn -lopencv_plot -lopencv_videostab -lopencv_cudaoptflow -lopencv_optflow -lopencv_cudalegacy -lopencv_video -lopencv_videoio -lopencv_cudawarping -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_imgproc -lopencv_cudaarithm -lopencv_core -lopencv_cudev -ldl -lpthread -s /usr/local/lib/ncnn/libglslang.a /usr/local/lib/ncnn/libncnn.a /usr/lib/aarch64-linux-gnu/libvulkan.so /usr/local/lib/ncnn/libglslang.a /usr/local/lib/ncnn/libOGLCompiler.a /usr/local/lib/ncnn/libOSDependent.a /usr/local/lib/ncnn/libSPIRV.a /usr/local/lib/glslang/libglslang.a
/usr/local/lib/ncnn/libncnn.a(gpu.cpp.o): In function `ncnn::destroy_gpu_instance()':
gpu.cpp:(.text+0x1008): undefined reference to `glslang::FinalizeProcess()'
/usr/local/lib/ncnn/libncnn.a(gpu.cpp.o): In function `ncnn::create_gpu_instance()':
gpu.cpp:(.text+0x4128): undefined reference to `glslang::InitializeProcess()'
/usr/local/lib/ncnn/libncnn.a(gpu.cpp.o): In function `ncnn::compile_spirv_module(char const*, int, ncnn::Option const&, std::vector<unsigned int, std::allocator<unsigned int> >&)':
gpu.cpp:(.text+0x7638): undefined reference to `glslang::TShader::TShader(EShLanguage)'
gpu.cpp:(.text+0x7650): undefined reference to `glslang::TShader::setStringsWithLengths(char const* const*, int const*, int)'
gpu.cpp:(.text+0x7668): undefined reference to `glslang::TShader::addProcesses(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
gpu.cpp:(.text+0x7674): undefined reference to `glslang::TShader::setEntryPoint(char const*)'
gpu.cpp:(.text+0x7680): undefined reference to `glslang::TShader::setSourceEntryPoint(char const*)'
gpu.cpp:(.text+0x7814): undefined reference to `glslang::TShader::parse(TBuiltInResource const*, int, EProfile, bool, bool, EShMessages, glslang::TShader::Includer&)'
gpu.cpp:(.text+0x7858): undefined reference to `glslang::TShader::getInfoLog()'
gpu.cpp:(.text+0x7878): undefined reference to `glslang::TShader::getInfoDebugLog()'
gpu.cpp:(.text+0x7894): undefined reference to `glslang::TShader::~TShader()'
gpu.cpp:(.text+0x8220): undefined reference to `glslang::TShader::~TShader()'
/usr/local/lib/ncnn/libSPIRV.a(GlslangToSpv.cpp.o): In function `(anonymous namespace)::TGlslangToSpvTraverser::convertGlslangStructToSpvType(glslang::TType const&, glslang::TVector<glslang::TTypeLoc> const*, glslang::TLayoutPacking, glslang::TQualifier const&)':
GlslangToSpv.cpp:(.text+0x92b4): undefined reference to `glslang::TIntermediate::computeTypeLocationSize(glslang::TType const&, EShLanguage)'
GlslangToSpv.cpp:(.text+0x97dc): undefined reference to `glslang::TIntermediate::getMemberAlignment(glslang::TType const&, int&, int&, glslang::TLayoutPacking, bool)'
GlslangToSpv.cpp:(.text+0x9818): undefined reference to `glslang::TIntermediate::improperStraddle(glslang::TType const&, int, int)'
GlslangToSpv.cpp:(.text+0x9a88): undefined reference to `glslang::TIntermediate::getMemberAlignment(glslang::TType const&, int&, int&, glslang::TLayoutPacking, bool)'
/usr/local/lib/ncnn/libSPIRV.a(GlslangToSpv.cpp.o): In function `(anonymous namespace)::TGlslangToSpvTraverser::convertGlslangToSpvType(glslang::TType const&, glslang::TLayoutPacking, glslang::TQualifier const&, bool, bool)':
GlslangToSpv.cpp:(.text+0xad40): undefined reference to `glslang::TIntermediate::getMemberAlignment(glslang::TType const&, int&, int&, glslang::TLayoutPacking, bool)'
GlslangToSpv.cpp:(.text+0xb200): undefined reference to `glslang::TIntermediate::getMemberAlignment(glslang::TType const&, int&, int&, glslang::TLayoutPacking, bool)'
/usr/local/lib/ncnn/libSPIRV.a(GlslangToSpv.cpp.o): In function `(anonymous namespace)::TGlslangToSpvTraverser::visitBinary(glslang::TVisit, glslang::TIntermBinary*)':
GlslangToSpv.cpp:(.text+0xbb68): undefined reference to `glslang::TIntermediate::getBaseAlignmentScalar(glslang::TType const&, int&)'
GlslangToSpv.cpp:(.text+0xc328): undefined reference to `glslang::TIntermediate::getBaseAlignmentScalar(glslang::TType const&, int&)'
GlslangToSpv.cpp:(.text+0xcda4): undefined reference to `glslang::TIntermediate::getBaseAlignmentScalar(glslang::TType const&, int&)'
/usr/local/lib/ncnn/libSPIRV.a(GlslangToSpv.cpp.o): In function `(anonymous namespace)::TGlslangToSpvTraverser::convertGlslangToSpvType(glslang::TType const&, glslang::TLayoutPacking, glslang::TQualifier const&, bool, bool) [clone .constprop.1111]':
GlslangToSpv.cpp:(.text+0xec90): undefined reference to `glslang::TIntermediate::getMemberAlignment(glslang::TType const&, int&, int&, glslang::TLayoutPacking, bool)'
GlslangToSpv.cpp:(.text+0xf138): undefined reference to `glslang::TIntermediate::getMemberAlignment(glslang::TType const&, int&, int&, glslang::TLayoutPacking, bool)'
/usr/local/lib/ncnn/libSPIRV.a(GlslangToSpv.cpp.o): In function `(anonymous namespace)::TGlslangToSpvTraverser::getSymbolId(glslang::TIntermSymbol const*)':
GlslangToSpv.cpp:(.text+0x16c88): undefined reference to `glslang::GetThreadPoolAllocator()'
GlslangToSpv.cpp:(.text+0x17f98): undefined reference to `glslang::TPoolAllocator::allocate(unsigned long)'
/usr/local/lib/ncnn/libSPIRV.a(GlslangToSpv.cpp.o): In function `(anonymous namespace)::TGlslangToSpvTraverser::visitAggregate(glslang::TVisit, glslang::TIntermAggregate*)':
GlslangToSpv.cpp:(.text+0x1ce24): undefined reference to `glslang::TIntermediate::findLinkerObjects() const'
/usr/local/lib/ncnn/libSPIRV.a(GlslangToSpv.cpp.o): In function `glslang::GlslangToSpv(glslang::TIntermediate const&, std::vector<unsigned int, std::allocator<unsigned int> >&, spv::SpvBuildLogger*, glslang::SpvOptions*)':
GlslangToSpv.cpp:(.text+0x1e504): undefined reference to `glslang::GetThreadPoolAllocator()'
GlslangToSpv.cpp:(.text+0x1e508): undefined reference to `glslang::TPoolAllocator::push()'
GlslangToSpv.cpp:(.text+0x1e540): undefined reference to `glslang::GetThreadPoolAllocator()'
GlslangToSpv.cpp:(.text+0x1e568): undefined reference to `glslang::GetKhronosToolId()'
GlslangToSpv.cpp:(.text+0x1ec38): undefined reference to `glslang::GetThreadPoolAllocator()'
GlslangToSpv.cpp:(.text+0x1ec3c): undefined reference to `glslang::TPoolAllocator::pop()'
/usr/local/lib/ncnn/libSPIRV.a(GlslangToSpv.cpp.o): In function `glslang::TType::setFieldName(std::__cxx11::basic_string<char, std::char_traits<char>, glslang::pool_allocator<char> > const&)':
GlslangToSpv.cpp:(.text._ZN7glslang5TType12setFieldNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEE[_ZN7glslang5TType12setFieldNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEE]+0x1c): undefined reference to `glslang::GetThreadPoolAllocator()'
GlslangToSpv.cpp:(.text._ZN7glslang5TType12setFieldNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEE[_ZN7glslang5TType12setFieldNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEE]+0x24): undefined reference to `glslang::TPoolAllocator::allocate(unsigned long)'
GlslangToSpv.cpp:(.text._ZN7glslang5TType12setFieldNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEE[_ZN7glslang5TType12setFieldNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEE]+0x2c): undefined reference to `glslang::GetThreadPoolAllocator()'
GlslangToSpv.cpp:(.text._ZN7glslang5TType12setFieldNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEE[_ZN7glslang5TType12setFieldNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcENS_14pool_allocatorIcEEEE]+0xa4): undefined reference to `glslang::TPoolAllocator::allocate(unsigned long)'
/usr/local/lib/ncnn/libSPIRV.a(GlslangToSpv.cpp.o): In function `void std::vector<glslang::TArraySize, glslang::pool_allocator<glslang::TArraySize> >::_M_range_insert<__gnu_cxx::__normal_iterator<glslang::TArraySize*, std::vector<glslang::TArraySize, glslang::pool_allocator<glslang::TArraySize> > > >(__gnu_cxx::__normal_iterator<glslang::TArraySize*, std::vector<glslang::TArraySize, glslang::pool_allocator<glslang::TArraySize> > >, __gnu_cxx::__normal_iterator<glslang::TArraySize*, std::vector<glslang::TArraySize, glslang::pool_allocator<glslang::TArraySize> > >, __gnu_cxx::__normal_iterator<glslang::TArraySize*, std::vector<glslang::TArraySize, glslang::pool_allocator<glslang::TArraySize> > >, std::forward_iterator_tag)':
GlslangToSpv.cpp:(.text._ZNSt6vectorIN7glslang10TArraySizeENS0_14pool_allocatorIS1_EEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPS1_S4_EEEEvS9_T_SA_St20forward_iterator_tag[_ZNSt6vectorIN7glslang10TArraySizeENS0_14pool_allocatorIS1_EEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPS1_S4_EEEEvS9_T_SA_St20forward_iterator_tag]+0xf4): undefined reference to `glslang::TPoolAllocator::allocate(unsigned long)'
/usr/local/lib/ncnn/libSPIRV.a(GlslangToSpv.cpp.o): In function `glslang::TType::TType(glslang::TType const&, int, bool)':
GlslangToSpv.cpp:(.text._ZN7glslang5TTypeC2ERKS0_ib[_ZN7glslang5TTypeC5ERKS0_ib]+0x2e4): undefined reference to `glslang::GetThreadPoolAllocator()'
GlslangToSpv.cpp:(.text._ZN7glslang5TTypeC2ERKS0_ib[_ZN7glslang5TTypeC5ERKS0_ib]+0x2ec): undefined reference to `glslang::TPoolAllocator::allocate(unsigned long)'
GlslangToSpv.cpp:(.text._ZN7glslang5TTypeC2ERKS0_ib[_ZN7glslang5TTypeC5ERKS0_ib]+0x334): undefined reference to `glslang::GetThreadPoolAllocator()'
GlslangToSpv.cpp:(.text._ZN7glslang5TTypeC2ERKS0_ib[_ZN7glslang5TTypeC5ERKS0_ib]+0x33c): undefined reference to `glslang::TPoolAllocator::allocate(unsigned long)'
GlslangToSpv.cpp:(.text._ZN7glslang5TTypeC2ERKS0_ib[_ZN7glslang5TTypeC5ERKS0_ib]+0x344): undefined reference to `glslang::GetThreadPoolAllocator()'
collect2: error: ld returned 1 exit status
I got the same problem. Have you solved it ? Thanks.
@huanghsuanfu
Which setting are you using? JetPack, nccn, virtual environment(?), OpenCV, other things you might think off. My problem here is that I can't reproduce the error. The app is running just fine. Recently I've flashed a new SD with JP 4.5 and installed everything fresh from scratch, and no problem at all.
I think the problem is NCNN's version. I use the version with tag is 20201218 and it could work now.
Oh, great news! @rsingh2083 Did you read @huanghsuanfu lost post?
This issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Thank you.