I am trying to cross compiling OpenCV library on X-86 (Platform) for riscv architecture,but i am getting some errors.Please can any one help me regarding these errors.
command used for cross compile :--
cmake -DCMAKE_TOOLCHAIN_FILE=../riscv.toolchain.cmake ../../.. -DWITH_PNG=OFF -DWITH_QT=ON -DWITH_GTK_2_X=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_ZLIB=ON -DBUILD_opencv_dnn=OFF -DBUILD_EXAMPLES=ON -DBUILD_LIST=core,highgui -DCMAKE_EXE_LINKER_FLAGS="-static"
Error Details:
In file included from /usr/include/qt4/QtCore/qatomic_arch.h:88:0, from /usr/include/qt4/QtCore/qbasicatomic.h:213, from /usr/include/qt4/QtCore/qatomic.h:46, from /usr/include/qt4/QtCore/qbytearray.h:45, from /usr/include/qt4/QtCore/qstring.h:46, from /usr/include/qt4/QtCore/qobject.h:48, from /usr/include/qt4/QtCore/qabstracteventdispatcher.h:45, from /usr/include/qt4/QtCore/QAbstractEventDispatcher:1, from /home/billa/Downloads/opencv-3.4.2/platforms/linux/riscv_build/modules/highgui/src/../../../../../../modules/highgui/src/window_QT.h:54, from /home/billa/Downloads/opencv-3.4.2/platforms/linux/riscv_build/modules/highgui/src/moc_window_QT.cxx:9: /usr/include/qt4/QtCore/qatomic_x86_64.h: In static member function 'static void GuiReceiver::qt_static_metacall(QObject, QMetaObject::Call, int, void)': /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:155: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/src/moc_window_QT.cxx.o' failed make[2]: * [modules/highgui/CMakeFiles/opencv_highgui.dir/src/moc_window_QT.cxx.o] Error 1 make[2]: Waiting for unfinished jobs.... In file included from /usr/include/qt4/QtCore/qatomic_arch.h:88:0, from /usr/include/qt4/QtCore/qbasicatomic.h:213, from /usr/include/qt4/QtCore/qatomic.h:46, from /usr/include/qt4/QtCore/qbytearray.h:45, from /usr/include/qt4/QtCore/qstring.h:46, from /usr/include/qt4/QtCore/qobject.h:48, from /usr/include/qt4/QtCore/qabstracteventdispatcher.h:45, from /usr/include/qt4/QtCore/QAbstractEventDispatcher:1, from /home/billa/Downloads/opencv-3.4.2/modules/highgui/src/window_QT.h:54, from /home/billa/Downloads/opencv-3.4.2/modules/highgui/src/window_QT.cpp:47: /usr/include/qt4/QtCore/qatomic_x86_64.h: In destructor 'QFutureInterface<t>::~QFutureInterface() [with T = int]': /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:121:29: error: impossible constraint in 'asm' : "memory"); ^ /usr/include/qt4/QtCore/qatomic_x86_64.h:133:29: error: impossible constraint in 'asm' : "memory"); ^ modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:131: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o' failed make[2]: [modules/highgui/CMakeFiles/opencv_highgui.dir/src/window_QT.cpp.o] Error 1 CMakeFiles/Makefile2:1741: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui.dir/all' failed make[1]: [modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2 Makefile:160: recipe for target 'all' failed make: * [all] Error 2
Thanks in Advance