Compile Indri 5.0 with OS X Mavericks

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):

Changes:

CXX = g++

to

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.

//#if P_NEEDS_GNU_CXX_NAMESPACE
#define __atomic_add __gnu_cxx::__atomic_add
//#endif

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/

One thought on “Compile Indri 5.0 with OS X Mavericks

  1. 2 x tablespoons of cooked oatmeal, 2 x tablespoons of natural yogurt, 1
    x tablespoon of organic honey. Natural method has been in practice for centuries.
    Before picking a whitening cream from market, it is suggested to evaluate your skin type for attaining
    good results.

    [Reply]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Sitemap