Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aiscm 0.24.2 does not build with OpenCV 4.6.0 #30

Open
andy-tai opened this issue Feb 12, 2023 · 5 comments
Open

aiscm 0.24.2 does not build with OpenCV 4.6.0 #30

andy-tai opened this issue Feb 12, 2023 · 5 comments

Comments

@andy-tai
Copy link

andy-tai commented Feb 12, 2023

Hi I was trying to update OpenCV in guix to 4.6.0 from 4.5.4.

The Guix QA build checker shows aiscm would fail to build with OpenCV 4.6.0, with error

https://bordeaux.guix.gnu.org/build/6d64c5dc-818b-470d-b55c-be5b4cccf643

libtool: link: ( cd ".libs" && rm -f "libguile-aiscm-tensorflow.la" && ln -s "../libguile-aiscm-tensorflow.la" "libguile-aiscm-tensorflow.la" )
libtool: link: ( cd ".libs" && rm -f "libguile-aiscm-core.la" && ln -s "../libguile-aiscm-core.la" "libguile-aiscm-core.la" )
opencv.cpp:364:16: error: no member named 'drawAxis' in namespace 'cv::aruco'
cv::aruco::drawAxis(img, camera, distortion, rvec, tvec, scm_to_double(scm_len));

Looking at OpenCV sources from 4.5.4 and 4.6.0, it appears

cv::aruco::drawAxis()

was an API in opencv-contrib and was removed around OpenCV 4.6.0 or so. It is probably an API not guaranteed to be stable.

Probably a good idea not to reference such APIs.

@andy-tai andy-tai changed the title aiscm 0.24.2 does not build withb OpenCV 4.6.0 aiscm 0.24.2 does not build with OpenCV 4.6.0 Feb 12, 2023
@wedesoft
Copy link
Owner

Ok, I have removed the OpenCV bindings. I am not maintaining aiscm at the moment. The FFmpeg bindings also don't work with FFmpeg beyond 4.4.3.

@Apteryks
Copy link

Should the configure.ac checks for opencv be removed as well then? at https://github.com/wedesoft/aiscm/blob/master/configure.ac#L83. it causes this at configure time:

checking for OPENCV... no
configure: error: Package requirements (opencv4 >= 4.1.0) were not met:

No package 'opencv4' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

@Apteryks
Copy link

Removing these lines in autoconf.ac fixes the configure stage:

         (add-after 'unpack 'do-not-check-for-opencv
           (lambda _
             (substitute* "configure.ac"
               (("PKG_CHECK_MODULES\\(OPENCV.*") "")
               (("AC_SUBST\\(OPENCV_CFLAGS)") "")
               (("AC_SUBST\\(OPENCV_LIBS)") ""))))

But it then fails at

.7/bin/guile -L .. ../tests/integration/mandelbrot.scm
Backtrace:
           8 (primitive-load "/tmp/guix-build-guile-aiscm-0.25.1.drv…")
In ice-9/eval.scm:
   721:20  7 (primitive-eval (use-modules (aiscm opencv) (aiscm #) #))
In ice-9/psyntax.scm:
  1230:36  6 (expand-top-sequence ((use-modules (aiscm opencv) # #)) …)
  1222:19  5 (parse _ (("placeholder" placeholder)) ((top) #(# # …)) …)
   259:10  4 (parse _ (("placeholder" placeholder)) (()) _ c&e (eval) …)
In ice-9/boot-9.scm:
  3927:20  3 (process-use-modules _)
   222:17  2 (map1 (((aiscm opencv)) ((aiscm magick)) ((aiscm #))))
  3928:31  1 (_ ((aiscm opencv)))
   3329:6  0 (resolve-interface (aiscm opencv) #:select _ #:hide _ # …)

ice-9/boot-9.scm:3329:6: In procedure resolve-interface:
no code for module (aiscm opencv)

@wedesoft
Copy link
Owner

Ok, I had some more OpenCV samples in there, sorry about that. I just released 0.25.2 with the OpenCV samples removed.

@Apteryks
Copy link

Thanks, building 0.25.2 without opencv was successful :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants