openCV - cpan/Cv

Discussion in 'Perl Misc' started by HASM, Oct 1, 2013.

  1. HASM

    HASM Guest

    Trying to use openCV from Perl, there's a cpan module called Cv that seems
    to be the only current recourse, however that module doesn't install
    properly through cpan.

    After manually installing ExtUtils::pkgConfig, a dependency the installer
    doesn't ask for, the build still fails with some errors, the first being
    that "macro seed is called with an argument when it expects zero"

    Google gets a couple of hits, pointing the finger at perl?
    http://www.nntp.perl.org/group/perl.perl5.porters/2010/04/msg158573.html
    https://github.com/Leont/libperl--/issues/5

    Never did any XS stuff myself, but would like to fix that package instead
    of starting from scratch.

    -- HASM
     
    HASM, Oct 1, 2013
    #1
    1. Advertising

  2. HASM <> writes:
    > Trying to use openCV from Perl, there's a cpan module called Cv that seems
    > to be the only current recourse, however that module doesn't install
    > properly through cpan.
    >
    > After manually installing ExtUtils::pkgConfig, a dependency the installer
    > doesn't ask for, the build still fails with some errors, the first being
    > that "macro seed is called with an argument when it expects zero"
    >
    > Google gets a couple of hits, pointing the finger at perl?
    > http://www.nntp.perl.org/group/perl.perl5.porters/2010/04/msg158573.html
    > https://github.com/Leont/libperl--/issues/5


    Provided it isn't used in the module, just adding an

    #undef seed

    after the perl.h include and before the C++ 'random header' is included
    should work.
     
    Rainer Weikusat, Oct 1, 2013
    #2
    1. Advertising

  3. HASM

    HASM Guest

    Rainer Weikusat <> writes:

    >> the build still fails with some errors, the first being
    >> that "macro seed is called with an argument when it expects zero"


    > Provided it isn't used in the module, just adding an
    >
    > #undef seed
    >
    > after the perl.h include and before the C++ 'random header' is included
    > should work.


    I had tried that already, but I guess I put it in the wrong place. It now
    generates tons of warnings but compiles, most of tests in make test pass,
    but some (not all) seem to be openCV configuration related.

    I only need a limited subset of openCV functionality, maybe that will work
    before I need to dig through the warning list and/or make all tests succeed.

    -- HASM
     
    HASM, Oct 1, 2013
    #3
  4. HASM <> writes:
    > Rainer Weikusat <> writes:
    >
    >>> the build still fails with some errors, the first being
    >>> that "macro seed is called with an argument when it expects zero"

    >
    >> Provided it isn't used in the module, just adding an
    >>
    >> #undef seed
    >>
    >> after the perl.h include and before the C++ 'random header' is included
    >> should work.

    >
    > I had tried that already, but I guess I put it in the wrong place.


    First, you should determine if the Perl seed is used in the module
    code. That shouldn't be too difficult with the help of grep. If it
    isn't, you could put the #undef immediately after the perl.h include
    statement. If it is used, you need to replace the seed macro invocations
    with the macro expansion. That's just a single function call so
    shouldn't be too difficult, either.
     
    Rainer Weikusat, Oct 2, 2013
    #4
  5. HASM

    HASM Guest

    Rainer Weikusat <> writes:

    >> I had tried that already, but I guess I put it in the wrong place.


    > First, you should determine if the Perl seed is used in the module code.


    The Cv module is not up to par with others in cpan in easy of use and
    installation, and the japanese to english translation of the instructions
    don't really help someone like me that is not that familiar with XS.

    I had put the #undef seed after the perl.h in a file called Cv.inc, next to
    other #undefs in the same file for other macros. Then I compiled and got
    some many more warnings that I didn't realize the seed error was no longer
    in there.

    I cleared the whole thing, restarted, put the #undef in the same place and
    saved the make output to a file. It's several "pages" long but it is all
    warnings.

    Some of the tests file, but some are due to the unavailability of the SURF
    stuff (patent related), but I was able to make install, use the code.

    Thanks,

    -- HASM
     
    HASM, Oct 3, 2013
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. carl d.
    Replies:
    1
    Views:
    407
    A. Sinan Unur
    May 10, 2005
  2. Replies:
    5
    Views:
    215
    Randy Kobes
    Oct 12, 2005
  3. Ben Bullock
    Replies:
    12
    Views:
    299
    Ben Bullock
    Jul 8, 2008
  4. SVCitian
    Replies:
    1
    Views:
    986
    SVCitian
    Oct 22, 2010
  5. PerlFAQ Server
    Replies:
    0
    Views:
    177
    PerlFAQ Server
    Jan 24, 2011
Loading...

Share This Page