Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building #128

Open
Martin36 opened this issue Feb 19, 2025 · 3 comments
Open

Error when building #128

Martin36 opened this issue Feb 19, 2025 · 3 comments

Comments

@Martin36
Copy link

Operating system: Ubuntu 22.04.5 LTS
Python version: 3.10.12
gcc version: 11.4.0

When trying to build the planner I get the following error:

Building FS library: "scons -j 5 " @ /home/martin/repos/fs
scons: Reading SConscript files ...
Importing module: "core"
Importing module: "lapkt2"
Skipping module "hybrid"
Skipping module "ompl"
scons: done reading SConscript files.
scons: Building targets ...
g++ -o .build/prod/src/fs/core/languages/fstrips/operations/basic.os -c -Wall -pedantic -std=c++14 -O3 -DNDEBUG -isystem/usr/local/include -isystem/home/martin/local/include -fPIC -Ivendor/rapidjson/include -Ivendor/lapkt-base/src -Ivendor/lapkt-novelty/src -Isrc .build/prod/src/fs/core/languages/fstrips/operations/basic.cxx
g++ -o .build/prod/src/fs/core/languages/fstrips/operations/interpretation.os -c -Wall -pedantic -std=c++14 -O3 -DNDEBUG -isystem/usr/local/include -isystem/home/martin/local/include -fPIC -Ivendor/rapidjson/include -Ivendor/lapkt-base/src -Ivendor/lapkt-novelty/src -Isrc .build/prod/src/fs/core/languages/fstrips/operations/interpretation.cxx
g++ -o .build/prod/src/fs/core/languages/fstrips/operations/conjunction.os -c -Wall -pedantic -std=c++14 -O3 -DNDEBUG -isystem/usr/local/include -isystem/home/martin/local/include -fPIC -Ivendor/rapidjson/include -Ivendor/lapkt-base/src -Ivendor/lapkt-novelty/src -Isrc .build/prod/src/fs/core/languages/fstrips/operations/conjunction.cxx
g++ -o .build/prod/src/fs/core/languages/fstrips/operations/axioms.os -c -Wall -pedantic -std=c++14 -O3 -DNDEBUG -isystem/usr/local/include -isystem/home/martin/local/include -fPIC -Ivendor/rapidjson/include -Ivendor/lapkt-base/src -Ivendor/lapkt-novelty/src -Isrc .build/prod/src/fs/core/languages/fstrips/operations/axioms.cxx
g++ -o .build/prod/vendor/lapkt-novelty/src/lapkt/novelty/generic_evaluator.os -c -Wall -pedantic -std=c++14 -O3 -DNDEBUG -isystem/usr/local/include -isystem/home/martin/local/include -fPIC -Ivendor/rapidjson/include -Ivendor/lapkt-base/src -Ivendor/lapkt-novelty/src -Isrc .build/prod/vendor/lapkt-novelty/src/lapkt/novelty/generic_evaluator.cxx
In file included from src/fs/core/languages/fstrips/operations/conjunction.hxx:4,
                 from .build/prod/src/fs/core/languages/fstrips/operations/conjunction.cxx:2:
src/fs/core/utils/visitor.hxx: In static member function ‘static R Loki::ThrowCatchAll<R, Visited>::OnUnknownVisitor(Visited&, Loki::BaseVisitor&)’:
src/fs/core/utils/visitor.hxx:160:18: error: ‘runtime_error’ is not a member of ‘std’
  160 |     { throw std::runtime_error("Loki Visitor: Unknown visited type"); }
      |                  ^~~~~~~~~~~~~
In file included from src/fs/core/languages/fstrips/operations/axioms.hxx:4,
                 from .build/prod/src/fs/core/languages/fstrips/operations/axioms.cxx:4:
src/fs/core/utils/visitor.hxx: In static member function ‘static R Loki::ThrowCatchAll<R, Visited>::OnUnknownVisitor(Visited&, Loki::BaseVisitor&)’:
src/fs/core/utils/visitor.hxx:160:18: error: ‘runtime_error’ is not a member of ‘std’
  160 |     { throw std::runtime_error("Loki Visitor: Unknown visited type"); }
      |                  ^~~~~~~~~~~~~
In file included from src/fs/core/languages/fstrips/operations/basic.hxx:7,
                 from .build/prod/src/fs/core/languages/fstrips/operations/basic.cxx:4:
src/fs/core/utils/visitor.hxx: In static member function ‘static R Loki::ThrowCatchAll<R, Visited>::OnUnknownVisitor(Visited&, Loki::BaseVisitor&)’:
src/fs/core/utils/visitor.hxx:160:18: error: ‘runtime_error’ is not a member of ‘std’
  160 |     { throw std::runtime_error("Loki Visitor: Unknown visited type"); }
      |                  ^~~~~~~~~~~~~
In file included from src/fs/core/languages/fstrips/operations/interpretation.hxx:6,
                 from .build/prod/src/fs/core/languages/fstrips/operations/interpretation.cxx:4:
src/fs/core/utils/visitor.hxx: In static member function ‘static R Loki::ThrowCatchAll<R, Visited>::OnUnknownVisitor(Visited&, Loki::BaseVisitor&)’:
src/fs/core/utils/visitor.hxx:160:18: error: ‘runtime_error’ is not a member of ‘std’
  160 |     { throw std::runtime_error("Loki Visitor: Unknown visited type"); }
      |                  ^~~~~~~~~~~~~
In file included from .build/prod/src/fs/core/languages/fstrips/operations/basic.cxx:4:
src/fs/core/languages/fstrips/operations/basic.hxx: In member function ‘virtual void fs0::language::fstrips::TypeVisitor::Visit(const fs0::language::fstrips::Constant&)’:
src/fs/core/languages/fstrips/operations/basic.hxx:242:54: error: ‘runtime_error’ is not a member of ‘std’
  242 |         void Visit(const Constant& lhs) { throw std::runtime_error("Unimplemented"); }
      |                                                      ^~~~~~~~~~~~~
In file included from .build/prod/src/fs/core/languages/fstrips/operations/interpretation.cxx:4:
src/fs/core/languages/fstrips/operations/interpretation.hxx: In member function ‘void fs0::language::fstrips::VariableInterpretationVisitor<AssignmentT>::Visit(const fs0::language::fstrips::BoundVariable&)’:
src/fs/core/languages/fstrips/operations/interpretation.hxx:71:59: error: ‘runtime_error’ is not a member of ‘std’
   71 |         void Visit(const BoundVariable& lhs) { throw std::runtime_error("Bound variables cannot resolve to an state variable"); }
      |                                                           ^~~~~~~~~~~~~
src/fs/core/languages/fstrips/operations/interpretation.hxx: In member function ‘void fs0::language::fstrips::VariableInterpretationVisitor<AssignmentT>::Visit(const fs0::language::fstrips::Constant&)’:
src/fs/core/languages/fstrips/operations/interpretation.hxx:72:54: error: ‘runtime_error’ is not a member of ‘std’
   72 |         void Visit(const Constant& lhs) { throw std::runtime_error("Constant terms cannot resolve to an state variable"); }
      |                                                      ^~~~~~~~~~~~~
src/fs/core/languages/fstrips/operations/interpretation.hxx: In member function ‘void fs0::language::fstrips::VariableInterpretationVisitor<AssignmentT>::Visit(const fs0::language::fstrips::StaticHeadedNestedTerm&)’:
src/fs/core/languages/fstrips/operations/interpretation.hxx:73:68: error: ‘runtime_error’ is not a member of ‘std’
   73 |         void Visit(const StaticHeadedNestedTerm& lhs) { throw std::runtime_error("Static-headed terms cannot resolve to an state variable"); }
      |                                                                    ^~~~~~~~~~~~~
In file included from .build/prod/src/fs/core/languages/fstrips/operations/interpretation.cxx:4:
src/fs/core/languages/fstrips/operations/interpretation.hxx: In member function ‘void fs0::language::fstrips::VariableInterpretationVisitor<AssignmentT>::Visit(const fs0::language::fstrips::AxiomaticTermWrapper&)’:
src/fs/core/languages/fstrips/operations/interpretation.hxx:74:66: error: ‘runtime_error’ is not a member of ‘std’
   74 |         void Visit(const AxiomaticTermWrapper& lhs) { throw std::runtime_error("Axioms cannot resolve to an state variable"); }
      |                                                                  ^~~~~~~~~~~~~
scons: *** [.build/prod/src/fs/core/languages/fstrips/operations/conjunction.os] Error 1
scons: *** [.build/prod/src/fs/core/languages/fstrips/operations/interpretation.os] Error 1
scons: *** [.build/prod/src/fs/core/languages/fstrips/operations/basic.os] Error 1
scons: *** [.build/prod/src/fs/core/languages/fstrips/operations/axioms.os] Error 1
scons: building terminated because of errors.

Any idea why this happens?

@gfrances
Copy link
Member

Hi @Martin36 - without spending too much time on it, I would assume this is due to the version of GCC. I haven't worked on this project for a while (5 years?), and older GCC versions might have been more lenient with the inclusion of STD headers. In particular, adding an include of to src/fs/core/utils/visitor.hxx should fix this - but of course there might be other similar errors. Happy to review a PR if you want to give a try to fixing this?

@Martin36
Copy link
Author

One of the issues was solved by adding the line #include <stdexcept> in the file src/fs/core/utils/visitor.hxx, as you suggested. However, the make the build run I had to modify two files in the lapkt-novelty module, namely to add #include <stdexcept> in submodules/lapkt-novelty/src/lapkt/novelty/base.hxx and #include <ostream> in submodules/lapkt-novelty/src/lapkt/novelty/tuples.hxx.

I could do a PR with the fix, but I guess the fix for the submodule would have to be made to that repo.

@gfrances
Copy link
Member

Yes, the right way to go about it would be to create a PR for the lapkt repos, update, then create a PR here that updates both the includes and the commit ID of the git submodules. I can do that as well later this week, no worries. I'm assuming you're now all set and have been able to compile without further issues, but if that's not the case feel free to drop me an email.

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

No branches or pull requests

2 participants