Updated by Alexander Shishkov about 13 years ago

Hello there,
A few days ago we tried to compile the newest OpenCV [[OpenCV]] release (2.2) for our OMAP cpu using the CodeSourcery [[CodeSourcery]] g++ compiler. There are, again, a few issues that need to be solved in order to guarantee compilation of OpenCV [[OpenCV]] without any troubles.

First of all, the number of “errors” has been greatly diminished since the last few releases. It’s quite nice to see, that our comments are regarded useful by you folks!

Since were not completely through with the cross compilation for the ARM processor using our g++ CodeSourcery [[CodeSourcery]] compiler the following fixes aren’t complete. Since we aren’t using a unix- or windows-like system, most of the errors seem to come from platform dependencies.

1. /include/opencv2/core/internal.hpp
- #include <sys/mman.h> can not be found: we had to remove this
line since this header could not be found. The removal had no
effect – it seems that this header isn’t needed at all.
2. define of ‘expl’ is missing in /modules/ml/src/gbt.cpp
- at line 14-16 we had to remove the #if ANDROID flag in order to
use #define expl(x) exp(x).
3. /modules/core/src/rand.cpp: issues with pthread
- This was actual already a problem in previous version of
OpenCV, [[OpenCV]], but we did never commit the “bug”. From line 634-668 we
had to remove the functionality since this won’t work on our
system. We inserted a new define NO_OS that switches between
implementations.

// CODE //
#ifdef NO_OS
RNG& theRNG()
{
CV_Assert(FALSE); // runtime stop if this one is really
used! psa
RNG* rng = NULL;
return *rng;
}
#else
static pthread_key_t tlsRNGKey = 0;

static void deleteRNG(void* data)
{
delete (RNG*)data;
}

RNG& theRNG()
{
if( !tlsRNGKey )
{
int errcode = pthread_key_create(&tlsRNGKey, deleteRNG);
CV_Assert(errcode == 0);
}
RNG* rng = (RNG*)pthread_getspecific(tlsRNGKey);
if( !rng )
{
rng = new RNG;
pthread_setspecific(tlsRNGKey, rng);
}
return *rng;
}
#endif

There are a few more issues that need addressing, but at the moment, the ones above are the most important.

Regards
Matthias


Back