Bug 1839256 - Review Request: mingw-opencv - MinGW Windows OpenCV library
Summary: Review Request: mingw-opencv - MinGW Windows OpenCV library
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Robert-André Mauchin 🐧
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-22 21:24 UTC by Sandro Mani
Modified: 2020-07-01 17:23 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-07-01 17:23:57 UTC
Type: ---
Embargoed:
eclipseo: fedora-review+


Attachments (Terms of Use)

Description Sandro Mani 2020-05-22 21:24:28 UTC
Spec URL: https://smani.fedorapeople.org/review/mingw-opencv.spec
SRPM URL: https://smani.fedorapeople.org/review/mingw-opencv-4.2.0-1.fc33.src.rpm
Description: MinGW Windows OpenCV library
Fedora Account System Username: smani

Comment 1 Robert-André Mauchin 🐧 2020-06-24 17:08:36 UTC
# RUN opencv-clean.sh TO PREPARE TARBALLS FOR FEDORA

 - You need to add the script as a Source 

 - My local build is failing with tons of errors. I'll try Koji.

Errors are like:

In file included from /builddir/build/BUILD/opencv-4.2.0/build_win32/modules/dnn/opencv-caffe.pb.cc:4:
/builddir/build/BUILD/opencv-4.2.0/build_win32/modules/dnn/opencv-caffe.pb.h:21322:62: error: invalid use of incomplete type 'class opencv_caffe::PriorBoxParameter'
21322 | inline void PriorBoxParameter::_internal_set_step(float value) {
      |                                                              ^


/builddir/build/BUILD/opencv-4.2.0/build_win32/modules/dnn/opencv-caffe.pb.cc:985:51: error: incomplete type 'opencv_caffe::NonMaximumSuppressionParameter' used in nested name specifier
  985 |   ::opencv_caffe::NonMaximumSuppressionParameter::InitAsDefaultInstance();
      |                                                   ^~~~~~~~~~~~~~~~~~~~~

Comment 2 Robert-André Mauchin 🐧 2020-06-24 17:30:59 UTC
It still fails with many errors on Koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=46093212

Comment 3 Robert-André Mauchin 🐧 2020-06-24 17:33:04 UTC
Maybe this is due to this part:

CMake Warning at /usr/share/cmake/Modules/FindProtobuf.cmake:500 (message):
  Protobuf compiler version 3.12.3 doesn't match library version 3.11.4
Call Stack (most recent call first):
  cmake/OpenCVFindProtobuf.cmake:26 (find_package)
  CMakeLists.txt:676 (include)
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE
-- Performing Test HAVE_C_WNO_UNUSED_VARIABLE - Success
-- Performing Test HAVE_C_WNO_SHADOW
-- Performing Test HAVE_C_WNO_SHADOW - Success
-- ADE: Download: v0.1.1f.zip
-- Try 1 failed
-- 
=======================================================================
  Couldn't download files from the Internet.
  Please check the Internet access on this host.
=======================================================================
CMake Warning at cmake/OpenCVDownload.cmake:202 (message):
  ADE: Download failed: 6;"Couldn't resolve host name"
  For details please refer to the download log file:
  /builddir/build/BUILD/opencv-4.2.0/build_win32/CMakeDownloadLog.txt
Call Stack (most recent call first):
  modules/gapi/cmake/DownloadADE.cmake:10 (ocv_download)
  modules/gapi/cmake/init.cmake:19 (include)
  cmake/OpenCVModule.cmake:312 (include)
  cmake/OpenCVModule.cmake:375 (_add_modules_1)
  modules/CMakeLists.txt:7 (ocv_glob_modules)
-- Looking for dshow.h
-- Looking for dshow.h - found
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Success
-- Caffe:   NO
CMake Warning at /usr/share/cmake/Modules/FindProtobuf.cmake:500 (message):
  Protobuf compiler version 3.12.3 doesn't match library version 3.11.4

Comment 4 Robert-André Mauchin 🐧 2020-06-24 18:35:32 UTC
Ok bumping mingw-protobuf to 3.12.3 seems co fix the issue.

Comment 5 Robert-André Mauchin 🐧 2020-06-24 19:18:35 UTC
Another error:

error: File not found: /builddir/build/BUILDROOT/mingw-opencv-4.2.0-1.fc33.x86_64/usr/i686-w64-mingw32/sys-root/mingw/lib/python3.9/site-packages/cv2-cpython-38.dll
    Deprecated external dependency generator is used!
    File not found: /builddir/build/BUILDROOT/mingw-opencv-4.2.0-1.fc33.x86_64/usr/i686-w64-mingw32/sys-root/mingw/lib/python3.9/site-packages/cv2-cpython-38.dll
Child return code was: 1


We got Python 3.9 now so this probably needs to be adjusted:

%files -n mingw32-python3-%{pkgname}
%{mingw32_python3_sitearch}/cv2-cpython-%{python_version_nodots}.dll


%files -n mingw64-python3-%{pkgname}
%{mingw64_python3_sitearch}/cv2-cpython-%{python_version_nodots}.dll

Comment 6 Robert-André Mauchin 🐧 2020-06-24 21:29:56 UTC
Should rather be

%files -n mingw32-python3-%{pkgname}
%{mingw32_python3_sitearch}/cv2-cpython-%{mingw32_python3_version_nodots}.dll

and

%files -n mingw64-python3-%{pkgname}
%{mingw64_python3_sitearch}/cv2-cpython-%{mingw64_python3_version_nodots}.dll

I've sent a PR to mingw-python3 to add these macros: https://src.fedoraproject.org/rpms/mingw-python3/pull-request/1

Comment 7 Sandro Mani 2020-06-28 11:27:05 UTC
Spec URL: https://smani.fedorapeople.org/review/mingw-opencv.spec
SRPM URL: https://smani.fedorapeople.org/review/mingw-opencv-4.2.0-2.fc33.src.rpm

%changelog
* Sat Jun 27 2020 Sandro Mani <manisandro> - 4.3.0-2
- Use %%{mingw32,64_python3_version_nodots}

* Sun May 31 2020 Sandro Mani <manisandro> - 4.3.0-1
- Update to 4.3.0

Comment 8 Robert-André Mauchin 🐧 2020-06-29 14:38:21 UTC
Missed this:

# RUN opencv-clean.sh TO PREPARE TARBALLS FOR FEDORA

 - You need to add the script to generate the tarball as a Source, it should end up in the SRPM.

Comment 9 Sandro Mani 2020-06-30 12:06:30 UTC
Ups yes indeed

Spec URL: https://smani.fedorapeople.org/review/mingw-opencv.spec
SRPM URL: https://smani.fedorapeople.org/review/mingw-opencv-4.2.0-3.fc33.src.rpm

%changelog
* Tue Jun 30 2020 Sandro Mani <manisandro> - 4.3.0-3
- Add opencv-clean.sh to sources

Comment 10 Robert-André Mauchin 🐧 2020-06-30 13:47:07 UTC
Package approved.

Comment 11 Gwyn Ciesla 2020-06-30 15:09:44 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/mingw-opencv


Note You need to log in before you can comment on or make changes to this bug.