Closed chenloveheimei closed 3 years ago
你要运行在arm上,为什么会用x86的编译脚本
你要运行在arm上,为什么会用x86的编译脚本
1.scripts编译是否正确 long@long-Ubuntu:~/soft/TNN/scripts$ ls build32 build_cuda_linux.sh build_msvc.bat build64 build_ios.sh build_msvc_naive.bat build_aarch64_linux build_linux build_test.sh build_aarch64_linux.sh build_linux_naive.sh linux_release build_aarch64_macos.sh build_linux.sh release build_android.sh build_macos_naive.sh version build_armhf_linux.sh build_macos.sh long@long-Ubuntu:~/soft/TNN/scripts$ ./build_aarch64_linux.sh 编译这个是否正确?
你们编译文档里面写./build_arm_linux.sh编译这个,但是scripts里面没有这个,你们也没有更新说明文档.
2.example编译是否正确 long@long-Ubuntu:~/soft/TNN/examples$ ls android assets base cuda ios linux README.md utils x86 long@long-Ubuntu:~/soft/TNN/examples/linux$ ls build_aarch64_linux.sh build_linux.sh Readme.md build_armhf_linux.sh CMakeLists.txt src 选择linux编译吗?选择哪个编译?
64位就用build_aarch64_linux.sh,32位用build_armhf_linux.sh
64位就用build_aarch64_linux.sh,32位用build_armhf_linux.sh
long@long-Ubuntu:~/soft/TNN/examples/linux$ ./build_aarch64_linux.sh
mkdir: 无法创建目录"build_aarch64_linux": 文件已存在
/home/long/soft/TNN
/home/long/soft/TNN
-- >>>>>>>>>>>>>
-- TNN BUILD INFO:
-- System: Linux
-- Processor: aarch64
-- Cpu: OFF
-- X86: OFF
-- Arm: ON
-- Arm82: OFF
-- Metal: OFF
-- OpenCL: OFF
-- CUDA: OFF
-- DSP: OFF
-- Atlas: OFF
-- TensorRT: OFF
-- HuaweiNPU: OFF
-- RKNPU: OFF
-- OpenVINO: OFF
-- OpenMP: ON
-- TEST: ON
-- --Unit Test: OFF
-- Qantization: OFF
-- ModelCheck: OFF
-- DEBUG:
-- PROFILE: OFF
-- BENCHMARK: OFF
-- BENCHMARK Layer: OFF
-- Model Converter: OFF
-- TNN2MEM: OFF
-- BENCHMARK Test Lib: OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/long/soft/TNN/scripts/build_aarch64_linux
[ 2%] Built target gflags_nothreads_static
[ 31%] Built target TNNArm
[ 99%] Built target TNN
[100%] Built target TNNTest
/home/long/soft/TNN/examples/linux
rm: 无法删除'build': 没有那个文件或目录
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/aarch64-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
/home/long/soft/TNN/examples/linux
../../scripts/build_aarch64_linux/
-- Configuring done
-- Generating done
-- Build files have been written to: /home/long/soft/TNN/examples/linux/build
Scanning dependencies of target demo_arm_linux_imageclassify
Scanning dependencies of target demo_arm_linux_facedetector
[ 2%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/src/face_detector.cc.o
[ 4%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/blazeface_detector.cc.o
[ 7%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/blazepose_detector.cc.o
[ 9%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/src/image_classify.cc.o
[ 11%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/blazepose_landmark.cc.o
[ 14%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/face_detect_aligner.cc.o
[ 16%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/blazeface_detector.cc.o
[ 19%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/face_detect_mesh.cc.o
[ 21%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/blazepose_detector.cc.o
[ 23%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/face_gray_transfer.cc.o
[ 26%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/face_mesh.cc.o
[ 28%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/blazepose_landmark.cc.o
[ 30%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/face_detect_aligner.cc.o
[ 33%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/face_detect_mesh.cc.o
[ 35%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/hair_segmentation.cc.o
[ 38%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/face_gray_transfer.cc.o
[ 40%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/face_mesh.cc.o
[ 42%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/image_classifier.cc.o
[ 45%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/hair_segmentation.cc.o
[ 47%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/image_classifier.cc.o
[ 50%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/object_detector_ssd.cc.o
[ 52%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/object_detector_ssd.cc.o
[ 54%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/object_detector_yolo.cc.o
[ 57%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/pose_detect_landmark.cc.o
[ 59%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/sample_timer.cc.o
[ 61%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/object_detector_yolo.cc.o
[ 64%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/skeleton_detector.cc.o
[ 66%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/tnn_fps_counter.cc.o
[ 69%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/tnn_sdk_sample.cc.o
[ 71%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/ultra_face_detector.cc.o
[ 73%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/pose_detect_landmark.cc.o
[ 76%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/utils/utils.cc.o
[ 78%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/sample_timer.cc.o
[ 80%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/skeleton_detector.cc.o
[ 83%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/tnn_fps_counter.cc.o
[ 85%] Building CXX object CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/youtu_face_align.cc.o
[ 88%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/tnn_sdk_sample.cc.o
[ 90%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/ultra_face_detector.cc.o
[ 92%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/utils/utils.cc.o
[ 95%] Building CXX object CMakeFiles/demo_arm_linux_imageclassify.dir/home/long/soft/TNN/examples/base/youtu_face_align.cc.o
[ 97%] Linking CXX executable demo_arm_linux_facedetector
CMakeFiles/demo_arm_linux_facedetector.dir/home/long/soft/TNN/examples/base/blazepose_landmark.cc.o:在函数‘tnn::BlazePoseLandmark::SmoothingLandmarks(std::vector<tnn::ObjectInfo, std::allocator
在x86 linux上使用build_linux.sh是会报找不到openvino的库 我更改了一下相关路径就可以运行了
TNN_OPENVINO_LIB_PATH=../../scripts/linux_release/lib
1. 环境(environment)
RunTime DEVICE: ARM
2. Github版本
commit(optional):
3. 编译方式(compile method) CMake完整编译参数(full cmake arguments)
4. 编译日志(build log)
5. 详细描述bug 情况 (Describe the bug) /usr/bin/ld: warning: libinference_engine_transformations.so, needed by //home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so, not found (try using -rpath or -rpath-link) CMakeFiles/demo_x86_imageclassify.dir/home/long/soft/TNN/examples/base/blazepose_landmark.cc.o:在函数‘tnn::BlazePoseLandmark::SmoothingLandmarks(std::vector<tnn::ObjectInfo, std::allocator >&)’中:
blazepose_landmark.cc:(.text+0x82c):对‘tnn::Now()’未定义的引用
blazepose_landmark.cc:(.text+0x858):对‘tnn::VelocityFilter::Apply(std::vector<std::tuple<float, float, float>, std::allocator<std::tuple<float, float, float> > > const&, std::pair<int, int> const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::vector<std::tuple<float, float, float>, std::allocator<std::tuple<float, float, float> > >)’未定义的引用
CMakeFiles/demo_x86_imageclassify.dir/home/long/soft/TNN/examples/base/skeleton_detector.cc.o:在函数‘tnn::SkeletonDetector::SmoothingLandmarks(tnn::SkeletonDetectorOutput)’中:
skeleton_detector.cc:(.text+0x38a):对‘tnn::Now()’未定义的引用
skeleton_detector.cc:(.text+0x3c9):对‘tnn::VelocityFilter::Apply2D(std::vector<std::pair<float, float>, std::allocator<std::pair<float, float> > > const&, std::pair<int, int> const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::vector<std::pair<float, float>, std::allocator<std::pair<float, float> > >*)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::ConvertOneHotToOneHotIE::run_on_function(std::shared_ptr)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘typeinfo for ngraph::op::HardSigmoid_IE’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘typeinfo for ngraph::op::Eltwise’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::CommonOptimizations::run_on_function(std::shared_ptr)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::ConvertOneHotToOneHotIE::convert_one_hot()’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘vtable for ngraph::pass::ConvertOpSet2ToOpSet1’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::ConvertOpSet3ToOpSet2::run_on_function(std::shared_ptr)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘vtable for ngraph::pass::ConvertOneHotToOneHotIE’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘typeinfo for ngraph::op::OneHotIE’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘vtable for ngraph::pass::ConvertOpSet1ToLegacy’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::getPrimitivesPriority[abi:cxx11](std::shared_ptr const&)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::ConvertOpSet1ToLegacy::run_on_function(std::shared_ptr)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘vtable for ngraph::pass::CommonOptimizations’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::ConvertOpSet2ToOpSet1::run_on_function(std::shared_ptr)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘typeinfo for ngraph::op::GatherIE’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘vtable for ngraph::pass::ConvertOpSet3ToOpSet2’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::getFusedNames[abi:cxx11](std::shared_ptr const&)’未定义的引用
collect2: error: ld returned 1 exit status
CMakeFiles/demo_x86_imageclassify.dir/build.make:387: recipe for target 'demo_x86_imageclassify' failed
make[2]: [demo_x86_imageclassify] Error 1
CMakeFiles/Makefile2:96: recipe for target 'CMakeFiles/demo_x86_imageclassify.dir/all' failed
make[1]: [CMakeFiles/demo_x86_imageclassify.dir/all] Error 2
make[1]: 正在等待未完成的任务....
[100%] Linking CXX executable demo_x86_facedetector
/usr/bin/ld: warning: libinference_engine_transformations.so, needed by //home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so, not found (try using -rpath or -rpath-link)
CMakeFiles/demo_x86_facedetector.dir/home/long/soft/TNN/examples/base/blazepose_landmark.cc.o:在函数‘tnn::BlazePoseLandmark::SmoothingLandmarks(std::vector<tnn::ObjectInfo, std::allocator >&)’中:
blazepose_landmark.cc:(.text+0x82c):对‘tnn::Now()’未定义的引用
blazepose_landmark.cc:(.text+0x858):对‘tnn::VelocityFilter::Apply(std::vector<std::tuple<float, float, float>, std::allocator<std::tuple<float, float, float> > > const&, std::pair<int, int> const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::vector<std::tuple<float, float, float>, std::allocator<std::tuple<float, float, float> > > )’未定义的引用
CMakeFiles/demo_x86_facedetector.dir/home/long/soft/TNN/examples/base/skeleton_detector.cc.o:在函数‘tnn::SkeletonDetector::SmoothingLandmarks(tnn::SkeletonDetectorOutput)’中:
skeleton_detector.cc:(.text+0x38a):对‘tnn::Now()’未定义的引用
skeleton_detector.cc:(.text+0x3c9):对‘tnn::VelocityFilter::Apply2D(std::vector<std::pair<float, float>, std::allocator<std::pair<float, float> > > const&, std::pair<int, int> const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::vector<std::pair<float, float>, std::allocator<std::pair<float, float> > >)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::ConvertOneHotToOneHotIE::run_on_function(std::shared_ptr)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘typeinfo for ngraph::op::HardSigmoid_IE’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘typeinfo for ngraph::op::Eltwise’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::CommonOptimizations::run_on_function(std::shared_ptr)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::ConvertOneHotToOneHotIE::convert_one_hot()’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘vtable for ngraph::pass::ConvertOpSet2ToOpSet1’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::ConvertOpSet3ToOpSet2::run_on_function(std::shared_ptr)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘vtable for ngraph::pass::ConvertOneHotToOneHotIE’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘typeinfo for ngraph::op::OneHotIE’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘vtable for ngraph::pass::ConvertOpSet1ToLegacy’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::getPrimitivesPriority[abi:cxx11](std::shared_ptr const&)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::ConvertOpSet1ToLegacy::run_on_function(std::shared_ptr)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘vtable for ngraph::pass::CommonOptimizations’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::pass::ConvertOpSet2ToOpSet1::run_on_function(std::shared_ptr)’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘typeinfo for ngraph::op::GatherIE’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘vtable for ngraph::pass::ConvertOpSet3ToOpSet2’未定义的引用
//home/long/soft/TNN/scripts/../scripts/build_linux/openvinoInstallShared/deployment_tools/inference_engine/lib/intel64/libinference_engine_legacy.so:对‘ngraph::getFusedNames[abi:cxx11](std::shared_ptr const&)’未定义的引用
collect2: error: ld returned 1 exit status
CMakeFiles/demo_x86_facedetector.dir/build.make:387: recipe for target 'demo_x86_facedetector' failed
make[2]: ** [demo_x86_facedetector] Error 1
CMakeFiles/Makefile2:123: recipe for target 'CMakeFiles/demo_x86_facedetector.dir/all' failed
make[1]: [CMakeFiles/demo_x86_facedetector.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2
6. 运行日志(runtime log)
7. 截图(Screenshots)