Toybrick

标题: 编译opencv-4.2.0出错 TB-RK1808M0 计算卡 [打印本页]

作者: 无法拨号    时间: 2020-9-29 16:54
标题: 编译opencv-4.2.0出错 TB-RK1808M0 计算卡
[ 83%] Built target gen_opencv_python_source
[ 83%] Building CXX object modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o
virtual memory exhausted: Cannot allocate memory
make[2]: *** [modules/python3/CMakeFiles/opencv_python3.dir/build.make:63: modules/python3/CMakeFiles/opencv_python3.dir/__/src2/cv2.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:19951: modules/python3/CMakeFiles/opencv_python3.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

设置虚拟内存
root@debian10:/home/toybrick/opencv_build/opencv/build#
root@debian10:/home/toybrick/opencv_build/opencv/build# dd if=/dev/zero of=/var/swap bs=1024 count=1024000
1024000+0 records in
1024000+0 records out
1048576000 bytes (1.0 GB, 1000 MiB) copied, 73.0895 s, 14.3 MB/s
root@debian10:/home/toybrick/opencv_build/opencv/build# mkswap /var/swap
Setting up swapspace version 1, size = 1000 MiB (1048571904 bytes)
no label, UUID=0ccd4525-a4ac-4b90-b4f2-d25e71603336
root@debian10:/home/toybrick/opencv_build/opencv/build# swapon /var/swap
swapon: /var/swap: swapon failed: Function not implemented

无法设置






欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3