HyperLPR icon indicating copy to clipboard operation
HyperLPR copied to clipboard

c++环境部署报异常

Open Aixining opened this issue 2 years ago • 4 comments

小白一枚,c++环境部署报异常,请指教://home/ubuntu/lpr/HyperLPR/build/linux/install/hyperlpr3/lib/libMNN.so: undefined reference to std::_Sp_make_shared_tag::_S_eq(std::type_info const&)@GLIBCXX_3.4.26' //home/ubuntu/lpr/HyperLPR/build/linux/install/hyperlpr3/lib/libMNN.so: undefined reference to log@GLIBC_2.29' /home/ubuntu/lpr/HyperLPR/build/linux/install/hyperlpr3/lib/libhyperlpr3.so: undefined reference to std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()' //home/ubuntu/lpr/HyperLPR/build/linux/install/hyperlpr3/lib/libMNN.so: undefined reference to exp@GLIBC_2.29' /home/ubuntu/lpr/HyperLPR/build/linux/install/hyperlpr3/lib/libhyperlpr3.so: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::basic_stringstream()' collect2: error: ld returned 1 exit status CMakeFiles/PlateRecDemo.dir/build.make:109: recipe for target 'PlateRecDemo' failed make[2]: *** [PlateRecDemo] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/PlateRecDemo.dir/all' failed make[1]: *** [CMakeFiles/PlateRecDemo.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Aixining avatar Jul 10 '23 09:07 Aixining

可能是我提供的mnn库在你的计算机上出现依赖版本错误的问题:

  1. 请把你的系统信息告诉我,我这边尝试排查一下;
  2. 如果可以建议在你的计算机本地上重新编译一下MNN库,再去替换项目提供的第三方库,MNN请使用2.2.0以上版本:https://github.com/alibaba/MNN/releases

tunmx avatar Jul 10 '23 09:07 tunmx

cpu信息吗:Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 2 Core(s) per socket: 4 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 158 Model name: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz Stepping: 9 CPU MHz: 1001.027 CPU max MHz: 4200.0000 CPU min MHz: 800.0000 BogoMIPS: 7200.00 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 8192K NUMA node0 CPU(s): 0-7 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb invpcid_single pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d

Aixining avatar Jul 11 '23 02:07 Aixining

我重新编译了MNN库,目前还有报错:,何解呢?请指教 [100%] Linking CXX executable PlateRecDemo /home/ubuntu/lpr/HyperLPR/Prj-Linux/hyperlpr3/lib/libhyperlpr3.so: undefined reference to std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream()' /home/ubuntu/lpr/HyperLPR/Prj-Linux/hyperlpr3/lib/libhyperlpr3.so: undefined reference to std::__cxx11::basic_stringstream<char, std::char_traits, std::allocator >::basic_stringstream()' collect2: error: ld returned 1 exit status CMakeFiles/PlateRecDemo.dir/build.make:109: recipe for target 'PlateRecDemo' failed make[2]: *** [PlateRecDemo] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/PlateRecDemo.dir/all' failed make[1]: *** [CMakeFiles/PlateRecDemo.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2

Aixining avatar Jul 11 '23 06:07 Aixining

检查一下编译的环境,如gcc版本和链接的标准库是否匹配

tunmx avatar Jul 12 '23 00:07 tunmx