c++ - MacPorts clang not using its own headers -


i'm trying emscripten work on os x 10.8, see this post related issues there. apparently clang++ version shipped xcode old, got recent clang 3.7.0 using macports. told cmake use compiler (passing -dcmake_cxx_compiler=clang++-mp-3.7 on command line), still fails:

[ 33%] building cxx object cmakefiles/optimizer.dir/parser.cpp.o /opt/local/bin/clang++-mp-3.7    -std=c++11 -fno-exceptions -fno-rtti -o3 -dndebug   -o cmakefiles/optimizer.dir/parser.cpp.o   -c …/emsdk/emscripten/master/tools/optimizer/parser.cpp in file included …/emsdk/emscripten/master/tools/optimizer/parser.cpp:2: in file included …/emsdk/emscripten/master/tools/optimizer/parser.h:12: …/emsdk/emscripten/master/tools/optimizer/istring.h:3:10: fatal error:        'unordered_set' file not found #include <unordered_set>          ^ 1 error generated. 

i can reproduce issue launching compiler command line. in parallel build mode, it's instead complaining <cstdint> optimizer.cpp instead. both these headers exist in /opt/local/libexec/llvm-3.7/include/c++/v1/.

  • what's canonical way use macports-installed version of clang++ including headers? have use -i , work out full path, or there shorter?
  • can safely without switching runtime library 1 shipped macports' clang? if not, can somehow encode full path of runtime library created binary, either single library or using -rpath argument ld or equivalent alternative?
    update: unresolved symbols when try link stuff after specifying include directory manually, , don't know how solve that. libcxx package macports empty except readme file.

i've solved original problem adding cxxflags=--stdlib=libc++ environment. system version of clang need. flag works magic macports' version of clang well: specifying successful build, , can verify (using -e compiler switch) it's using headers mentioned before. i'm still not whether there ensure headers match system's version of libc++, though.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -