openwrt-18.06+opencv-3.4.2

有人有编译成功吗?
已邀请:

xzmu - 10w

赞同来自:

你可以上传编译失败的错误啊。。。然后就可以帮你看看有没有什么解决办法。

mybays

赞同来自:

agma   [-Wunknown-pragmas]
 #pragma
 ^
cc1plus: warning: unrecognized command line option '-Wno-unused-const-variable'
Linking CXX executable cmTC_07077
/home/mybays/develop/lede/lede-sdk-17.01.4-imx6_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64/staging_dir/host/bin/cmake -E cmake_link_script CMakeFiles/cmTC_07077.dir/link.txt --verbose=1
/home/mybays/develop/lede/lede-sdk-17.01.4-imx6_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64/staging_dir/toolchain-arm_cortex-a9+neon_gcc-5.4.0_musl-1.1.16_eabi/bin/arm-openwrt-linux-g++   -DTBB_USE_GCC_BUILTINS=1 -D__TBB_64BIT_ATOMICS=0 -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -mfpu=neon -mfp16-format=ieee -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_07077.dir/src.cxx.o  -o cmTC_07077 -rdynamic
make[1]: Leaving directory '/home/mybays/develop/imx6/openwrt-sdk-18.06.0-rc1-imx6_gcc-7.3.0_musl_eabi.Linux-x86_64/opencv/opencv-3.4.2/build_openwrt/CMakeFiles/CMakeTmp'

===== END =====

Build output check failed:
    Regex: 'unrecognized .*option'
    Output line: 'cc1plus: warning: unrecognized command line option '-Wno-shorten-64-to-32''
Compilation failed:
    source file: '/home/mybays/develop/imx6/openwrt-sdk-18.06.0-rc1-imx6_gcc-7.3.0_musl_eabi.Linux-x86_64/opencv/opencv-3.4.2/build_openwrt/CMakeFiles/CMakeTmp/src.cxx'
    check option: ' -Wno-shorten-64-to-32'
===== BUILD LOG =====
Change Dir: /home/mybays/develop/imx6/openwrt-sdk-18.06.0-rc1-imx6_gcc-7.3.0_musl_eabi.Linux-x86_64/opencv/opencv-3.4.2/build_openwrt/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTC_8eba0/fast"
/usr/bin/make -f CMakeFiles/cmTC_8eba0.dir/build.make CMakeFiles/cmTC_8eba0.dir/build
make[1]: Entering directory '/home/mybays/develop/imx6/openwrt-sdk-18.06.0-rc1-imx6_gcc-7.3.0_musl_eabi.Linux-x86_64/opencv/opencv-3.4.2/build_openwrt/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_8eba0.dir/src.cxx.o
/home/mybays/develop/lede/lede-sdk-17.01.4-imx6_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64/staging_dir/toolchain-arm_cortex-a9+neon_gcc-5.4.0_musl-1.1.16_eabi/bin/arm-openwrt-linux-g++     -DTBB_USE_GCC_BUILTINS=1 -D__TBB_64BIT_ATOMICS=0 -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -mfpu=neon -mfp16-format=ieee -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function  -O3 -DNDEBUG -fPIE   -Wno-shorten-64-to-32 -o CMakeFiles/cmTC_8eba0.dir/src.cxx.o -c /home/mybays/develop/imx6/openwrt-sdk-18.06.0-rc1-imx6_gcc-7.3.0_musl_eabi.Linux-x86_64/opencv/opencv-3.4.2/build_openwrt/CMakeFiles/CMakeTmp/src.cxx
/home/mybays/develop/imx6/openwrt-sdk-18.06.0-rc1-imx6_gcc-7.3.0_musl_eabi.Linux-x86_64/opencv/opencv-3.4.2/build_openwrt/CMakeFiles/CMakeTmp/src.cxx:1:0: warning: ignoring #pragma   [-Wunknown-pragmas]
 #pragma
 ^
cc1plus: warning: unrecognized command line option '-Wno-shorten-64-to-32'
Linking CXX executable cmTC_8eba0
/home/mybays/develop/lede/lede-sdk-17.01.4-imx6_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64/staging_dir/host/bin/cmake -E cmake_link_script CMakeFiles/cmTC_8eba0.dir/link.txt --verbose=1
/home/mybays/develop/lede/lede-sdk-17.01.4-imx6_gcc-5.4.0_musl-1.1.16_eabi.Linux-x86_64/staging_dir/toolchain-arm_cortex-a9+neon_gcc-5.4.0_musl-1.1.16_eabi/bin/arm-openwrt-linux-g++   -DTBB_USE_GCC_BUILTINS=1 -D__TBB_64BIT_ATOMICS=0 -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4   -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security   -Winit-self -Wpointer-arith   -Wuninitialized -Winit-self -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -mfpu=neon -mfp16-format=ieee -fvisibility=hidden -fvisibility-inlines-hidden -Wno-deprecated -Wno-missing-declarations -Wno-shadow -Wno-unused-parameter -Wno-unused-local-typedefs -Wno-sign-compare -Wno-sign-promo -Wno-undef -Wno-ignored-qualifiers -Wno-extra -Wno-unused-function  -O3 -DNDEBUG    -Wl,--gc-sections  CMakeFiles/cmTC_8eba0.dir/src.cxx.o  -o cmTC_8eba0 -rdynamic
make[1]: Leaving directory '/home/mybays/develop/imx6/openwrt-sdk-18.06.0-rc1-imx6_gcc-7.3.0_musl_eabi.Linux-x86_64/opencv/opencv-3.4.2/build_openwrt/CMakeFiles/CMakeTmp'

===== END =====
 
 
编译命令为:
mybays@ubuntu-server:~/develop/imx6/openwrt-sdk-18.06.0-rc1-imx6_gcc-7.3.0_musl_eabi.Linux-x86_64/opencv/opencv-3.4.2/build_openwrt$ cmake -DOPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules -DCMAKE_INSTALL_PREFIX=./install -DCMAKE_TOOLCHAIN_FILE="../platforms/linux/arm-openwrt.toolchain.cmake" -DCMAKE_CXX_FLAGS="-DTBB_USE_GCC_BUILTINS=1 -D__TBB_64BIT_ATOMICS=0 -mcpu=cortex-a9 -mfloat-abi=hard -mfpu=neon-vfpv4"  -DSOFTFP=ON -DWITH_OPENCL=OFF -DWITH_TBB=ON  -DWITH_V4L=OFF -DHAVE_CAMV4L2=OFF -DENABLE_VFPV3=ON -DENABLE_NEON=ON -DBUILD_TESTS=OFF -DINSTALL_PYTHON_EXAMPLES=OFF -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DWITH_FFMPEG=ON -DHAVE_FFMPEG=ON ../

xzmu - 10w

赞同来自:

所以你的日志里并没有错误啊。。。

mybays

赞同来自:

openwrt(lede)上的opencv最高只支持到3.1.0,刚刚验证过的.
opencv_3.1.0-1_arm_cortex-a9_neon.ipk
再高的版本需要修改官方的makefile

要回复问题请先登录注册