From my experience, this problem is related to PCL.
As it is stated that RTAB-Map works only with the PCL 1.7.*, if you have different version installed, you most probably will fail to make.
If you have multiple versions of PCL installed, modify CMakeList.txt ("/rtabmap/CMakeList.txt"),
line 172 , to specify use exact version of PCL 1.7.*, e.g.
Can't reproduce this error on my system (ros hydro, ubuntu 12.04, PCL 1.7.0-2 installed). Is there another version of PCL installed on the system with a version >=1.7.2? The error above is in a part of the code is under:
#if PCL_VERSION_COMPARE(>=, 1, 7, 2)
You could comment all code under this in the function and return false. On Mac OS X, I have 1.7.2 and there is no error though.