Package Details: opencv-git 4.6.0.r213.gbb64db98d8-1

Git Clone URL: https://aur.archlinux.org/opencv-git.git (read-only, click to copy)
Package Base: opencv-git
Description: Open Source Computer Vision Library
Upstream URL: https://opencv.org/
Licenses: BSD
Conflicts: opencv, opencv-samples, python-opencv
Submitter: chenxing
Maintainer: andrewSC
Last Packager: andrewSC
Votes: 41
Popularity: 0.000000
First Submitted: 2012-07-31 00:21 (UTC)
Last Updated: 2022-08-27 19:50 (UTC)

Dependencies (34)

Sources (3)

Latest Comments

1 2 3 4 5 6 .. 12 Next › Last »

d4l3k commented on 2022-07-20 04:30 (UTC)

Seems like opencv-python doesn't support ffmpeg 5.0 so can't compile on latest Arch

In file included from /home/rice/.cache/yay/opencv-git/src/opencv/modules/videoio/src/cap_ffmpeg.cpp:50:
/home/rice/.cache/yay/opencv-git/src/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp: In member function ‘bool CvCapture_FFMPEG::open(const char*, const cv::VideoCaptureParameters&)’:
/home/rice/.cache/yay/opencv-git/src/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1146:35: error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’
 1146 |         context = ic->streams[i]->codec;
      |                                   ^~~~~

andrewSC commented on 2022-04-08 22:17 (UTC)

Thanks for the heads up m00nw4tch3r (and others) and also thanks for the patience!(!!) I've refactored the package quite a bit and decided to split it as well. Let me know if this causes any issues.

As always, I was able to build this package in a clean chroot before pushing the changes so if you're experiencing build issues please attempt that first before reporting. Thanks!

=^.^=

m00nw4tch3r commented on 2022-04-08 15:30 (UTC)

Looks like the lapack patch isn't needed anymore, and it causes the build to fail.

sunnysun commented on 2022-03-02 05:50 (UTC) (edited on 2022-03-02 05:54 (UTC) by sunnysun)

It seems the patch is not working

==> Starting prepare()...
patching file modules/core/src/hal_internal.cpp
Hunk #1 FAILED at 163.
Hunk #2 FAILED at 174.
Hunk #3 FAILED at 185.
Hunk #4 FAILED at 227.
Hunk #5 FAILED at 288.
Hunk #6 FAILED at 309.
6 out of 6 hunks FAILED -- saving rejects to file modules/core/src/hal_internal.cpp.rej
==> ERROR: A failure occurred in prepare().
Aborting...
-> error making: opencv-git

carlosnewmusic commented on 2021-09-14 20:15 (UTC)

error build https://pastebin.com/CMUu3JQr

andrewSC commented on 2021-08-14 22:05 (UTC)

Thanks for the heads up abougouffa and all of you for the patience. I've updated the PKGBUILD to include qt5-base as well as the lapacke patch. Can confirm it builds fine in chroot. Let me know if there's any questions or any issues!

abougouffa commented on 2021-08-01 17:02 (UTC) (edited on 2021-08-01 17:02 (UTC) by abougouffa)

Hello @andrewSC, the package doesn't compile, there is a problem on the OpenCV codebase with newer versions of LAPACKE.

You need either to:

  1. disable it by removing the lapacke build dep and adding something like -DWITH_LAPACK=OFF to build options

  2. or much better, patch the file causing the problem (there is a patch in the ArchLinux codebase for this opencv/trunk/opencv-lapack-3.10.patch

I've tested this last option by modifying the PKGBUILD like this:

diff --git a/PKGBUILD b/PKGBUILD
index 5278b43..98f5861 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,7 +12,7 @@

 _name=opencv
 pkgname="$_name-git"
-pkgver=4.1.1.r65.gbf0765fc7f
+pkgver=4.5.1.r0.g1363496c11
 pkgrel=1
 pkgdesc="Open Source Computer Vision Library"
 url="https://opencv.org/"
@@ -30,9 +30,11 @@ optdepends=('opencv-samples: samples'
 conflicts=('opencv')
 provides=("$_name=$pkgver")
 source=('git+https://github.com/opencv/opencv.git'
-        'git+https://github.com/opencv/opencv_contrib.git')
+        'git+https://github.com/opencv/opencv_contrib.git'
+        'https://raw.githubusercontent.com/archlinux/svntogit-packages/master/opencv/trunk/opencv-lapack-3.10.patch')
 sha512sums=('SKIP'
-            'SKIP')
+            'SKIP'
+       'a13dfa91ee423d2ee5f6344ccb8394f96195538b3d668f97c5fdc3ccd84d5ecd54f80bc6fa45685f319ab0d0c9bb5ad533c0f2d1a20d21f3a5afdd1c0239bfa1')

 _cmakeopts=('-DWITH_OPENCL=ON'
             '-DWITH_OPENGL=ON'
@@ -60,6 +62,9 @@ pkgver() {

 prepare() {
   mkdir -p build
+  
+  cd "$srcdir/$_name"
+  patch -p1 < "$srcdir/opencv-lapack-3.10.patch"
 }

 build() {
@@ -85,7 +90,7 @@ build() {

 package() {
     cd build
-    make DESTDIR="$pkgdir" install
+    make -j7 DESTDIR="$pkgdir" install

     # install LICENSE file
     install -Dm644 "$srcdir"/"$_name"/LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"

andrewSC commented on 2021-05-13 21:51 (UTC)

I will take a look in the next day or so

jfernandz commented on 2021-05-11 22:06 (UTC)

I'm having the very same error than @carlosnewmusic

carlosnewmusic commented on 2021-05-08 02:24 (UTC)

1525 | void LAPACK_dgels_base( | ^~~~~~~~~~~~~~~~~ [ 6%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/service.cc.o make[2]: [modules/core/CMakeFiles/opencv_core.dir/build.make:509: modules/core/CMakeFiles/opencv_core.dir/src/hal_internal.cpp.o] Error 1 make[2]: Se espera a que terminen otras tareas.... [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/source_context.pb.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/struct.pb.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/mathlimits.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/stubs/substitute.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/text_format.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/timestamp.pb.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/unknown_field_set.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/type.pb.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/delimited_message_util.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/field_comparator.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/field_mask_util.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/datapiece.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/default_value_objectwriter.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/field_mask_utility.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/json_escaping.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/json_objectwriter.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/json_stream_parser.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/object_writer.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/proto_writer.cc.o [ 7%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/protostream_objectsource.cc.o [ 8%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/protostream_objectwriter.cc.o [ 8%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/type_info.cc.o [ 8%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/internal/utility.cc.o [ 8%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/json_util.cc.o [ 8%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/message_differencer.cc.o [ 8%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/time_util.cc.o [ 8%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/util/type_resolver_util.cc.o [ 8%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/wire_format.cc.o [ 8%] Building CXX object 3rdparty/protobuf/CMakeFiles/libprotobuf.dir/src/google/protobuf/wrappers.pb.cc.o [ 8%] Linking CXX static library ../lib/liblibprotobuf.a [ 8%] Built target libprotobuf make[1]: [CMakeFiles/Makefile2:4541: modules/core/CMakeFiles/opencv_core.dir/all] Error 2 make: [Makefile:166: all] Error 2 ==> ERROR: Se produjo un fallo en build().