openCV - cpan/Cv

H

HASM

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
 
R

Rainer Weikusat

HASM said:
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.
 
H

HASM

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
 
R

Rainer Weikusat

HASM said:
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.
 
H

HASM

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top