Package Details: opencv2-opt 2.4.13.6-2

Git Clone URL: https://aur.archlinux.org/opencv2-opt.git (read-only, click to copy)
Package Base: opencv2-opt
Description: Open Source Computer Vision Library (Legacy Version & /opt directory version)
Upstream URL: http://opencv.org/
Licenses: BSD
Provides: opencv2
Submitter: dracorp
Maintainer: jerry73204
Last Packager: jerry73204
Votes: 9
Popularity: 0.000000
First Submitted: 2016-10-22 23:27 (UTC)
Last Updated: 2018-11-04 07:39 (UTC)

Latest Comments

FalconProgrammer commented on 2021-12-10 11:47 (UTC)

As per what has been mentioned in the opencv2 package, I needed to add these flags to _cmakeopts in order to get this compiled.

        '-D BUILD_JASPER=ON'
        '-D CMAKE_CXX_FLAGS="-std=gnu++11"')

@tom - the BUILD_JASPER line should fix your error.

tom commented on 2021-11-12 00:22 (UTC)

build failed:

...

[ 5%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_tagtree.c.o cc1: warning: command-line option ‘-Wsign-promo’ is valid for C++/ObjC++ but not for C cc1: warning: command-line option ‘-Wno-delete-non-virtual-dtor’ is valid for C++/ObjC++ but not for C [ 5%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_tsfb.c.o cc1: warning: command-line option ‘-Wsign-promo’ is valid for C++/ObjC++ but not for C cc1: warning: command-line option ‘-Wno-delete-non-virtual-dtor’ is valid for C++/ObjC++ but not for C [ 5%] Building C object 3rdparty/libjasper/CMakeFiles/libjasper.dir/jpc_util.c.o cc1: warning: command-line option ‘-Wsign-promo’ is valid for C++/ObjC++ but not for C cc1: warning: command-line option ‘-Wno-delete-non-virtual-dtor’ is valid for C++/ObjC++ but not for C /build/opencv2-opt/src/opencv-2.4.13.6/3rdparty/libjasper/jpc_util.c: In function ‘jpc_atoaf’: /build/opencv2-opt/src/opencv-2.4.13.6/3rdparty/libjasper/jpc_util.c:105:20: warning: comparison between pointer and zero character constant [-Wpointer-compare] 105 | if (cp != '\0') { | ^~ /build/opencv2-opt/src/opencv-2.4.13.6/3rdparty/libjasper/jpc_util.c:105:17: note: did you mean to dereference the pointer? 105 | if (cp != '\0') { | ^ /build/opencv2-opt/src/opencv-2.4.13.6/3rdparty/libjasper/jpc_util.c:123:24: warning: comparison between pointer and zero character constant [-Wpointer-compare] 123 | if (cp != '\0') { | ^~ /build/opencv2-opt/src/opencv-2.4.13.6/3rdparty/libjasper/jpc_util.c:123:21: note: did you mean to dereference the pointer? 123 | if (cp != '\0') { | ^ [ 6%] Linking C static library ../lib/liblibjasper.a [ 6%] Built target libjasper make: *** [Makefile:166: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting... ==> ERROR: Build failed, check /var/tmp/mkgkris/build

Galaxy commented on 2021-08-17 09:29 (UTC)

In build section, it is better to set export LDFLAGS="-Wl,-rpath,/opt/${_pkgbase}/lib".

nitrotm commented on 2020-10-20 11:06 (UTC)

The following extra patch is necessary to allow building the highgui module:

--- a/modules/highgui/src/grfmt_jpeg2000.cpp    2018-02-21 19:27:31.000000000 +0100
+++ b/modules/highgui/src/grfmt_jpeg2000.cpp    2020-10-20 12:57:32.135684822 +0200
@@ -338,7 +338,7 @@

     for( y = 0; y < yend - ystart; )
     {
-        jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
+        jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 );
         uchar* dst = data + (y - yoffset) * step - xoffset;

         if( xstep == 1 )
@@ -402,7 +402,7 @@

     for( y = 0; y < yend - ystart; )
     {
-        jas_seqent_t* pix_row = &jas_matrix_get( buffer, y / ystep, 0 );
+        jas_seqent_t* pix_row = jas_matrix_getref( buffer, y / ystep, 0 );
         ushort* dst = data + (y - yoffset) * step - xoffset;

         if( xstep == 1 )

hottea commented on 2018-11-04 03:18 (UTC)

@jerry73204 hey, could you help me with maintain this pkg?

jerry73204 commented on 2018-11-03 16:44 (UTC)

The PKGBUILD renames share/OpenCV to share/opencv. It causes the cmake config files unusable (See this issue).

In this issue, cmake script assumes /opt/opencv2/share/OpenCV/java/libopencv_java2413.so, which parent directory is gone.

Please include this patch in order to fix it.

diff --git a/modules/java/CMakeLists.txt b/modules/java/CMakeLists.txt
index c46f70a..b7c152e 100644
--- a/modules/java/CMakeLists.txt
+++ b/modules/java/CMakeLists.txt
@@ -280,7 +280,7 @@ else(ANDROID)
   if(WIN32)
     set(JAR_INSTALL_DIR java)
   else(WIN32)
-    set(JAR_INSTALL_DIR share/OpenCV/java)
+    set(JAR_INSTALL_DIR share/opencv2/java)
   endif(WIN32)
   install(FILES ${JAR_FILE} DESTINATION ${JAR_INSTALL_DIR} COMPONENT java)
 endif(ANDROID)

postadelmaga commented on 2018-08-29 07:18 (UTC)

now It compiles.

dracorp commented on 2018-06-21 21:20 (UTC)

Hi, I've disowned package, because I don't have enough time to take care of it.

kova7ev commented on 2018-06-20 10:41 (UTC) (edited on 2018-06-20 10:42 (UTC) by kova7ev)

If you don't need ffmpeg dependencies you can disable it by adding in your CMAKE this option: -D WITH_FFMPEG=OFF

postadelmaga commented on 2018-06-20 07:46 (UTC)

Any workaround ? How can I try using ffmpeg2.8 ?

AsGreyWolf commented on 2018-05-29 03:34 (UTC)

Try using ffmpeg2.8.

dracorp commented on 2018-05-22 15:19 (UTC)

The same problem is for opencv2

postadelmaga commented on 2018-05-22 05:39 (UTC)

Same here, built fails at 10%

[ 10%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o

dreieck commented on 2018-05-17 11:32 (UTC) (edited on 2018-05-17 11:32 (UTC) by dreieck)

Build fails for me, too:

In file included from /var/tmp/yaourt-tmp-felics/aur-opencv2-opt/src/opencv-2.4.13.3/modules/highgui/src/cap_ffmpeg.cpp:45:
/var/tmp/yaourt-tmp-felics/aur-opencv2-opt/src/opencv-2.4.13.3/modules/highgui/src/cap_ffmpeg_impl.hpp: In static member function ‘static AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext*, AVCodecID, int, int, int, double, AVPixelFormat)’:
/var/tmp/yaourt-tmp-felics/aur-opencv2-opt/src/opencv-2.4.13.3/modules/highgui/src/cap_ffmpeg_impl.hpp:2214:25: error: ‘CODEC_FLAG_GLOBAL_HEADER’ was not declared in this scope
             c->flags |= CODEC_FLAG_GLOBAL_HEADER;
                         ^~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/yaourt-tmp-felics/aur-opencv2-opt/src/opencv-2.4.13.3/modules/highgui/src/cap_ffmpeg_impl.hpp:2214:25: note: suggested alternative: ‘AV_CODEC_FLAG_GLOBAL_HEADER’
             c->flags |= CODEC_FLAG_GLOBAL_HEADER;
                         ^~~~~~~~~~~~~~~~~~~~~~~~
                         AV_CODEC_FLAG_GLOBAL_HEADER
make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui.dir/build.make:180: modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_ffmpeg.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:952: modules/highgui/CMakeFiles/opencv_highgui.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

kolorafa commented on 2018-05-17 09:50 (UTC)

Can't compile, problems around ffmpeg variable names on latest Arch.

https://pastebin.com/8wvBPkLb

orion78fr commented on 2018-02-09 17:43 (UTC)

I don't know if it's of any use for you :

==> Checking for packaging issue... ==> WARNING: Package contains reference to $srcdir

dracorp commented on 2018-01-02 20:35 (UTC)

Probably I have to fix PKGBUILD. I've created this package based on opencv2

john2x commented on 2018-01-02 02:35 (UTC)

opencv2-opt-samples is listed as optional, but this package includes it in its build and install process anyway. Shouldn't it be separately handled by the opencv2-opt-samples package?

dracorp commented on 2017-10-22 17:58 (UTC)

Yes, it can: $ pacman -Q | grep opencv opencv 3.3.0-2 opencv-samples 3.3.0-2 opencv2-opt 2.4.13.3-2 opencv2-opt-samples 2.4.13.3-2

oppsig commented on 2017-10-22 09:02 (UTC)

Can this coexist with opencv3?

jerry73204 commented on 2017-10-05 07:09 (UTC)

It seems that the repo has a patch cmake.diff, but PKGBUILD has a patch command that is commented out at line 100.

dracorp commented on 2017-05-16 15:58 (UTC)

Probably you can use PYTHONPATH: http://stackoverflow.com/questions/19917492/how-to-use-pythonpath

billypilgrim commented on 2017-05-16 12:44 (UTC)

Hey. Is it possible to use OpenCV v2 with python if I've also got v3 installed? If so, what's the python package called? If I import cv2 as normal, the version I get is 3.2...

dracorp commented on 2016-10-23 08:33 (UTC)

$ pkg-config --libs opencv2 -L/opt/opencv/lib -L/lib64 -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_ocl -lopencv_photo -lopencv_stitching -lopencv_superres -lopencv_ts -lopencv_video -lopencv_videostab -ltbb -lGL -lGLU -lrt -lpthread -lm -ldl $ pkg-config --cflags opencv2 -I/opt/opencv/include/opencv -I/opt/opencv/include