0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Optimizing OpenCVをCMakeでビルドする時のエラーの対処

Posted at

はじめに

OpenCVをインストールしようとした際,最適化版があることを知らず,普通にビルドしてしまったのですが,
オプションを指定で最適化版をインストールできるということだったのでそちらをインストールしようと思います.

しかし,再度ビルドしようとしたらエラーが出てしまったので,その解決方法を自分用にメモしておきます.

CMakeオプション

cmake -D CMAKE_BUILD_TYPE=RELEASE \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
    -D ENABLE_NEON=ON \
    -D ENABLE_VFPV3=ON \
    -D BUILD_TESTS=OFF \
    -D OPENCV_ENABLE_NONFREE=ON \
    -D INSTALL_PYTHON_EXAMPLES=ON \
    -D BUILD_EXAMPLES=ON ..

エラー

CMake Error at cmake/OpenCVCompilerOptimizations.cmake:477 (message):
  Required baseline optimization is not supported: VFPV3
  (CPU_BASELINE_REQUIRE=;VFPV3;NEON)
Call Stack (most recent call first):
  cmake/OpenCVCompilerOptions.cmake:268 (include)
  CMakeLists.txt:688 (include)

解決方法

依然のビルドと競合しているので,CMakeCacthを削除します.

rm CMakeCache.txt

あとは再度上記のオプション付きでcmake ..をすればできるはずです.

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?