Having updated to the new OS X, which is Mavericks, I couldn’t compile the Indri anymore. I did a little bit hacking and finally succeeded. It took me ~1 hour to figure those out. I compiled 5.0, but I think it should be the similar.
First problem you might see is about std::_Ios_Openmode. You can replace std::_Ios_Openmode with (as it suppose to be) std::ios::openmode. I found this solution from cf. http://network-simulator-ns-2.7690.n7.nabble.com/ns-3-19-release-candidate-1-posted-td27925.html#none .
Another problem is about _Atomic_word. I didn’t manage to modify the code the solve the problem. So I did some search and found out that OS X Mavericks is using libc++ instead of libstdc++. Therefore I changed the generated makefile (MakeDefns):
CXX = g++
CXX = g++ -stdlib=libstdc++
Then you can try making it again, you will get some complaints about not knowing an identifier. But You have enough hint to solve that. Find the atomic.h file, and make two lines commented.
#define __atomic_add __gnu_cxx::__atomic_add
Then you should be able to make it successfully.
If you want Java support, you should also check whether you can see this in your MakeDefns file.
WITH_JAVA = 1
Mine was set to 0, even I specified the –enable-java while executing the configure program. Make sure other options with presences of “java/Java/JAVA” are correct. I got errors that said two header files couldn’t be found. So I just copied from my JDK directory to the include directory. They are jni.h and jni_md.h .
In the end, you can find the file libindri_jni.jnilib in the directory of $INDRI$/lib/