Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on building Optimization tool #1

Open
supporto-wifiproject opened this issue May 2, 2023 · 4 comments
Open

Error on building Optimization tool #1

supporto-wifiproject opened this issue May 2, 2023 · 4 comments

Comments

@supporto-wifiproject
Copy link

According to your guide I modified Paddle-Lite/lite/tools/build_linux.sh file.
But when I build it with ./lite/tools/build_linux.sh --arch=armv8 --with_extra=ON --with_cv=ON build_optimize_tool I got this error:
[90%] Building CXX object lite/kernels/CMakeFiles/kernels.dir/__/__/all_kernel_faked_dir/yolo_box_kXPU_kFloat_kNCHW_def_class.cc.o
[ 90%] Linking CXX static library libkernels.a
[ 90%] Built target kernels
make[1]: *** [CMakeFiles/Makefile2:1605: lite/api/CMakeFiles/opt.dir/rule] Error 2
make: *** [Makefile:436: opt] Error 2
How can I fix this?
Thanks in advance

@Qengineering
Copy link
Owner

The GNU error is too general to suggest the course. It can be almost anything.
Have to say we didn't experience any issues during the build.

Fortunately, the models provide can be used.
The optimizer is only needed in case of a new release of Paddle-Lite.

@kevinzezel
Copy link

Hi,

Same error! I have a custom ocr model in paddleocr_v4 and i need to convert with optimizer.

pi@raspberrypi:~/packages/Paddle-Lite $ ./lite/tools/build_linux.sh --arch=armv8 --with_extra=ON --with_cv=ON build_optimize_tool
/home/pi/packages/Paddle-Lite
-- Found Paddle host system: debian, version: 
-- Found Paddle host system's CPU: 4 cores
-- The CXX compiler identification is GNU 12.2.0
-- The C compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- CXX compiler: /usr/bin/c++, version: GNU 12.2.0
-- C compiler: /usr/bin/cc, version: GNU 12.2.0
-- AR tools: /usr/bin/ar
-- CMAKE GENERATOR: Unix Makefiles
-- Found Git: /usr/bin/git (found version "2.39.2") 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Performing Test FMA_FOUND
-- Performing Test FMA_FOUND - Failed
-- Performing Test MMX_FOUND
-- Performing Test MMX_FOUND - Failed
-- Performing Test SSE2_FOUND
-- Performing Test SSE2_FOUND - Failed
-- Performing Test SSE3_FOUND
-- Performing Test SSE3_FOUND - Failed
-- Performing Test AVX_FOUND
-- Performing Test AVX_FOUND - Failed
-- Performing Test AVX2_FOUND
-- Performing Test AVX2_FOUND - Failed
-- Performing Test AVX512F_FOUND
-- Performing Test AVX512F_FOUND - Failed
-- CMAKE_BUILD_TYPE: RelWithDebInfo
-- Do not have AVX2 intrinsics and disabled MKL-DNN
-- Protobuf protoc executable: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/protobuf/bin/protoc
-- Protobuf-lite library: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/protobuf/lib/libprotobuf-lite.a
-- Protobuf library: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/protobuf/lib/libprotobuf.a
-- Protoc library: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/protobuf/lib/libprotoc.a
-- Protobuf version: 3.3.0
-- BLAS library: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/openblas/lib/libopenblas.a
-- BLAS Include: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/openblas/include
CMake Warning (dev) at /usr/share/cmake-3.25/Modules/ExternalProject.cmake:3075 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  /usr/share/cmake-3.25/Modules/ExternalProject.cmake:4185 (_ep_add_download_command)
  cmake/external/eigen.cmake:16 (ExternalProject_Add)
  cmake/backends/common.cmake:44 (include)
  CMakeLists.txt:157 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Paddle version is 0.0.0
-- Looking for UINT64_MAX
-- Looking for UINT64_MAX - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of pthread_spinlock_t
-- Check size of pthread_spinlock_t - done
-- Check size of pthread_barrier_t
-- Check size of pthread_barrier_t - done
-- Performing Test C_COMPILER_SUPPORT_FLAG__fPIC
-- Performing Test C_COMPILER_SUPPORT_FLAG__fPIC - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__fPIC
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__fPIC - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer
-- Performing Test C_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__fno_omit_frame_pointer - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Werror
-- Performing Test C_COMPILER_SUPPORT_FLAG__Werror - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Werror
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Werror - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wall
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wall - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wall
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wall - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wextra
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wextra - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wextra
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wextra - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor - Failed
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wnon_virtual_dtor - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor - Failed
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wdelete_non_virtual_dtor - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_but_set_variable
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_but_set_variable - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_but_set_variable
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_but_set_variable - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unknown_pragmas
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unknown_pragmas - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unknown_pragmas
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unknown_pragmas - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_strict_aliasing
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_strict_aliasing - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_strict_aliasing
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_strict_aliasing - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_parameter
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_parameter - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_parameter
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_parameter - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_function
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_unused_function - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_function
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_unused_function - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_literal_suffix - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_sign_compare
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_sign_compare - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_sign_compare
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_sign_compare - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_unused_local_typedefs - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality - Failed
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_parentheses_equality - Failed
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_ignored_attributes - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_terminate
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_terminate - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_terminate
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_terminate - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_int_in_bool_context
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_int_in_bool_context - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_int_in_bool_context
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_int_in_bool_context - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wimplicit_fallthrough_0
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wimplicit_fallthrough_0 - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wimplicit_fallthrough_0
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wimplicit_fallthrough_0 - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_maybe_uninitialized
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_maybe_uninitialized - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_maybe_uninitialized
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_maybe_uninitialized - Success
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_deprecated_copy
-- Performing Test C_COMPILER_SUPPORT_FLAG__Wno_error_deprecated_copy - Success
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_deprecated_copy
-- Performing Test CXX_COMPILER_SUPPORT_FLAG__Wno_error_deprecated_copy - Success
-- LITE_WITH_X86:       OFF
-- LITE_WITH_ARM:       OFF
-- LITE_WITH_SW:        OFF
-- LITE_WITH_OPENCL:    OFF
-- LITE_WITH_METAL:     OFF
-- LITE_WITH_XPU:       OFF
-- LITE_WITH_NNADAPTER: OFF
-- LITE_WITH_PROFILE:   OFF
-- LITE_WITH_CV:        OFF
-- add lite kernels
-- compile with lite host kernels
-- compile with lite ARM kernels
-- compile with lite Metal kernels
-- Found PythonInterp: /usr/bin/python (found version "3.11.2") 
-- tag: v2.13-rc
-- branch: HEAD
-- commit: 102697b
-- bundled_tgt_full_name:  /home/pi/packages/Paddle-Lite/build.opt/libpaddle_api_full_bundled.a
-- bundled_tgt_full_name:  /home/pi/packages/Paddle-Lite/build.opt/libpaddle_api_light_bundled.a
-- Compiling opt
-- publish inference lib to /home/pi/packages/Paddle-Lite/build.opt/inference_lite_lib
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/packages/Paddle-Lite/build.opt
[  1%] Performing build step for 'extern_protobuf'
[  1%] Creating directories for 'extern_gflags'
[  1%] No download step for 'extern_gflags'
[  1%] Built target fbs_headers
[  1%] No update step for 'extern_gflags'
[  1%] No patch step for 'extern_gflags'
[ 12%] Built target libprotobuf-lite
[  1%] Performing configure step for 'extern_gflags'
[ 51%] Built target libprotobuf
[ 52%] Building CXX object CMakeFiles/libprotoc.dir/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc.o
[ 53%] Building CXX object CMakeFiles/libprotoc.dir/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_message_lite.cc.o
[ 53%] Building CXX object CMakeFiles/libprotoc.dir/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_message_field_lite.cc.o
In file included from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/descriptor.pb.h:27,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_helpers.h:41,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_message_field_lite.cc:41:
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2089:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2089 |     : public std::iterator<
      |                   ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
                 from /usr/include/c++/12/bits/stl_tree.h:63,
                 from /usr/include/c++/12/map:60,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_message_field_lite.cc:35:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2093:16: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2093 |   typedef std::iterator<
      |                ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2185:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2185 |     : public std::iterator<std::random_access_iterator_tag, Element*> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2188:16: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2188 |   typedef std::iterator<
      |                ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
In file included from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/descriptor.pb.h:27,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_helpers.h:41,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc:48:
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2089:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2089 |     : public std::iterator<
      |                   ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
                 from /usr/include/c++/12/memory:63,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.h:38,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc:35:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2093:16: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2093 |   typedef std::iterator<
      |                ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2334:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2334 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2185:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2185 |     : public std::iterator<std::random_access_iterator_tag, Element*> {
      |                   ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2360:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2360 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2188:16: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2188 |   typedef std::iterator<
      |                ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2392:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2392 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2422:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2422 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2334:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2334 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2360:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2360 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2392:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2392 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2422:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2422 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
In file included from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/descriptor.pb.h:27,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_helpers.h:41,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_message_lite.cc:51:
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2089:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2089 |     : public std::iterator<
      |                   ^~~~~~~~
In file included from /usr/include/c++/12/string:45,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_message_lite.h:38,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_message_lite.cc:35:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2093:16: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2093 |   typedef std::iterator<
      |                ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2185:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2185 |     : public std::iterator<std::random_access_iterator_tag, Element*> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2188:16: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2188 |   typedef std::iterator<
      |                ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2334:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2334 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2360:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2360 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2392:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2392 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/repeated_field.h:2422:19: warning: ‘template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator’ is deprecated [-Wdeprecated-declarations]
 2422 |     : public std::iterator<std::output_iterator_tag, T> {
      |                   ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
In file included from /usr/include/c++/12/set:60,
                 from /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc:41:
/usr/include/c++/12/bits/stl_tree.h: In instantiation of ‘static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(_Const_Link_type) [with _Key = const google::protobuf::FieldDescriptor*; _Val = const google::protobuf::FieldDescriptor*; _KeyOfValue = std::_Identity<const google::protobuf::FieldDescriptor*>; _Compare = google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare; _Alloc = std::allocator<const google::protobuf::FieldDescriptor*>; _Const_Link_type = const std::_Rb_tree_node<const google::protobuf::FieldDescriptor*>*]’:
/usr/include/c++/12/bits/stl_tree.h:2117:47:   required from ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_unique_pos(const key_type&) [with _Key = const google::protobuf::FieldDescriptor*; _Val = const google::protobuf::FieldDescriptor*; _KeyOfValue = std::_Identity<const google::protobuf::FieldDescriptor*>; _Compare = google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare; _Alloc = std::allocator<const google::protobuf::FieldDescriptor*>; key_type = const google::protobuf::FieldDescriptor*]’
/usr/include/c++/12/bits/stl_tree.h:2170:4:   required from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_Arg&&) [with _Arg = const google::protobuf::FieldDescriptor* const&; _Key = const google::protobuf::FieldDescriptor*; _Val = const google::protobuf::FieldDescriptor*; _KeyOfValue = std::_Identity<const google::protobuf::FieldDescriptor*>; _Compare = google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare; _Alloc = std::allocator<const google::protobuf::FieldDescriptor*>]’
/usr/include/c++/12/bits/stl_set.h:512:25:   required from ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = const google::protobuf::FieldDescriptor*; _Compare = google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare; _Alloc = std::allocator<const google::protobuf::FieldDescriptor*>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<const google::protobuf::FieldDescriptor*, const google::protobuf::FieldDescriptor*, std::_Identity<const google::protobuf::FieldDescriptor*>, google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare, std::allocator<const google::protobuf::FieldDescriptor*> >::const_iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key>::other = std::allocator<const google::protobuf::FieldDescriptor*>; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<const google::protobuf::FieldDescriptor*>, const google::protobuf::FieldDescriptor*>::rebind<const google::protobuf::FieldDescriptor*>; typename _Allocator::value_type = const google::protobuf::FieldDescriptor*; value_type = const google::protobuf::FieldDescriptor*]’
/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc:97:54:   required from here
/usr/include/c++/12/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
  770 |               is_invocable_v<const _Compare&, const _Key&, const _Key&>,
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_tree.h:770:15: note: ‘std::is_invocable_v<const google::protobuf::compiler::java::{anonymous}::FieldDescriptorCompare&, const google::protobuf::FieldDescriptor* const&, const google::protobuf::FieldDescriptor* const&>’ evaluates to false
make[6]: *** [CMakeFiles/libprotoc.dir/build.make:636: CMakeFiles/libprotoc.dir/home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/google/protobuf/compiler/java/java_file.cc.o] Error 1
make[6]: *** Waiting for unfinished jobs....
-- extern_gflags configure command succeeded.  See also /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/include/src/extern_gflags-stamp/extern_gflags-configure-*.log
[  1%] Performing build step for 'extern_gflags'
[ 25%] Building CXX object CMakeFiles/gflags_nothreads_static.dir/src/gflags.cc.o
[ 25%] Building CXX object CMakeFiles/gflags_static.dir/src/gflags.cc.o
[ 37%] Building CXX object CMakeFiles/gflags_nothreads_static.dir/src/gflags_reporting.cc.o
make[5]: *** [CMakeFiles/Makefile2:141: CMakeFiles/libprotoc.dir/all] Error 2
make[4]: *** [Makefile:136: all] Error 2
make[3]: *** [CMakeFiles/extern_protobuf.dir/build.make:86: /home/pi/packages/Paddle-Lite/third-party/protobuf-host/src/extern_protobuf-stamp/extern_protobuf-build] Error 2
make[2]: *** [CMakeFiles/Makefile2:866: CMakeFiles/extern_protobuf.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 50%] Building CXX object CMakeFiles/gflags_nothreads_static.dir/src/gflags_completions.cc.o
[ 62%] Building CXX object CMakeFiles/gflags_static.dir/src/gflags_reporting.cc.o
[ 75%] Building CXX object CMakeFiles/gflags_static.dir/src/gflags_completions.cc.o
[ 87%] Linking CXX static library lib/libgflags_nothreads.a
[ 87%] Built target gflags_nothreads_static
[100%] Linking CXX static library lib/libgflags.a
[100%] Built target gflags_static
[  1%] Performing install step for 'extern_gflags'
[100%] Built target gflags_nothreads_static
[100%] Built target gflags_static
Install the project...
-- Install configuration: ""
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/lib/libgflags.a
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/lib/libgflags_nothreads.a
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/include/gflags/gflags.h
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/include/gflags/gflags_declare.h
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/include/gflags/gflags_completions.h
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/include/gflags/gflags_gflags.h
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/lib/cmake/gflags/gflags-config.cmake
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/lib/cmake/gflags/gflags-config-version.cmake
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/lib/cmake/gflags/gflags-targets.cmake
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/lib/cmake/gflags/gflags-targets-noconfig.cmake
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/bin/gflags_completions.sh
-- Installing: /home/pi/packages/Paddle-Lite/build.opt/third_party/install/gflags/lib/pkgconfig/gflags.pc
-- Installing: /home/pi/.cmake/packages/gflags/64c963e0135949bba2069b1f4b192e6d
[  1%] Completed 'extern_gflags'
[  1%] Built target extern_gflags
make[1]: *** [CMakeFiles/Makefile2:1530: lite/api/CMakeFiles/opt.dir/rule] Error 2
make: *** [Makefile:449: opt] Error 2

Paddle paddle lite installed normally. Only optimizer has an error.

@kevinzezel
Copy link

kevinzezel commented Jun 9, 2024

@Qengineering I achieved! I downloaded the pre-compiled file from the official paddle lite github. For anyone else having this same problem, just download the opt compiled for aarch64 from the following link:

Release v2.13-rc (https://github.com/PaddlePaddle/Paddle-Lite/releases/tag/v2.13-rc)
Download: https://github.com/PaddlePaddle/Paddle-Lite/releases/download/v2.13-rc/opt_linux_aarch64

Example:

wget https://github.com/PaddlePaddle/Paddle-Lite/releases/download/v2.13-rc/opt_linux_aarch64

wget https://paddleocr.bj.bcebos.com/PP-OCRv4/english/en_PP-OCRv4_rec_infer.tar
tar xf en_PP-OCRv4_rec_infer.tar
./opt_linux_aarch64 --model_file=./en_PP-OCRv4_rec_infer/inference.pdmodel  --param_file=./en_PP-OCRv4_rec_infer/inference.pdiparams  --optimize_out=./en_PP-OCRv4_rec_infer_opt --valid_targets=arm  --optimize_out_type=naive_buffer

wget https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar
tar xf en_PP-OCRv3_det_infer.tar
./opt_linux_aarch64 --model_file=./en_PP-OCRv3_det_infer/inference.pdmodel  --param_file=./en_PP-OCRv3_det_infer/inference.pdiparams  --optimize_out=./en_PP-OCRv3_det_infer_opt --valid_targets=arm  --optimize_out_type=naive_buffer

@Qengineering
Copy link
Owner

Thank you! You're a life saver!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants