in reply to Re^3: How to link to OpenCV goodies for PERL5
in thread How to link to OpenCV goodies for PERL5

Thank you for your help. I did what you said and here is what was outputted into make.log:

freddythunder@tacofever:~/cpan/objdetectsrc$ more make.log cp lib/Image/ObjectDetect.pm blib/lib/Image/ObjectDetect.pm cp lib/Image/ObjectDetect.xs blib/lib/Image/ObjectDetect.xs /usr/bin/perl /usr/share/perl/5.14/ExtUtils/xsubpp -typemap /usr/shar +e/perl/5.14/ExtUtils/typemap ObjectDetect.xs > ObjectDetect.xsc && m +v ObjectDetect. xsc ObjectDetect.c cc -c -I/usr/local/include/opencv -I/usr/local/include -Isrc -I/usr +/local/include/opencv -I/usr/local/include -O2 -g -DVERSION=\"0.1 +2\" -DXS_VERSIO N=\"0.12\" -fPIC "-I/usr/lib/perl/5.14/CORE" ObjectDetect.c Running Mkbootstrap for Image::ObjectDetect () chmod 644 ObjectDetect.bs rm -f blib/arch/auto/Image/ObjectDetect/ObjectDetect.so cc -shared -L/usr/local/lib -fstack-protector ObjectDetect.o -o blib +/arch/auto/Image/ObjectDetect/ObjectDetect.so \ \ chmod 755 blib/arch/auto/Image/ObjectDetect/ObjectDetect.so cp ObjectDetect.bs blib/arch/auto/Image/ObjectDetect/ObjectDetect.bs chmod 644 blib/arch/auto/Image/ObjectDetect/ObjectDetect.bs Manifying blib/man3/Image::ObjectDetect.3pm

I also had read somewhere about 'make test' which I remember the output of that happening before (but I don't remember at what point) but the test fails:

freddythunder@tacofever:~/cpan/objdetectsrc$ make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/00_compile.t .. 1/2 # Failed test 'use Image::ObjectDetect;' # at t/00_compile.t line 7. # Tried to use 'Image::ObjectDetect'. # Error: Can't load '/home/freddythunder/cpan/objdetectsrc/blib/a +rch/auto/Image/ObjectDetect/ObjectDetect.so' for module Image::Object +Detect: /home/freddythunder/cpan/objdetectsrc/blib/arch/auto/Image/Ob +jectDetect/ObjectDetect.so: undefined symbol: cvHaarDetectObjects at +/usr/lib/perl/5.14/DynaLoader.pm line 184. # at /home/freddythunder/cpan/objdetectsrc/blib/lib/Image/ObjectDetec +t.pm line 19 # BEGIN failed--compilation aborted at /home/freddythunder/cpan/objdet +ectsrc/blib/lib/Image/ObjectDetect.pm line 19. # Compilation failed in require at (eval 4) line 2. # BEGIN failed--compilation aborted at (eval 4) line 2. # Failed test 'Image::ObjectDetect->can('xs_detect')' # at t/00_compile.t line 8. # Image::ObjectDetect->can('xs_detect') failed # Looks like you failed 2 tests of 2. t/00_compile.t .. Dubious, test returned 2 (wstat 512, 0x200) Failed 2/2 subtests t/01_detect.t ... Can't load '/home/freddythunder/cpan/objdetectsrc/bl +ib/arch/auto/Image/ObjectDetect/ObjectDetect.so' for module Image::Ob +jectDetect: /home/freddythunder/cpan/objdetectsrc/blib/arch/auto/Imag +e/ObjectDetect/ObjectDetect.so: undefined symbol: cvHaarDetectObjects + at /usr/lib/perl/5.14/DynaLoader.pm line 184. at /home/freddythunder/cpan/objdetectsrc/blib/lib/Image/ObjectDetect. +pm line 19 BEGIN failed--compilation aborted at /home/freddythunder/cpan/objdetec +tsrc/blib/lib/Image/ObjectDetect.pm line 19. Compilation failed in require at t/01_detect.t line 5. BEGIN failed--compilation aborted at t/01_detect.t line 5. t/01_detect.t ... Dubious, test returned 255 (wstat 65280, 0xff00) No subtests run Test Summary Report ------------------- t/00_compile.t (Wstat: 512 Tests: 2 Failed: 2) Failed tests: 1-2 Non-zero exit status: 2 t/01_detect.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output Files=2, Tests=2, 0 wallclock secs ( 0.09 usr 0.02 sys + 0.14 cusr + 0.04 csys = 0.29 CPU) Result: FAIL Failed 2/2 test programs. 2/2 subtests failed. make: *** [test_dynamic] Error 255

Replies are listed 'Best First'.
Re^5: How to link to OpenCV goodies for PERL5
by Anonymous Monk on Jun 10, 2013 at 05:10 UTC

    What do you get as output of pkg-config opencv --libs

    It seems suspicious that your make log lacks some form of -lopencv or libopencv.a or some such

    seems odd that you'd have ...include/opencv but no libopencv

      freddythunder@tacofever:~$ pkg-config opencv --libs /usr/local/lib/libopencv_calib3d.so /usr/local/lib/libopencv_contrib.s +o /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_features2 +d.so /usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_gpu.s +o /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgpro +c.so /usr/local/lib/libopencv_legacy.so /usr/local/lib/libopencv_ml.s +o /usr/local/lib/libopencv_nonfree.so /usr/local/lib/libopencv_objdet +ect.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_sti +tching.so /usr/local/lib/libopencv_superres.so /usr/local/lib/libopen +cv_ts.so /usr/local/lib/libopencv_video.so /usr/local/lib/libopencv_v +ideostab.so

      Funny you should mention that, that is what I found on stack overflow I have to put that in the g++ commands to compile. Even though it is working maybe I did the initial opencv compile wrong...