0

I am currently trying to use the atomic_hashmaps from folly/facebook c++ library, but after the folly installation, if I simply require the lib like

#include <folly/AtomicHashMap.h> 

The g++ compiler throws the following exception:

In file included from /usr/local/include/folly/ThreadLocal.h:40:0,
         from /usr/local/include/folly/ThreadCachedInt.h:31,
         from /usr/local/include/folly/AtomicHashArray.h:41,
         from /usr/local/include/folly/AtomicHashMap.h:93,
         from cartesian_zero.cpp:11:
/usr/local/include/folly/Portability.h:203:20: fatal error: __config: No such file or directory
compilation terminated. 

I am compiling my C++ code with:

g++-5.1.0 -std=c++11 -o3 -lhiredis -fopenmp cartesian_zero.cpp

is it a folly's issue or my fault?

valiano
  • 16,433
  • 7
  • 64
  • 79
Raphael Ottoni
  • 506
  • 3
  • 14
  • 1
    At first, I thought you were missing the -I option to find includes. But since you can file the folly headers, that's not the case. It looks like an install/config issue. – Anon Mail Oct 06 '15 at 17:56
  • I agree with you, but I don't know how to fix it. – Raphael Ottoni Oct 06 '15 at 18:06
  • When you did the install/build, what compiler did it use? I'm asking because you use a specific compiler (g++-5.1.0). If the install/build doesn't know about that specific compiler, it may use the default (e.g. /usr/bin/g++ if you're on Linux). – Anon Mail Oct 06 '15 at 18:09
  • I just checked the Makefile, and it indeed used the default osx c compiler. I just changed all g++ variables in Makefile to g++-5.1.0. Let's see if it does the trick – Raphael Ottoni Oct 06 '15 at 18:15

0 Answers0