title: C++ headers not found on OSX Sierra
body: <p>I'm trying to compile a program using CMake and I'm getting the following output:</p>
  
  <pre><code>make VERBOSE=1
  Re-run cmake no build system arguments
  -- Found ccache /usr/local/osquery/bin/ccache
  -- Using ccache to speed up compilation
  -- The C compiler identification is Clang 3.8.0
  -- The CXX compiler identification is Clang 3.8.0
  -- Check for working C compiler: /usr/local/bin/clang
  -- Check for working C compiler: /usr/local/bin/clang -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working CXX compiler: /usr/local/bin/clang++
  -- Check for working CXX compiler: /usr/local/bin/clang++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Welcome to osquery's build-- thank you for your patience! :)
  -- For a brief tutorial see: http://osquery.readthedocs.io/en/stable/development/building/
  -- If at first you dont succeed, perhaps: make distclean; make depsclean
  -- Building for platform OS X (darwin, 10.12)
  -- Building osquery version  1.6.2-801-gd402a6a sdk 1.6.2
  -- Looking for C++ include tr1/tuple
  -- Looking for C++ include tr1/tuple - not found
  -- Found PythonInterp: /usr/local/osquery/bin/python (found version "2.7.12")
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Looking for pthread_create
  -- Looking for pthread_create - found
  -- Found Threads: TRUE
  -- Found library /usr/lib/libpthread.dylib
  -- Found library /usr/lib/libz.dylib
  -- Found library /usr/local/osquery/lib/libboost_system-mt.a
  -- Found library /usr/local/osquery/lib/libboost_filesystem-mt.a
  -- Found library /usr/local/osquery/lib/libgflags.a
  -- Found library /usr/local/osquery/lib/libthrift.a
  -- Found library /usr/local/osquery/lib/liblz4.a
  -- Found library /usr/local/osquery/lib/libglog.a
  -- Found library /usr/lib/libdl.dylib
  -- Found library /usr/local/osquery/lib/libcppnetlib-uri.a
  -- Found library /usr/local/osquery/lib/libcppnetlib-client-connections.a
  -- Found library /usr/local/osquery/lib/libboost_regex-mt.a
  -- Found library /usr/local/osquery/lib/librocksdb_lite.a
  -- Found library /usr/local/osquery/lib/libsnappy.a
  -- Found library /usr/local/osquery/lib/libssl.a
  -- Found library /usr/local/osquery/lib/libyara.a
  -- Found library /usr/local/osquery/lib/libcrypto.a
  -- Found library /usr/local/osquery/lib/liblinenoise.a
  -- Found library /usr/lib/liblzma.dylib
  -- Found library /usr/lib/libbz2.dylib
  -- Found library /usr/local/osquery/lib/libaws-cpp-sdk-kinesis.a
  -- Found library /usr/local/osquery/lib/libaws-cpp-sdk-firehose.a
  -- Found library /usr/local/osquery/lib/libaws-cpp-sdk-sts.a
  -- Found library /usr/local/osquery/lib/libaws-cpp-sdk-core.a
  -- Found library /usr/lib/libresolv.dylib
  -- Found library /usr/lib/libxar.dylib
  -- Found library /usr/local/osquery/lib/libmagic.a
  -- Found library /usr/local/osquery/lib/libtsk.a
  -- Found library /usr/local/osquery/lib/libaugeas.a
  -- Found library /usr/local/osquery/lib/libfa.a
  -- Found library /usr/local/osquery/lib/libxml2.a
  -- Found library /usr/lib/libiconv.dylib
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /Users/omer.katz/Documents/osquery/build/darwin10.12
  /usr/local/osquery/Cellar/cmake/3.6.1_1/bin/cmake -H/Users/omer.katz/Documents/osquery -B/Users/omer.katz/Documents/osquery/build/darwin10.12 --check-build-system CMakeFiles/Makefile.cmake 0
  /usr/local/osquery/Cellar/cmake/3.6.1_1/bin/cmake -E cmake_progress_start /Users/omer.katz/Documents/osquery/build/darwin10.12/CMakeFiles /Users/omer.katz/Documents/osquery/build/darwin10.12/CMakeFiles/progress.marks
  /Library/Developer/CommandLineTools/usr/bin/make -f CMakeFiles/Makefile2 all
  /Library/Developer/CommandLineTools/usr/bin/make -f third-party/sqlite3/CMakeFiles/osquery_sqlite.dir/build.make third-party/sqlite3/CMakeFiles/osquery_sqlite.dir/depend
  cd /Users/omer.katz/Documents/osquery/build/darwin10.12 &amp;&amp; /usr/local/osquery/Cellar/cmake/3.6.1_1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/omer.katz/Documents/osquery /Users/omer.katz/Documents/osquery/third-party/sqlite3 /Users/omer.katz/Documents/osquery/build/darwin10.12 /Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/sqlite3 /Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/sqlite3/CMakeFiles/osquery_sqlite.dir/DependInfo.cmake --color=
  Dependee "/Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/sqlite3/CMakeFiles/osquery_sqlite.dir/DependInfo.cmake" is newer than depender "/Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/sqlite3/CMakeFiles/osquery_sqlite.dir/depend.internal".
  Dependee "/Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/sqlite3/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/sqlite3/CMakeFiles/osquery_sqlite.dir/depend.internal".
  Scanning dependencies of target osquery_sqlite
  /Library/Developer/CommandLineTools/usr/bin/make -f third-party/sqlite3/CMakeFiles/osquery_sqlite.dir/build.make third-party/sqlite3/CMakeFiles/osquery_sqlite.dir/build
  [  0%] Building C object third-party/sqlite3/CMakeFiles/osquery_sqlite.dir/sqlite3.c.o
  cd /Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/sqlite3 &amp;&amp; /usr/local/osquery/bin/ccache /usr/local/bin/clang  -DBOOST_NETWORK_ENABLE_HTTPS -DBOOST_NO_CXX11_VARIADIC_TEMPLATES -DDARWIN -DDARWIN_10_12 -DNDEBUG -DOSQUERY_BUILD_DISTRO=10.12 -DOSQUERY_BUILD_PLATFORM=darwin -DOSQUERY_BUILD_SDK_VERSION=1.6.2 -DOSQUERY_THRIFT="" -DOSQUERY_THRIFT_LIB=thrift -DOSQUERY_THRIFT_POINTER=boost -DOSQUERY_THRIFT_SERVER_LIB=thrift/server -DSQLITE_DISABLE_DIRSYNC -DSQLITE_DISABLE_FTS3_UNICODE -DSQLITE_DISABLE_FTS4_DEFERRED -DSQLITE_DISABLE_LFS -DSQLITE_ENABLE_API_ARMOR -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_OMIT_AUTHORIZATION -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_LOOKASIDE -DSQLITE_OMIT_SHARED_CACHE -DSTRIP_FLAG_HELP=1 -isystem /Users/omer.katz/Documents/osquery/third-party/sysroots/darwin -isystem /usr/local/osquery/legacy/include -isystem /usr/local/osquery/include -I/usr/local/osquery/include/openssl -I/Users/omer.katz/Documents/osquery/third-party/sqlite3 -I/Users/omer.katz/Documents/osquery/include -I/Users/omer.katz/Documents/osquery -I/Users/omer.katz/Documents/osquery/build/darwin10.12/generated/gen-cpp  -Qunused-arguments -Wstrict-aliasing -Wno-missing-field-initializers -Wno-unused-local-typedef -Wno-deprecated-register -Wno-unknown-warning-option -Wnon-virtual-dtor -Wchar-subscripts -Wpointer-arith -Woverloaded-virtual -Wformat -Wformat-security -Werror=format-security -Wabi-tag -fpermissive -fstack-protector-all -pipe -fdata-sections -ffunction-sections -mmacosx-version-min=10.12 -Os -fPIE -fpie -fPIC -fpic -march=x86-64 -mno-avx -Wno-parentheses-equality -Wno-unused-value -o CMakeFiles/osquery_sqlite.dir/sqlite3.c.o   -c /Users/omer.katz/Documents/osquery/third-party/sqlite3/sqlite3.c
  /Users/omer.katz/Documents/osquery/third-party/sqlite3/sqlite3.c:20330:17: warning: 'OSAtomicCompareAndSwapPtrBarrier' is deprecated: first deprecated in OS X 10.12 - Use atomic_compare_exchange_strong() from &lt;stdatomic.h&gt; instead [-Wdeprecated-declarations]
        success = OSAtomicCompareAndSwapPtrBarrier(NULL, newzone,
                  ^
  /usr/include/libkern/OSAtomicDeprecated.h:547:6: note: 'OSAtomicCompareAndSwapPtrBarrier' has been explicitly marked deprecated here
  bool    OSAtomicCompareAndSwapPtrBarrier( void *__oldValue, void *__newValue, void * volatile *__theValue );
          ^
  1 warning generated.
  [  0%] Built target osquery_sqlite
  /Library/Developer/CommandLineTools/usr/bin/make -f third-party/gmock-1.7.0/CMakeFiles/gmock_main.dir/build.make third-party/gmock-1.7.0/CMakeFiles/gmock_main.dir/depend
  cd /Users/omer.katz/Documents/osquery/build/darwin10.12 &amp;&amp; /usr/local/osquery/Cellar/cmake/3.6.1_1/bin/cmake -E cmake_depends "Unix Makefiles" /Users/omer.katz/Documents/osquery /Users/omer.katz/Documents/osquery/third-party/gmock-1.7.0 /Users/omer.katz/Documents/osquery/build/darwin10.12 /Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/gmock-1.7.0 /Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/gmock-1.7.0/CMakeFiles/gmock_main.dir/DependInfo.cmake --color=
  Dependee "/Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/gmock-1.7.0/CMakeFiles/gmock_main.dir/DependInfo.cmake" is newer than depender "/Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/gmock-1.7.0/CMakeFiles/gmock_main.dir/depend.internal".
  Dependee "/Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/gmock-1.7.0/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/gmock-1.7.0/CMakeFiles/gmock_main.dir/depend.internal".
  Scanning dependencies of target gmock_main
  /Library/Developer/CommandLineTools/usr/bin/make -f third-party/gmock-1.7.0/CMakeFiles/gmock_main.dir/build.make third-party/gmock-1.7.0/CMakeFiles/gmock_main.dir/build
  [  0%] Building CXX object third-party/gmock-1.7.0/CMakeFiles/gmock_main.dir/gtest/src/gtest-all.cc.o
  cd /Users/omer.katz/Documents/osquery/build/darwin10.12/third-party/gmock-1.7.0 &amp;&amp; /usr/local/osquery/bin/ccache /usr/local/bin/clang++   -DBOOST_NETWORK_ENABLE_HTTPS -DBOOST_NO_CXX11_VARIADIC_TEMPLATES -DDARWIN -DDARWIN_10_12 -DNDEBUG -DOSQUERY_BUILD_DISTRO=10.12 -DOSQUERY_BUILD_PLATFORM=darwin -DOSQUERY_BUILD_SDK_VERSION=1.6.2 -DOSQUERY_THRIFT="" -DOSQUERY_THRIFT_LIB=thrift -DOSQUERY_THRIFT_POINTER=boost -DOSQUERY_THRIFT_SERVER_LIB=thrift/server -DSTRIP_FLAG_HELP=1 -isystem /Users/omer.katz/Documents/osquery/third-party/sysroots/darwin -isystem /usr/local/osquery/legacy/include -isystem /usr/local/osquery/include -I/usr/local/osquery/include/openssl -I/Users/omer.katz/Documents/osquery/third-party/sqlite3 -I/Users/omer.katz/Documents/osquery/include -I/Users/omer.katz/Documents/osquery -I/Users/omer.katz/Documents/osquery/build/darwin10.12/generated/gen-cpp -I/Users/omer.katz/Documents/osquery/third-party/gmock-1.7.0/include -I/Users/omer.katz/Documents/osquery/third-party/gmock-1.7.0 -I/Users/omer.katz/Documents/osquery/third-party/gmock-1.7.0/gtest/include -I/Users/omer.katz/Documents/osquery/third-party/gmock-1.7.0/gtest  -L/usr/local/osquery/lib    -L/usr/local/osquery/lib   -DGTEST_HAS_PTHREAD=1   -Qunused-arguments -Wstrict-aliasing -Wno-missing-field-initializers -Wno-unused-local-typedef -Wno-deprecated-register -Wno-unknown-warning-option -Wnon-virtual-dtor -Wchar-subscripts -Wpointer-arith -Woverloaded-virtual -Wformat -Wformat-security -Werror=format-security -Wabi-tag -fpermissive -fstack-protector-all -pipe -fdata-sections -ffunction-sections -mmacosx-version-min=10.12 -Os -fPIE -fpie -fPIC -fpic -march=x86-64 -mno-avx -o CMakeFiles/gmock_main.dir/gtest/src/gtest-all.cc.o -c /Users/omer.katz/Documents/osquery/third-party/gmock-1.7.0/gtest/src/gtest-all.cc
  In file included from /Users/omer.katz/Documents/osquery/third-party/gmock-1.7.0/gtest/src/gtest-all.cc:39:
  /Users/omer.katz/Documents/osquery/third-party/gmock-1.7.0/gtest/include/gtest/gtest.h:54:10: fatal error: 'limits' file not found
  #include &lt;limits&gt;
           ^
  1 error generated.
  make[3]: *** [third-party/gmock-1.7.0/CMakeFiles/gmock_main.dir/gtest/src/gtest-all.cc.o] Error 1
  make[2]: *** [third-party/gmock-1.7.0/CMakeFiles/gmock_main.dir/all] Error 2
  make[1]: *** [all] Error 2
  make: *** [all] Error 2
  </code></pre>
  
  <p>XCode is installed correctly</p>
  
  <pre><code>xcode-select --install
  xcode-select: error: command line tools are already installed, use "Software Update" to install updates
  </code></pre>
  
  <p>and the header files are present.</p>
  
  <p>What could be the issue? Is it an environment variable that I need to set?</p>