Opened 10 years ago

Closed 10 years ago

#47256 closed defect (fixed)

OpenCV variants are not getting installed

Reported by: animesh.lovelyworld@… Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version: 2.3.3
Keywords: Cc: ddmarshall@…
Port: opencv

Description

Installation of opencv works perfectly fins. However when any variant is being installed (+tbb or +opencl), the installation fails. The main.log shows the reason of this failure:

The source directory "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/build" does not appear to contain CMakeLists.txt.

Attachments (2)

main.log (21.8 KB) - added by animesh.lovelyworld@… 10 years ago.
installation log
opencv-OOS.patch (1.9 KB) - added by larryv (Lawrence Velázquez) 10 years ago.
use cmake.out_of_source

Download all attachments as: .zip

Change History (8)

Changed 10 years ago by animesh.lovelyworld@…

Attachment: main.log added

installation log

comment:1 Changed 10 years ago by larryv (Lawrence Velázquez)

Owner: changed from macports-tickets@… to stromnov@…
Priority: HighNormal

Thanks for the report. In future tickets, please Cc any port maintainers (port info --maintainers opencv).

comment:2 Changed 10 years ago by larryv (Lawrence Velázquez)

Cc: ddmarshall@… added

Has likely duplicate #47264.

comment:3 Changed 10 years ago by Greisby (Greisberger Christophe)

The cmake command line has 2 paths (source and build directories), when cmake wants only one:

cmake --help
Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>

cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/opencv-2.4.11/../build" && /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH=/opt/local/lib -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_MODULE_PATH=/HDD/local/share/cmake/Modules -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev ../opencv-2.4.11/ -DWITH_1394=OFF -DWITH_CARBON=OFF -DWITH_CUBLAS=OFF -DWITH_CUDA=OFF -DWITH_VTK=OFF -DWITH_CUFFT=OFF -DWITH_CUBLAS=OFF -DWITH_FFMPEG=ON -DWITH_GSTREAMER=OFF -DWITH_GTK=OFF -DWITH_IMAGEIO=ON -DWITH_IPP=OFF -DWITH_JASPER=ON -DWITH_JPEG=ON -DWITH_OPENEXR=ON -DWITH_OPENGL=ON -DWITH_OPENNI=OFF -DWITH_PNG=ON -DWITH_PVAPI=OFF -DWITH_GIGEAPI=OFF -DWITH_QUICKTIME=OFF -DWITH_TBB=OFF -DWITH_CSTRIPES=OFF -DWITH_TIFF=ON -DWITH_UNICAP=OFF -DWITH_V4L=OFF -DWITH_VIDEOINPUT=OFF -DWITH_XIMEA=OFF -DWITH_XINE=OFF -DWITH_OPENCL=OFF -DWITH_OPENCLAMDFFT=OFF -DWITH_OPENCLAMDBLAS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_ZLIB=OFF -DBUILD_TIFF=OFF -DBUILD_JASPER=OFF -DBUILD_JPEG=OFF -DBUILD_PNG=OFF -DBUILD_OPENEXR=OFF -DPYTHON_EXECUTABLE=OFF -DINSTALL_C_EXAMPLES=OFF -DINSTALL_PYTHON_EXAMPLES=OFF -DENABLE_PRECOMPILED_HEADERS=ON -DCMAKE_VERBOSE=ON -DZLIB_LIBRARY=/opt/local/lib/libz.dylib -DBZIP2_LIBRARIES=/opt/local/lib/libbz2.dylib -DWITH_EIGEN=ON -DEIGEN_INCLUDE_PATH=/opt/local/include/eigen3 -DWITH_QT=ON -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.10" -DCMAKE_OSX_SYSROOT="/" -DOPENCV_LINKER_LIBS="" /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/opencv-2.4.11/../build'

Removing the trailing target directory from the command line works.
But I did not find where it is appended in the Portfile. It is probably added by the Macports build system.
However, executing manually the command line with the trailing path removed allows to resume and successfully install opencv:

cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_opencv/opencv/work/opencv-2.4.11/../build" && sudo -u macports /opt/local/bin/cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH=/opt/local/lib -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev ../opencv-2.4.11/ -DWITH_1394=OFF -DWITH_CARBON=OFF -DWITH_CUBLAS=OFF -DWITH_CUDA=OFF -DWITH_VTK=OFF -DWITH_CUFFT=OFF -DWITH_CUBLAS=OFF -DWITH_EIGEN=OFF -DWITH_FFMPEG=ON -DWITH_GSTREAMER=OFF -DWITH_GTK=OFF -DWITH_IMAGEIO=ON -DWITH_IPP=OFF -DWITH_JASPER=ON -DWITH_JPEG=ON -DWITH_OPENEXR=ON -DWITH_OPENGL=ON -DWITH_OPENNI=OFF -DWITH_PNG=ON -DWITH_PVAPI=OFF -DWITH_GIGEAPI=OFF -DWITH_QUICKTIME=OFF -DWITH_TBB=OFF -DWITH_CSTRIPES=OFF -DWITH_TIFF=ON -DWITH_UNICAP=OFF -DWITH_V4L=OFF -DWITH_VIDEOINPUT=OFF -DWITH_XIMEA=OFF -DWITH_XINE=OFF -DWITH_OPENCL=OFF -DWITH_OPENCLAMDFFT=OFF -DWITH_OPENCLAMDBLAS=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_ZLIB=OFF -DBUILD_TIFF=OFF -DBUILD_JASPER=OFF -DBUILD_JPEG=OFF -DBUILD_PNG=OFF -DBUILD_OPENEXR=OFF -DPYTHON_EXECUTABLE=OFF -DINSTALL_C_EXAMPLES=OFF -DINSTALL_PYTHON_EXAMPLES=OFF -DENABLE_PRECOMPILED_HEADERS=ON -DCMAKE_VERBOSE=ON -DZLIB_LIBRARY=/opt/local/lib/libz.dylib -DBZIP2_LIBRARIES=/opt/local/lib/libbz2.dylib -DWITH_QT=ON -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.10" -DCMAKE_OSX_SYSROOT="/" -DOPENCV_LINKER_LIBS="" ; sudo port install opencv

comment:4 in reply to:  3 Changed 10 years ago by larryv (Lawrence Velázquez)

The cmake-1.0 portgroup was updated in r134128 to support out-of-source builds via a cmake.out_of_source option. We tried to maintain backwards compatibility with portfiles that already set up out-of-source builds, but opencv does that in an unorthodox way that we didn’t account for.

Here’s a patch that should fix the build.

Changed 10 years ago by larryv (Lawrence Velázquez)

Attachment: opencv-OOS.patch added

use cmake.out_of_source

comment:5 Changed 10 years ago by animesh.lovelyworld@…

I applied the opencv-OOS.patch and now I am able to install opencv variants.

Thanks

comment:6 Changed 10 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.