0

I want compile mongo c++ driver in RHEL 5, but when use scons, Error is :

compare_numbers.h:83: warning: passing 'double' for argument 2 to 'int mongo::compareLongs(long long int, long long int)'
scons: *** [build/linux2/normal/mongo/bson/bsonelement.o] Error 1
scons: building terminated because of errors.

What is this ?

Hamid Mamdoohi
  • 134
  • 1
  • 9
  • You're passing a `double`. The function expects a `long long int`, and apparently the compile flags are such warnings are treated as errors? – Barry Apr 15 '15 at 21:13
  • You have an error on line 83 of `compare_numbers.h`. Apparently, you're passing a `double` where you should be passing a `long long int`. That's what the error says. – Steve Apr 15 '15 at 21:13
  • i just use `scons` in mongo-cxx-driver-legacy directory, without extra code – Hamid Mamdoohi Apr 15 '15 at 21:15
  • If the code is not yours, then you're probably using a compiler which is more strict than the one the developers use. Check that you use the last version of the code and if so, report the issue upstream. – Arkanosis Apr 15 '15 at 21:16
  • Someone's been abusing the fact that `sizeof(double) == sizeof(long long)` on most sane architectures. Remove the -Werror and pray. – tux3 Apr 15 '15 at 21:18
  • my gcc version is 4.1.2 – Hamid Mamdoohi Apr 15 '15 at 21:19

0 Answers0