Skip to content
This repository has been archived by the owner on Mar 14, 2021. It is now read-only.

Compilation Error When Make #5

Closed
yutongyan opened this issue Aug 19, 2019 · 7 comments
Closed

Compilation Error When Make #5

yutongyan opened this issue Aug 19, 2019 · 7 comments

Comments

@yutongyan
Copy link

Hey!

What is the recommended GCC/G++ version?
I got this error when I make file:

[ 7%] Building CXX object CMakeFiles/agent.dir/src/agent.cpp.o
/home/yyt/craftassist/client/src/agent.cpp: In member function ‘bool Agent::setHeldItem(pybind11::object)’:
/home/yyt/craftassist/client/src/agent.cpp:203:16: error: catching polymorphic type ‘class pybind11::cast_error’ by value [-Werror=catch-value=]
203 | } catch (py::cast_error) {
| ^~~~~~~~~~
/home/yyt/craftassist/client/src/agent.cpp: In member function ‘int Agent::craft(pybind11::object)’:
/home/yyt/craftassist/client/src/agent.cpp:269:16: error: catching polymorphic type ‘class pybind11::cast_error’ by value [-Werror=catch-value=]
269 | } catch (py::cast_error) {
| ^~~~~~~~~~
cc1plus: all warnings being treated as errors
make[3]: *** [CMakeFiles/agent.dir/build.make:63: CMakeFiles/agent.dir/src/agent.cpp.o] Error 1
make[3]: Leaving directory '/home/yyt/craftassist/client'
make[2]: *** [CMakeFiles/Makefile2:73: CMakeFiles/agent.dir/all] Error 2
make[2]: Leaving directory '/home/yyt/craftassist/client'
make[1]: *** [Makefile:84: all] Error 2
make[1]: Leaving directory '/home/yyt/craftassist/client'
make: *** [Makefile:20: client] Error 2

My GCC version is version 9.1.0 (GCC).

PS: I tried to fix some errors (including this), but there are so many errors even though I changed the source code to fix some of them. I guess the errors are due to different versions of GCC used.

Thank you!

@yutongyan
Copy link
Author

@kavyasrinet

@kavyasrinet
Copy link
Contributor

Hello, thanks for creating the issue @jonathathan is looking into it.
The gcc version I have is: 7.4.0. I'll let Jonathan answer the other questions and reproduce the issue.

@yutongyan
Copy link
Author

@niansong1996

@niansong1996
Copy link

@yutongyan Thanks for letting me know! Did it work out for you using the GCC version @kavyasrinet mentioned above?

@jonathathan
Copy link
Contributor

Thanks for the detailed report. Just confirming that we use gcc 7.4.0 on ubuntu 18.04 for our official builds. Please let us know if this fixes your issues! If so I will update the documentation.

@niansong1996
Copy link

@yutongyan @kavyasrinet @jonathathan Hey, I can confirm that ubuntu 16.04 with gcc 7.4.0 and a higher version of cmake (I use 3.15.2) together works for me! I fixed some minor issue for the server to run, for which I submitted a PR.

@kavyasrinet
Copy link
Contributor

Thanks! we'll take a look at the PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants