I tried to install PDL::OpenCV under Debian/bookworm using perlbrew
and cpanm with perl 5.36.0. I got errors such as:

   opencv_wrapper.cpp:1:10: fatal error: opencv2/opencv.hpp: No such file or 
directory
    1 | #include <opencv2/opencv.hpp>

I found that the include file had been installed under my perlbrew directory

   
/home/mochan/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0/x86_64-linux/auto/share/dist/Alien-OpenCV/include/opencv4/opencv2/opencv.hpp

but it seems it was being searched under /usr/local/include. To test
this I manually made a link from .../opencv2 to /usr/local/include/opencv2.

Then the compilation of PDL::OpenCV proceeded further, until I hit another
error:

    wraplocal.cpp:3:10: fatal error: opencv2/tracking.hpp: No such file or 
directory
    3 | #include <opencv2/tracking.hpp>

I found Alien::OpenCV had installed .../opencv2/video/tracking.hpp,
but not .../opencv2/tracking.hpp.

I ran perl -MAlien::OpenCV -E 'say Alien::OpenCV->cflags' and I also
got an empty result.

Hope this helps.

Regards,
Luis



On Tue, Apr 04, 2023 at 07:56:32PM +0000, Adam Russell wrote:
> I ran perl -MAlien::OpenCV -E 'say Alien::OpenCV->cflags' and I get an empty 
> response. No error about not finding the module, so safe to assume it's 
> installed. But I guess none of the flags were set?
>
> Scrolling through the installation output I see stuff like
>
>
> /Users/adamrussell/.cpan/build/Alien-OpenCV-0.002-0/_alien/build_0YqR/opencv-opencv-1668f2a/modules/ts/include/opencv2/ts/ts_gtest.h:18906:10:
>  note: in implicit copy constructor for 
> 'testing::internal::CartesianProductHolder5<testing::internal::ValueArray1<std::function<bool
>  (const cv::Mat &, const cv::Mat &)>>, testing::internal::ValueArray5<int, 
> int, int, int, int>, testing::internal::ValueArray3<cv::Size_<int>, 
> cv::Size_<int>, cv::Size_<int>>, testing::internal::ValueArray3<int, int, 
> int>, testing::internal::ValueArray1<std::vector<cv::GCompileArg>>>' first 
> required here
>   return internal::CartesianProductHolder5<Generator1, Generator2, Generator3,
>
> so it looks like it built it's own and did not find the MacPorts version? But 
> then would it not have an easier time finding it's own header files?
>
> I really can't mix Homebrew and Macports on this particular machine and 
> chance risk breaking other things. Happy to try and get this to work any way 
> I can though!
>
> ________________________________
> From: Ed . <ej...@hotmail.com>
> Sent: Tuesday, April 4, 2023 2:24 PM
> To: Adam Russell <ac.russ...@live.com>; pdl-general@lists.sourceforge.net 
> <pdl-general@lists.sourceforge.net>
> Subject: RE: [Pdl-general] PDL::OpenCV 0.001 released
>
>
> Hi Adam,
>
>
>
> Thanks for the report! Can you check and see whether Alien::OpenCV found the 
> MacPorts one or built its own? And can you say what this shows?
>
>
>
> perl -MAlien::OpenCV -E 'say Alien::OpenCV->cflags'
>
>
>
> (Also, are you able to try out the Homebrew OpenCV? I’ve only experimented 
> with the Homebrew myself)
>
>
>
> Best regards,
>
> Ed
>
>
>
> From: Adam Russell<mailto:ac.russ...@live.com>
> Sent: 04 April 2023 19:10
> To: 
> pdl-general@lists.sourceforge.net<mailto:pdl-general@lists.sourceforge.net>
> Subject: Re: [Pdl-general] PDL::OpenCV 0.001 released
>
>
>
> I get this build error. But I definitely have this, it is located in a usual 
> location for MacPorts: /opt/local/include/opencv4/opencv2/opencv.hpp
>
>
>
> Is there some trick to get this to be found properly? I am installing via 
> cpan, just a simple 'cpan> install PDL::OpenCV` which otherwise seems to 
> proceed well in terms of installing needed dependencies and so forth.
>
>
>
> opencv_wrapper.cpp:1:10: fatal error: 'opencv2/opencv.hpp' file not found
>
> #include <opencv2/opencv.hpp>
>
>          ^~~~~~~~~~~~~~~~~~~~
>
> 1 error generated.
>
> make: *** [opencv_wrapper.o] Error 1
>
>   ETJ/PDL-OpenCV-0.001.tar.gz
>
>   /usr/bin/make -- NOT OK
>
> Failed during this command:
>
>  ETJ/PDL-OpenCV-0.001.tar.gz                  : make NO
>
>
>
>
>
>
>
> Date: Sun, 26 Mar 2023 06:50:19 +0000
> From: "Ed ." <ej...@hotmail.com>
> To: "pdl-de...@lists.sourceforge.net"
>         <pdl-de...@lists.sourceforge.net>, perldl
>         <pdl-general@lists.sourceforge.net>
> Subject: [Pdl-general] PDL::OpenCV 0.001 released
> Message-ID:
>         
> <db9p194mb13853e894ff738605439bc0e82...@db9p194mb1385.eurp194.prod.outlook.com>
>
> Content-Type: text/plain; charset="windows-1252"
>
> Dear PDL folks,
>
> PDL::OpenCV 0.001 has just been released. Notable changes since never:
>
>
>   *   It supports modules highgui, imgcodecs, imgproc, objdetect, tracking, 
> videoio
>   *   Where possible, all inputs and outputs are ndarrays which get wrapped 
> into Mat, Rect, std::vector<int>, etc internally
>   *   In particular, it supports just about every class and function within 
> those modules that are supported by the Python binding
>   *   There is a simplistic translation of the Doxygen docs into POD, see on 
> MetaCPAN: https://metacpan.org/dist/PDL-OpenCV
>   *   It includes a perldl demo which shows off basic image-processing stuff 
> (?demo opencv?)
>
> Future plans, in something like intended order:
>
>   *   Support the ?Params? classes (possibly from Perl-land as a hash-ref)
>   *   Support more of the modules, both in the main OpenCV distribution and 
> the ?contrib? ones
>
> The IRC channel (#pdl on irc.perl.org) is a great virtual place to come and 
> ask questions, or just watch the GitHub messages flow by.
>
> As usual, please give the new release a try and report problems.
>
> Best regards,
> Ed
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> pdl-general mailing list
> pdl-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdl-general
>
>
> ------------------------------
>
> End of pdl-general Digest, Vol 85, Issue 3
> ******************************************
>
>




> _______________________________________________
> pdl-general mailing list
> pdl-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pdl-general


-- 

                                                                  o
W. Luis Mochán,                      | tel:(52)(777)329-1734     /<(*)
Instituto de Ciencias Físicas, UNAM  | fax:(52)(777)317-5388     `>/   /\
Av. Universidad s/n CP 62210         |                           (*)/\/  \
Cuernavaca, Morelos, México          | moc...@fis.unam.mx   /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16  C2DF 5F0A C52B 791E B9EB


_______________________________________________
pdl-general mailing list
pdl-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pdl-general

Reply via email to