Comments (9)
Ok, personally I did't compile it with gcc11, only with gcc10, so there could be a difference and in order to compile with gcc11 guess you should #include <optional>
, that means you have to modify a code base, not a good idea. So you have to install gcc10 on your machine and compile like this cmake -DCMAKE_CXX_COMPILER=g++-10 .. && make -j4
To install gcc10 in ubuntu try apt install g++-10
from ai-toolbox.
Try this cmake -DCMAKE_CXX_COMPILER=g++-10 .. && make -j4
from ai-toolbox.
I had to alter you command a bit setting it to cmake -DCMAKE_CXX_COMPILER=g++ .. && make -j4
as g++ 11 is installed and it did not like g++-10
When I though execute this I get a similar error again, this time further down in the make progress:
[ 71%] Building CXX object test/CMakeFiles/MDP_TreeBackupLTests.dir/MDP/TreeBackupLTests.cpp.o
In file included from /home/jpk/Desktop/AI-Toolbox-master/src/Factored/MDP/Algorithms/Utils/FactoredLP.cpp:1:
/home/jpk/Desktop/AI-Toolbox-master/include/AIToolbox/Factored/MDP/Algorithms/Utils/FactoredLP.hpp:76:18: error: ‘optional’ in namespace ‘std’ does not name a template type
76 | std::optional<Vector> operator()(const FactoredVector & C, const FactoredVector & b, bool addConstantBasis = false);
| ^~~~~~~~
/home/jpk/Desktop/AI-Toolbox-master/include/AIToolbox/Factored/MDP/Algorithms/Utils/FactoredLP.hpp:7:1: note: ‘std::optional’ is defined in header ‘<optional>’; did you forget to ‘#include <optional>’?
6 | #include <AIToolbox/Factored/MDP/Types.hpp>
+++ |+#include <optional>
7 |
/home/jpk/Desktop/AI-Toolbox-master/src/Factored/MDP/Algorithms/Utils/FactoredLP.cpp:32:27: error: no declaration matches ‘std::optional<Eigen::Matrix<double, -1, 1> > AIToolbox::Factored::MDP::FactoredLP::operator()(const AIToolbox::Factored::FactoredVector&, const AIToolbox::Factored::FactoredVector&, bool)’
32 | std::optional<Vector> FactoredLP::operator()(const FactoredVector & C, const FactoredVector & b, bool addConstantBasis) {
| ^~~~~~~~~~
/home/jpk/Desktop/AI-Toolbox-master/src/Factored/MDP/Algorithms/Utils/FactoredLP.cpp:32:27: note: no functions named ‘std::optional<Eigen::Matrix<double, -1, 1> > AIToolbox::Factored::MDP::FactoredLP::operator()(const AIToolbox::Factored::FactoredVector&, const AIToolbox::Factored::FactoredVector&, bool)’
In file included from /home/jpk/Desktop/AI-Toolbox-master/src/Factored/MDP/Algorithms/Utils/FactoredLP.cpp:1:
/home/jpk/Desktop/AI-Toolbox-master/include/AIToolbox/Factored/MDP/Algorithms/Utils/FactoredLP.hpp:35:11: note: ‘class AIToolbox::Factored::MDP::FactoredLP’ defined here
35 | class FactoredLP {
| ^~~~~~~~~~
/home/jpk/Desktop/AI-Toolbox-master/src/Factored/MDP/Algorithms/Utils/FactoredLP.cpp:198:10: warning: ‘void AIToolbox::Factored::MDP::{anonymous}::Global::makeResult(AIToolbox::Factored::GenericVariableElimination<long unsigned int>::FinalFactors&&)’ defined but not used [-Wunused-function]
198 | void Global::makeResult(VE::FinalFactors && finalFactors) {
| ^~~~~~
/home/jpk/Desktop/AI-Toolbox-master/src/Factored/MDP/Algorithms/Utils/FactoredLP.cpp:183:10: warning: ‘void AIToolbox::Factored::MDP::{anonymous}::Global::endCrossSum()’ defined but not used [-Wunused-function]
183 | void Global::endCrossSum() {
| ^~~~~~
/home/jpk/Desktop/AI-Toolbox-master/src/Factored/MDP/Algorithms/Utils/FactoredLP.cpp:178:10: warning: ‘void AIToolbox::Factored::MDP::{anonymous}::Global::crossSum(const Factor&)’ defined but not used [-Wunused-function]
178 | void Global::crossSum(const Factor & f) {
| ^~~~~~
/home/jpk/Desktop/AI-Toolbox-master/src/Factored/MDP/Algorithms/Utils/FactoredLP.cpp:168:10: warning: ‘void AIToolbox::Factored::MDP::{anonymous}::Global::beginCrossSum()’ defined but not used [-Wunused-function]
168 | void Global::beginCrossSum() {
| ^~~~~~
/home/jpk/Desktop/AI-Toolbox-master/src/Factored/MDP/Algorithms/Utils/FactoredLP.cpp:159:10: warning: ‘void AIToolbox::Factored::MDP::{anonymous}::Global::initNewFactor()’ defined but not used [-Wunused-function]
159 | void Global::initNewFactor() {
| ^~~~~~
make[2]: *** [src/CMakeFiles/AIToolboxFMDP.dir/build.make:459: src/CMakeFiles/AIToolboxFMDP.dir/Factored/MDP/Algorithms/Utils/FactoredLP.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1109: src/CMakeFiles/AIToolboxFMDP.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 71%] Built target MDP_SARSATests
[ 71%] Linking CXX executable POMDP_BlindStrategiesTests
[ 71%] Linking CXX executable MDP_TreeBackupLTests
[ 71%] Built target POMDP_BlindStrategiesTests
[ 71%] Built target MDP_TreeBackupLTests
make: *** [Makefile:114: all] Error 2
from ai-toolbox.
what does this print gcc --version
?
from ai-toolbox.
gcc (Ubuntu 11.2.0-7ubuntu2) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
do you mean gcc or g++?
Here for g++
g++ (Ubuntu 11.2.0-7ubuntu2) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--------- EDIT
explicitly installing g++10,i.e. not 11, appears to have it go working! Perhaps writing it in the docs could be helpful as with v11 it did not work for me(which should be C20?).
from ai-toolbox.
--------- EDIT
explicitly installing g++10,i.e. not 11, appears to have it go working! Perhaps writing it in the docs could be helpful as with v11 it did not work for me(which should be C20?).
here you go!
from ai-toolbox.
OK indeed, v10 works!
Cheers!
from ai-toolbox.
Hey, thanks for the report! I had indeed forgotten to include a couple of header files, so g++-11
was rightfully complaining about it.
I've fixed and pushed the changes, so if you want to recompile with g++-11
everything should work correctly now.
from ai-toolbox.
Cheers for this and congratulations on this great work!
I'm actually a Debian user and stumbled upon g++-11
as I had to pull up an Ubuntu vm :-)
from ai-toolbox.
Related Issues (20)
- Python module problem HOT 26
- Using the Toolbox to solve the Tag problem HOT 4
- Save POMDP policy HOT 6
- Sparse Matrix's on POMDP model HOT 22
- Improve serialization for MDP and POMDP Sparse Models HOT 1
- Problem with make HOT 5
- Make cannot find .hpp file in Boost HOT 2
- Errors when compiling tutorials HOT 5
- Can't find Lpsolve when run cmake HOT 9
- Using AI-Toolbox with OMNeT++ HOT 2
- Not able to find "compare" file HOT 3
- Trouble installing and running AIToolbox HOT 9
- about LP_Solve HOT 13
- error C3779: 'AIToolbox::IndexMapIterator<IdsIterator,Container>::operator *': a function that returns 'auto' cannot be used before it is defined HOT 11
- Better Project Setup Tutorial HOT 6
- C++: error: expected ‘)’ before ‘elementsN’ HOT 10
- Problems when building the library HOT 4
- Sparse Matrix: Space Time Complexity while assigning and accessing an element. HOT 1
- Can't build because of lpslove HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai-toolbox.