Search code examples
fiwarefiware-orion

Compilation Fiware-Orion in Debian 8.7 (jessie) error make unit_test


I compiled Fiware-orion in Debian 8.7 and used MongoDB v2.4.10. The Fiware-orion compiles without errors, but make unit_test returns some errors. I followed the steps on page http://fiware-orion.readthedocs.io/en/master/admin/build_source/ and used the existing libraries in the apt repository.

I installed the necessary building tools:

apt install scons build-essential make cmake

I installed the necessary libraries:

apt install libboost-all-dev libcurl4-openssl-dev libgnutls28-dev libgcrypt20-dev libssl-dev uuid-dev

I installed the Legacy C++ Driver 1.0.2 version of the MongoDB Driver as recommended by https://github.com/telefonicaid/fiware-orion/issues/1681#issuecomment-173003764.

The make unit_test returns the following error:

[----------] Global test environment tear-down

[=======] 899 tests from 135 test cases ran. (4440 ms total)

[ PASSED ] 895 tests.

[ FAILED ] 4 tests, listed below:

[ FAILED ] mongoQueryContextRequest_filters.outsideRange_n

[ FAILED ] mongoQueryContextGeoRequest.queryGeoCircleOut

[ FAILED ] mongoQueryContextGeoRequest.queryGeoPolygonOut1

[ FAILED ] mongoQueryContextGeoRequest.queryGeoPolygonOut2

How can I solve this problem?


Solution

  • Two considerations to take into account:

    • You should use Mongo C++ legacy driver version 1.1.2 (see building from sources documentation. This probably is not the cause of the unit test fails, but advisable anyway.

    • You should use at least MongoDB 2.6 (check requiresments). Specifically, you shouldn't use MongoDB 2.4 as warned in that documentation:

    The recommended MongoDB versions are 2.6/3.0/3.2. It is not recommended using MongoDB 2.4.x., as some geolocated queries may not work.

    Moreover, you shouldn't use MongoDB 2.4 in general (not only for Orion) as it expired in March 2016 (check MongoDB official documentation).