geek-ai / MAgent

A Platform for Many-Agent Reinforcement Learning
MIT License
1.68k stars 332 forks source link

Ubuntu 14.04 build problem #27

Closed ShawnLue closed 5 years ago

ShawnLue commented 6 years ago

I'm not sure if ubuntu 14 is supported for this project, because when I sudo apt-get install libwebsocketpp-dev, there was no matching package.

When I build:

The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /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: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/shawnlue/Applications/MAgent/build
Scanning dependencies of target magent
Scanning dependencies of target render
Scanning dependencies of target testlib
[  3%] [  6%] [ 10%] Building CXX object CMakeFiles/render.dir/src/render/backend/websocket.cc.o
Building CXX object CMakeFiles/magent.dir/src/runtime_api.cc.o
[ 13%] Building CXX object CMakeFiles/magent.dir/src/temp_c_booster.cc.o
Building CXX object CMakeFiles/testlib.dir/src/runtime_api.cc.o
In file included from /home/shawnlue/Applications/MAgent/src/render/backend/websocket.cc:1:0:
/home/shawnlue/Applications/MAgent/src/render/backend/websocket.h:4:53: fatal error: websocketpp/config/asio_no_tls_client.hpp: 没有那个文件或目录
 #include <websocketpp/config/asio_no_tls_client.hpp>
                                                     ^
compilation terminated.
make[2]: *** [CMakeFiles/render.dir/src/render/backend/websocket.cc.o] 错误 1
make[1]: *** [CMakeFiles/render.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
[ 16%] Building CXX object CMakeFiles/testlib.dir/src/temp_c_booster.cc.o
[ 20%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/RenderGenerator.cc.o
[ 23%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/GridWorld.cc.o
/home/shawnlue/Applications/MAgent/src/gridworld/GridWorld.cc:456:0: warning: ignoring #pragma omp declare [-Wunknown-pragmas]
     #pragma omp declare reduction (merge : std::vector<RenderAttackEvent> : omp_out.insert(omp_out.end(), omp_in.begin(), omp_in.end()))
 ^
[ 26%] Building CXX object CMakeFiles/testlib.dir/src/gridworld/Map.cc.o
[ 30%] Building CXX object CMakeFiles/magent.dir/src/gridworld/RenderGenerator.cc.o
/home/shawnlue/Applications/MAgent/src/gridworld/GridWorld.cc: In member function ‘virtual void magent::gridworld::GridWorld::step(int*)’:
/home/shawnlue/Applications/MAgent/src/gridworld/GridWorld.cc:474:40: error: expected ‘+’, ‘*’, ‘-’, ‘&’, ‘^’, ‘|’, ‘&&’, ‘||’, ‘min’ or ‘max’ before ‘merge’
     #pragma omp parallel for reduction(merge: render_attack_buffer)
                                        ^
make[2]: *** [CMakeFiles/testlib.dir/src/gridworld/GridWorld.cc.o] 错误 1
make[2]: *** 正在等待未完成的任务....
[ 33%] Building CXX object CMakeFiles/magent.dir/src/gridworld/GridWorld.cc.o
/home/shawnlue/Applications/MAgent/src/gridworld/GridWorld.cc:456:0: warning: ignoring #pragma omp declare [-Wunknown-pragmas]
     #pragma omp declare reduction (merge : std::vector<RenderAttackEvent> : omp_out.insert(omp_out.end(), omp_in.begin(), omp_in.end()))
 ^
/home/shawnlue/Applications/MAgent/src/gridworld/GridWorld.cc: In member function ‘virtual void magent::gridworld::GridWorld::step(int*)’:
/home/shawnlue/Applications/MAgent/src/gridworld/GridWorld.cc:474:40: error: expected ‘+’, ‘*’, ‘-’, ‘&’, ‘^’, ‘|’, ‘&&’, ‘||’, ‘min’ or ‘max’ before ‘merge’
     #pragma omp parallel for reduction(merge: render_attack_buffer)
                                        ^
[ 36%] Building CXX object CMakeFiles/magent.dir/src/gridworld/Map.cc.o
[ 40%] Building CXX object CMakeFiles/magent.dir/src/gridworld/AgentType.cc.o
make[2]: *** [CMakeFiles/magent.dir/src/gridworld/GridWorld.cc.o] 错误 1
make[2]: *** 正在等待未完成的任务....
make[1]: *** [CMakeFiles/testlib.dir/all] 错误 2
make[1]: *** [CMakeFiles/magent.dir/all] 错误 2
make: *** [all] 错误 2

Hope someone can help me to fix this.

Kipsora commented 6 years ago

We haven't try Ubuntu 14.04 because it is a old release where libwebsocketpp-dev is not published on that platform. You may try to manually download the library and change the header file or to upgrade your OS.