Open corwinliu opened 5 years ago
The problem is that I've manually disabled the compilers other than gnu gcc in the make script.
Thanks for your help. The problem solved after I removed the compiler check at core/graph/CMakeLists.txt and core/algorithm/CMakeLists.txt. Now I get two errors:
In file included from /Users/corwin/Desktop/project/DynamicTriad/core/graph/graph_pywrapper.cpp:5:
In file included from /Users/corwin/Desktop/project/DynamicTriad/core/graph/graph_pywrapper.h:8:
In file included from /Users/corwin/Desktop/project/DynamicTriad/core/graph/graph.h:12:
In file included from /Users/corwin/Desktop/project/DynamicTriad/core/graph/nodemap.h:14:
In file included from /Users/corwin/Desktop/project/DynamicTriad/core/graph/nodeset.h:14:
/Users/corwin/Desktop/project/DynamicTriad/core/graph/exception.h:27:57: error:
non-const lvalue reference to type
'basic_ostringstream<...>' cannot bind to a temporary of
type 'basic_ostringstream<...>'
...static_cast<std::ostringstream&>(std::ostringstream() << key...
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/corwin/Desktop/project/DynamicTriad/core/graph/graph.h:257:19: note:
in instantiation of member function
'InvalidKeyException<long long>::InvalidKeyException'
requested here
throw InvalidKeyException<node_type>(__FUNCTIO...
^
/Users/corwin/Desktop/project/DynamicTriad/core/graph/graph_pywrapper.h:112:12: note:
in instantiation of member function 'Graph<long long, float,
NodeMap>::newedge' requested here
g->newedge(from, to, std::move(val));
^
/Users/corwin/Desktop/project/DynamicTriad/core/graph/graph_pywrapper.cpp:149:5: note:
in instantiation of member function 'GraphPyWrapper<long
long, float>::add_edge' requested here
DECL_GRAPH_METHODS(Graph_Int64_Float);
^
/Users/corwin/Desktop/project/DynamicTriad/core/graph/graph_pywrapper.cpp:57:28: note:
expanded from macro 'DECL_GRAPH_METHODS'
.def("add_edge", &cls::add_edge) \
^
10 warnings and 6 errors generated.
make[2]: *** [CMakeFiles/mygraph.dir/graph_pywrapper.cpp.o] Error 1
make[1]: *** [CMakeFiles/mygraph.dir/all] Error 2
make: *** [all] Error 2
building c extensions for dynamic triad ...
-- The C compiler identification is AppleClang 10.0.1.10010046
-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Using custom python path /usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/Python.framework/Versions/2.7/Python and /usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/include/python2.7
-- Found PythonLibs: /usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/Python.framework/Versions/2.7/Python (found suitable version "2.7.16", minimum required is "2.7")
-- Found PythonInterp: /Users/corwin/envdyntriad/bin/python2.7 (found suitable version "2.7.16", minimum required is "2.7")
-- Numpy headers found
Using eigen path /Users/corwin/Downloads/eigen-eigen-323c052e1731
-- Boost version: 1.68.0
-- Could NOT find Boost
boost_python not detected by cmake, trying custom lib name
boost_python
CMake Error at /usr/local/Cellar/cmake/3.14.5/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.14.5/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.14.5/share/cmake/Modules/FindOpenMP.cmake:474 (find_package_handle_standard_args)
CMakeLists.txt:113 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/Users/corwin/Desktop/project/DynamicTriad/core/algorithm/build/CMakeFiles/CMakeOutput.log".
See also "/Users/corwin/Desktop/project/DynamicTriad/core/algorithm/build/CMakeFiles/CMakeError.log".
One error seems that boost_python cannot be detected. I set the path of BOOST_ROOT to be the path of downloaded and extracted directory from https://www.boost.org/doc/libs/1_70_0/more/getting_started/unix-variants.html#get-boost. Did I do it correctly?
After I ran
bash build.sh
and setup the environment variables, I got the following error:My platform is macOS Mojave 10.14.3 and python2.7 with virtualenv. PYTHON_LIBRARY and PYTHON_INCLUDE_DIR were set to default. EIGEN3_INCLUDE_DIR and BOOST_ROOT were set to be the path of downloaded and extracted directories. Name for boost_python library was set to the name of BOOST's directory(boost_1_68_0).
Can you give me some advise to solve this problem? Thanks a lot.