This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to build an OpenCV project using ARM compiler 6

I am trying to build a C++ OpenCV project with ARM compiler 6 in ARM development studio ide. I already, downloaded version 3.2.0 from the GitHub repository of OpenCV and built it for the  MinGW compiler using CMake GUI in windows. When I configure my project to use MinGW, I can cross-compile my code an generate the axf file without any problem. However, when I use ARM compiler 6 I'm getting the build report attached below., my questions are, what can I do to resolve the reported errors ? Do I need to re-build the OpenCV library for ARM compiler 6? If so which generator and platform should I choose in CMake GUI?

17:22:07 **** Incremental Build of configuration Debug for project Stereo_Circular_Eclipse ****
make all 
'Building file: ../depth/depth.cpp'
'Invoking: Arm C++ Compiler 6'
armclang.exe --target=aarch64-arm-none-eabi -I"C:\openCV\build_opencv\install\include" -xc++ -fno-exceptions -O0 -g -MD -MP -c -o "depth/depth.o" "../depth/depth.cpp"
armclang: warning: Your license for feature ds_suite_eval will expire in 30 days [-Wlicense-management]
armclang: warning: Your license for feature ds_compiler_eval20191 will expire in 30 days [-Wlicense-management]
In file included from ../depth/depth.cpp:12:
In file included from C:\openCV\build_opencv\install\include\opencv2/opencv.hpp:62:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann.hpp:48:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/flann_base.hpp:40:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/params.h:33:
C:\openCV\build_opencv\install\include\opencv2/flann/any.h:268:42: error: cannot use 'throw' with exceptions disabled
        if (policy->type() != typeid(T)) throw anyimpl::bad_any_cast();
                                         ^
C:\openCV\build_opencv\install\include\opencv2/flann/any.h:277:42: error: cannot use 'throw' with exceptions disabled
        if (policy->type() != typeid(T)) throw anyimpl::bad_any_cast();
                                         ^
In file included from ../depth/depth.cpp:12:
In file included from C:\openCV\build_opencv\install\include\opencv2/opencv.hpp:62:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann.hpp:48:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/flann_base.hpp:40:
C:\openCV\build_opencv\install\include\opencv2/flann/params.h:78:9: error: cannot use 'throw' with exceptions disabled
        throw FLANNException(cv::String("Missing parameter '")+name+cv::String("' in the parameters given"));
        ^
In file included from ../depth/depth.cpp:12:
In file included from C:\openCV\build_opencv\install\include\opencv2/opencv.hpp:62:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann.hpp:48:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/flann_base.hpp:41:
C:\openCV\build_opencv\install\include\opencv2/flann/saving.h:113:9: error: cannot use 'throw' with exceptions disabled
        throw FLANNException("Invalid index file, cannot read");
        ^
C:\openCV\build_opencv\install\include\opencv2/flann/saving.h:117:9: error: cannot use 'throw' with exceptions disabled
        throw FLANNException("Invalid index file, wrong signature");
        ^
C:\openCV\build_opencv\install\include\opencv2/flann/saving.h:151:9: error: cannot use 'throw' with exceptions disabled
        throw FLANNException("Cannot read from file");
        ^
C:\openCV\build_opencv\install\include\opencv2/flann/saving.h:160:9: error: cannot use 'throw' with exceptions disabled
        throw FLANNException("Cannot read from file");
        ^
C:\openCV\build_opencv\install\include\opencv2/flann/saving.h:165:9: error: cannot use 'throw' with exceptions disabled
        throw FLANNException("Cannot read from file");
        ^
C:\openCV\build_opencv\install\include\opencv2/flann/saving.h:176:9: error: cannot use 'throw' with exceptions disabled
        throw FLANNException("Cannot read from file");
        ^
C:\openCV\build_opencv\install\include\opencv2/flann/saving.h:181:9: error: cannot use 'throw' with exceptions disabled
        throw FLANNException("Cannot read from file");
        ^
In file included from ../depth/depth.cpp:12:
In file included from C:\openCV\build_opencv\install\include\opencv2/opencv.hpp:62:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann.hpp:48:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/flann_base.hpp:43:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/all_indices.h:36:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/kdtree_index.h:46:
C:\openCV\build_opencv\install\include\opencv2/flann/random.h:110:14: warning: 'random_shuffle<std::__1::__wrap_iter<int *> >' is deprecated [-Wdeprecated-declarations]
        std::random_shuffle(vals_.begin(), vals_.end());
             ^
E:\Program Files\Arm\Development Studio 2019.1\sw\ARMCompiler6.13\bin\..\include\libcxx\algorithm:3067:1: note: 'random_shuffle<std::__1::__wrap_iter<int *> >' has been explicitly marked deprecated here
_LIBCPP_DEPRECATED_IN_CXX14 void
^
E:\Program Files\Arm\Development Studio 2019.1\sw\ARMCompiler6.13\bin\..\include\libcxx\__config:979:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX14'
#  define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED
                                      ^
E:\Program Files\Arm\Development Studio 2019.1\sw\ARMCompiler6.13\bin\..\include\libcxx\__config:962:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
In file included from ../depth/depth.cpp:12:
In file included from C:\openCV\build_opencv\install\include\opencv2/opencv.hpp:62:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann.hpp:48:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/flann_base.hpp:43:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/all_indices.h:38:
C:\openCV\build_opencv\install\include\opencv2/flann/kmeans_index.h:372:13: error: cannot use 'throw' with exceptions disabled
            throw FLANNException("Unknown algorithm for choosing initial centers.");
            ^
C:\openCV\build_opencv\install\include\opencv2/flann/kmeans_index.h:435:13: error: cannot use 'throw' with exceptions disabled
            throw FLANNException("Branching factor must be at least 2");
            ^
C:\openCV\build_opencv\install\include\opencv2/flann/kmeans_index.h:536:13: error: cannot use 'throw' with exceptions disabled
            throw FLANNException("Number of clusters must be at least 1");
            ^
In file included from ../depth/depth.cpp:12:
In file included from C:\openCV\build_opencv\install\include\opencv2/opencv.hpp:62:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann.hpp:48:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/flann_base.hpp:43:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/all_indices.h:41:
C:\openCV\build_opencv\install\include\opencv2/flann/hierarchical_clustering_index.h:384:13: error: cannot use 'throw' with exceptions disabled
            throw FLANNException("Unknown algorithm for choosing initial centers.");
            ^
C:\openCV\build_opencv\install\include\opencv2/flann/hierarchical_clustering_index.h:467:13: error: cannot use 'throw' with exceptions disabled
            throw FLANNException("Branching factor must be at least 2");
            ^
In file included from ../depth/depth.cpp:12:
In file included from C:\openCV\build_opencv\install\include\opencv2/opencv.hpp:62:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann.hpp:48:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/flann_base.hpp:43:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/all_indices.h:42:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/lsh_index.h:49:
C:\openCV\build_opencv\install\include\opencv2/flann/lsh_table.h:353:10: warning: 'random_shuffle<std::__1::__wrap_iter<unsigned long *> >' is deprecated [-Wdeprecated-declarations]
    std::random_shuffle(indices.begin(), indices.end());
         ^
E:\Program Files\Arm\Development Studio 2019.1\sw\ARMCompiler6.13\bin\..\include\libcxx\algorithm:3067:1: note: 'random_shuffle<std::__1::__wrap_iter<unsigned long *> >' has been explicitly marked deprecated here
_LIBCPP_DEPRECATED_IN_CXX14 void
^
E:\Program Files\Arm\Development Studio 2019.1\sw\ARMCompiler6.13\bin\..\include\libcxx\__config:979:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX14'
#  define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED
                                      ^
E:\Program Files\Arm\Development Studio 2019.1\sw\ARMCompiler6.13\bin\..\include\libcxx\__config:962:48: note: expanded from macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
In file included from ../depth/depth.cpp:12:
In file included from C:\openCV\build_opencv\install\include\opencv2/opencv.hpp:62:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann.hpp:48:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/flann_base.hpp:43:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/all_indices.h:43:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/autotuned_index.h:36:
C:\openCV\build_opencv\install\include\opencv2/flann/index_testing.h:95:9: error: cannot use 'throw' with exceptions disabled
        throw FLANNException("Ground truth is not computed for as many neighbors as requested");
        ^
In file included from ../depth/depth.cpp:12:
In file included from C:\openCV\build_opencv\install\include\opencv2/opencv.hpp:62:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann.hpp:48:
In file included from C:\openCV\build_opencv\install\include\opencv2/flann/flann_base.hpp:43:
C:\openCV\build_opencv\install\include\opencv2/flann/all_indices.h:83:13: error: cannot use 'throw' with exceptions disabled
            throw FLANNException("Unknown index type");
            ^
C:\openCV\build_opencv\install\include\opencv2/flann/all_indices.h:112:13: error: cannot use 'throw' with exceptions disabled
            throw FLANNException("Unknown index type");
            ^
C:\openCV\build_opencv\install\include\opencv2/flann/all_indices.h:138:13: error: cannot use 'throw' with exceptions disabled
            throw FLANNException("Unknown index type");
            ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 warnings and 20 errors generated.
make: *** [depth/subdir.mk:20: depth/depth.o] Error 1

17:22:11 Build Finished (took 4s.192ms)