luckiezhou / DynamicTriad

Dynamic Network Embedding by Modeling Triadic Closure Process
Apache License 2.0
138 stars 49 forks source link

error at bash build.sh #9

Open Interesting6 opened 6 years ago

Interesting6 commented 6 years ago

Excuse me, after I read your paper, your works are so cheerful & interesting. Hence I want to implement it, to see the progress. so I follow your "read.me" instruction. But when I dealing with the environment, the cmake always annoyed me. Now, the problem is:

`Scanning dependencies of target dynamic_triad [ 50%] Building CXX object CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0, from /root/triad/DynamicTriad/core/algorithm/dynamic_triad_cimpl.cpp:2: /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

warning "Using deprecated NumPy API, disable it by " \

^ /root/triad/DynamicTriad/core/algorithm/dynamic_triad_cimpl.cpp:8:22: fatal error: Eigen/Core: No such file or directory compilation terminated. CMakeFiles/dynamic_triad.dir/build.make:62: recipe for target 'CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o' failed make[2]: [CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/dynamic_triad.dir/all' failed make[1]: [CMakeFiles/dynamic_triad.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2`

My platform is aliyun server, Ubuntu16.04 and python2.7. I have been google this problem but it seems didn't work. So, can you help me to give me some advise to solve this problem? thanks.

luckiezhou commented 6 years ago

@Interesting6 According to the message "Eigen/Core: No such file or directory", it is obvious that the Eigen library is missing. I guess you failed to setup the environment variables correctly, please refer to issue #5 for environment setting instructions.

Interesting6 commented 6 years ago

I have installed all the require in command line... and do some change to environment according to google. But there always exits a error about the environment in my PC and Aliyun Server. I don't know how to do it . orz

luckiezhou commented 6 years ago

Is the error still about Eigen, or can you post the latest error message here? Maybe I can help to figure out the problem.

Interesting6 commented 6 years ago

the error in aliyun is following: ` OPENMP FOUND -- Configuring done -- Generating done -- Build files have been written to: /root/triad/DynamicTriad/core/algorithm/build Scanning dependencies of target dynamic_triad [ 50%] Building CXX object CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0, from /root/triad/DynamicTriad/core/algorithm/dynamic_triad_cimpl.cpp:2: /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

warning "Using deprecated NumPy API, disable it by " \

^ /root/triad/DynamicTriad/core/algorithm/dynamic_triad_cimpl.cpp:8:22: fatal error: Eigen/Core: No such file or directory compilation terminated. CMakeFiles/dynamic_triad.dir/build.make:62: recipe for target 'CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o' failed make[2]: [CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/dynamic_triad.dir/all' failed make[1]: [CMakeFiles/dynamic_triad.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: ** [all] Error 2 and I usedpkg -L libeigen3-dev` to find its include dir: ' /usr/share/doc/libeigen3-dev/ /usr/include/eigen3/Eigen/ /usr/include/eigen3/unsupported/Eigen/ /usr/include/eigen3/signature_of_eigen3_matrix_library ' , where * means omit.

besides, EIGEN3_INCLUDE_DIR, I use "/usr/include/eigen3" then the error is : ` OPENMP FOUND -- Configuring done -- Generating done -- Build files have been written to: /root/triad/DynamicTriad/core/algorithm/build Scanning dependencies of target dynamic_triad [ 50%] Building CXX object CMakeFiles/dynamic_triad.dir/dynamic_triad_cimpl.cpp.o In file included from /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/ndarraytypes.h:1821:0, from /root/triad/DynamicTriad/core/algorithm/dynamic_triad_cimpl.cpp:2: /usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

warning "Using deprecated NumPy API, disable it by " \

^ [100%] Linking CXX shared library dynamic_triad_cimpl.so [100%] Built target dynamic_triad [100%] Built target dynamic_triad Install the project... -- Install configuration: "RELEASE" -- Installing: /root/triad/DynamicTriad/core/algorithm/dynamic_triad_cimpl.so `

it seems error not occur in the eigen3 dir. But still error... thanks

luckiezhou commented 6 years ago

Well, I think that's not an error. It's just a warning about the deprecated numpy api. The shared object is actually built and installed, and it should be fine to run the program.

Interesting6 commented 6 years ago

orz 为什么我之前要打英文。。。

执行完bash build.sh后,PC端当我执行python scripts/test.py后再次报错:orz Checking mygraph submodule ... Traceback (most recent call last): File "scripts/test.py", line 13, in raise RuntimeError("mygraph submodule not avaiable: {}".format(str(e))) RuntimeError: mygraph submodule not avaiable: /home/mrblack/anaconda2/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/mrblack/DynamicTriad/core/mygraph.so)

但在阿里云上这句好像正常,只是有个差不多的警告。。。 执行 bash scripts/demo.sh时,跑到saving graph for year 2015 to file data/academic_toy/35后running built_ext 然后报错,no module named graph_tool 。

感觉我不适合看复杂代码。。。

大佬也早点休息,感谢指导。

luckiezhou commented 6 years ago

In case somebody who doesn't read Chinese bumps into the same problems as yours, writing in English helps him/her understand the solution. In addition, it is a good way to practice your English through communication... The problem on your PC is a weird one, I guess it is caused by the difference between your building and execution environment. As for the problem on AliYun, it is as simple as a missing (or at least not found in the environment) graph tool library.

Interesting6 commented 6 years ago

aliyun's problem is fixed by following the blog: https://blog.csdn.net/lxg0807/article/details/51225623