Cannot build Indri in macOS Mojave after configure (tried two different machines and worked on none). Error message:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C contrib
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C antlr/obj -f ../src/Makefile
g++ -DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.14\" -DPACKAGE_STRING=\"Indri\ 5.14\" -DPACKAGE_BUGREPORT=\"project@lemurproject.org\" -DYYTEXT_POINTER=1 -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_NAMESPACES=/**/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DP_NEEDS_GNU_CXX_NAMESPACE=0 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -stdlib=libstdc++ -g -O3 -I../include -I../contrib/lemur/include -I../contrib/xpdf/include -I../contrib/antlr/include -o ANTLRUtil.o -c ../src/ANTLRUtil.cpp
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from ../src/ANTLRUtil.cpp:9:
In file included from ../include/antlr/IOException.hpp:12:
../include/antlr/ANTLRException.hpp:12:10: fatal error: 'string' file not found
^~~~~~~~
1 warning and 1 error generated.
make[2]: *** [ANTLRUtil.o] Error 1
make[1]: *** [all] Error 2
make: *** [all] Error 2
Dear Prof. Jiang,
I also encountered this problem (on Mojave). I found that from OSX 10.14 on, even after the installation of Xcode commandline tool, they still won't install the necessary C++ headers in /usr/include. Actually after installation of Xcode commadline tools (could be installed from terminal by: xcode-select --install), the headers are stored in /Library/Developer/CommandLineTools/usr/include/c++/v1
You can add a CFLAG in your ~/.bash_profile:
export CPATH=/Library/Developer/CommandLineTools/usr/include/c++/v1
so that when compilling, it could find the necessary headers. Hope this could help you.
Best
Ivan
Last edit: Ivan De Rijk 2019-03-02