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

Compilation fails. #176

Open
rvlander opened this issue Sep 19, 2017 · 11 comments
Open

Compilation fails. #176

rvlander opened this issue Sep 19, 2017 · 11 comments
Assignees

Comments

@rvlander
Copy link

Configuration:

  • OpenJDK 1.8
  • ftjam 2.5.3
  • GCC 7.2.0
  • libantlr3c 3.5.2

When trying to build europa, I have the following errors:

[exec] In file included from NDDL/component/Interpreter.cc:29:0:
     [exec] NDDL/base/NddlRules.hh:118:1: warning: commentaire multi-lignes [-Wcomment]
     [exec]  // #define contains(origin, target)\
     [exec]  ^
     [exec] In file included from NDDL/base/NddlUtils.hh:13:0,
     [exec]                  from NDDL/component/Interpreter.cc:30:
     [exec] NDDL/base/NddlRules.hh:118:1: warning: commentaire multi-lignes [-Wcomment]
     [exec]  // #define contains(origin, target)\
     [exec]  ^
     [exec] In file included from /usr/include/boost/type_index/stl_type_index.hpp:22:0,
     [exec]                  from /usr/include/boost/type_index.hpp:29,
     [exec]                  from /usr/include/boost/function/function_base.hpp:21,
     [exec]                  from /usr/include/boost/function/detail/prologue.hpp:17,
     [exec]                  from /usr/include/boost/function.hpp:24,
     [exec]                  from /usr/include/boost/algorithm/string/detail/find_iterator.hpp:18,
     [exec]                  from /usr/include/boost/algorithm/string/find_iterator.hpp:24,
     [exec]                  from /usr/include/boost/algorithm/string/iter_find.hpp:27,
     [exec]                  from /usr/include/boost/algorithm/string/split.hpp:16,
     [exec]                  from NDDL/component/Interpreter.cc:35:
     [exec] /usr/include/boost/type_index/type_index_facade.hpp:98:42: error: la macro « before » requiert 2 arguments, mais seulement 1 ont été passés
     [exec]      inline bool before(const Derived& rhs) const BOOST_NOEXCEPT {
     [exec]                                           ^
     [exec] In file included from /usr/include/boost/type_index/stl_type_index.hpp:22:0,
     [exec]                  from /usr/include/boost/type_index.hpp:29,
     [exec]                  from /usr/include/boost/function/function_base.hpp:21,
     [exec]                  from /usr/include/boost/function/detail/prologue.hpp:17,
     [exec]                  from /usr/include/boost/function.hpp:24,
     [exec]                  from /usr/include/boost/algorithm/string/detail/find_iterator.hpp:18,
     [exec]                  from /usr/include/boost/algorithm/string/find_iterator.hpp:24,
     [exec]                  from /usr/include/boost/algorithm/string/iter_find.hpp:27,
     [exec]                  from /usr/include/boost/algorithm/string/split.hpp:16,
     [exec]                  from NDDL/component/Interpreter.cc:35:
     [exec] /usr/include/boost/type_index/type_index_facade.hpp:163:84: error: la macro « before » requiert 2 arguments, mais seulement 1 ont été passés
     [exec]      return static_cast<Derived const&>(lhs).before(static_cast<Derived const&>(rhs));
     [exec]                                                                                     ^
     [exec] In file included from /usr/include/boost/type_index.hpp:29:0,
     [exec]                  from /usr/include/boost/function/function_base.hpp:21,
     [exec]                  from /usr/include/boost/function/detail/prologue.hpp:17,
     [exec]                  from /usr/include/boost/function.hpp:24,
     [exec]                  from /usr/include/boost/algorithm/string/detail/find_iterator.hpp:18,
     [exec]                  from /usr/include/boost/algorithm/string/find_iterator.hpp:24,
     [exec]                  from /usr/include/boost/algorithm/string/iter_find.hpp:27,
     [exec]                  from /usr/include/boost/algorithm/string/split.hpp:16,
     [exec]                  from NDDL/component/Interpreter.cc:35:
     [exec] /usr/include/boost/type_index/stl_type_index.hpp:98:57: error: la macro « before » requiert 2 arguments, mais seulement 1 ont été passés
     [exec]      inline bool         before(const stl_type_index& rhs) const BOOST_NOEXCEPT;
     [exec]                                                          ^
     [exec] /usr/include/boost/type_index/stl_type_index.hpp:207:61: error: la macro « before » requiert 2 arguments, mais seulement 1 ont été passés
     [exec]  inline bool stl_type_index::before(const stl_type_index& rhs) const BOOST_NOEXCEPT {
     [exec]                                                              ^
     [exec] /usr/include/boost/type_index/stl_type_index.hpp:211:38: error: la macro « before » requiert 2 arguments, mais seulement 1 ont été passés
     [exec]      return !!data_->before(*rhs.data_);
     [exec]                                       ^
     [exec] In file included from /usr/include/boost/type_index/stl_type_index.hpp:22:0,
     [exec]                  from /usr/include/boost/type_index.hpp:29,
     [exec]                  from /usr/include/boost/function/function_base.hpp:21,
     [exec]                  from /usr/include/boost/function/detail/prologue.hpp:17,
     [exec]                  from /usr/include/boost/function.hpp:24,
     [exec]                  from /usr/include/boost/algorithm/string/detail/find_iterator.hpp:18,
     [exec]                  from /usr/include/boost/algorithm/string/find_iterator.hpp:24,
     [exec]                  from /usr/include/boost/algorithm/string/iter_find.hpp:27,
     [exec]                  from /usr/include/boost/algorithm/string/split.hpp:16,
     [exec]                  from NDDL/component/Interpreter.cc:35:
     [exec] /usr/include/boost/type_index/type_index_facade.hpp:98:17: error: « before » déclaré comme un champ « inline »
     [exec]      inline bool before(const Derived& rhs) const BOOST_NOEXCEPT {
     [exec]                  ^~~~~~
     [exec] /usr/include/boost/type_index/type_index_facade.hpp:98:17: error: « ; » attendu à la fin de la déclaration du membre
     [exec] In file included from /usr/include/boost/config.hpp:61:0,
     [exec]                  from /usr/include/boost/smart_ptr/shared_ptr.hpp:17,
     [exec]                  from PlanDatabase/base/ObjectType.hh:16,
     [exec]                  from NDDL/component/Interpreter.hh:10,
     [exec]                  from NDDL/component/Interpreter.cc:8:
     [exec] /usr/include/boost/type_index/type_index_facade.hpp:98:50: error: expected unqualified-id before « noexcept »
     [exec]      inline bool before(const Derived& rhs) const BOOST_NOEXCEPT {
     [exec]                                                   ^
     [exec] In file included from /usr/include/boost/type_index.hpp:29:0,
     [exec]                  from /usr/include/boost/function/function_base.hpp:21,
     [exec]                  from /usr/include/boost/function/detail/prologue.hpp:17,
     [exec]                  from /usr/include/boost/function.hpp:24,
     [exec]                  from /usr/include/boost/algorithm/string/detail/find_iterator.hpp:18,
     [exec]                  from /usr/include/boost/algorithm/string/find_iterator.hpp:24,
     [exec]                  from /usr/include/boost/algorithm/string/iter_find.hpp:27,
     [exec]                  from /usr/include/boost/algorithm/string/split.hpp:16,
     [exec]                  from NDDL/component/Interpreter.cc:35:
    
    [...]
@rvlander
Copy link
Author

It appears to be a name clash between thebefore macro defined in AMNLLexer.h and before function define in Boost.

@miatauro-NASA
Copy link
Contributor

You're the first person in a while to try to compile that particular ANML implementation. If you aren't going to use ANML (and I recommend you don't, at least not that one), you can comment it out at

add_subdirectory(ANML)

@rvlander
Copy link
Author

Compilation still fails but in another place:

     [exec] PlanDatabase/base/PlanDatabase.cc:552:99: error: pas de fonction correspondant à l'appel « make_pair<EUROPA::ObjectId, std::pair<EUROPA::Id<EUROPA::Token>, EUROPA::Id<EUROPA::Token> > >(EUROPA::ObjectId&, const std::pair<EUROPA::Id<EUROPA::Token>, EUROPA::Id<EUROPA::Token> >&) »
     [exec] NDDL/base/NDDL3Lexer.cpp:5030:75: error: « strdup » n'a pas été déclaré dans cette portée

There seems to have a problem with template resolution (Boost version issue?).
Also strdup was not declared in NDDL3Lexer.cpp

I am trying to compile the master branch, is it a good idea? Anyway, I have the same errors with the last tagged version.

@miatauro-NASA
Copy link
Contributor

make_pair has been in the Standard since C++03 or before, so I can't imagine how or why it can't resolve that template, and it doesn't seem like it should be a Boost issue. strdup is in cstring. I'll hopefully have some time to install a GCC that new soon and really dig into it, because I haven't tried compiling Europa with a C++14-compliant (and defaulting) compiler. In the meantime, can you try compiling with an earlier standard? Either -std=c++11 or -std=c++03?

@rvlander
Copy link
Author

In fact, modifying the CMake config file did not change anything since using (like in the build documentation)

ant release-dist

means that we use Jam (and not CMake) as a build manager.

These two compiling failures appears alternatively in a random fashion. Using c++11 or c++03 standards does not change anything.

@miatauro-NASA
Copy link
Contributor

The Jam/ant/etc. build is being deprecated. Please give the CMake build a try, which... I apparently failed to put documentation for on the wiki. I could swear I had. I'll create an issue for that.
Long story short, make sure you have the prerequisites installed. Then, from the Europa repository root:

mkdir build
cd build
cmake ..
make
make install

That will build 64-bit debug shared libraries. If you want something else, you can add arguments to the cmake run:

  • -DOPTIMIZE=TRUE/FALSE for optimized/debug (default debug)
  • -DSHARED=TRUE/FALSE for shared or static libraries (default shared)
  • -DSIXTYFOUR=TRUE/FALSE for 64- or 32-bit libraries (default based on CMAKE_SYSTEM_PROCESSOR)

@rvlander
Copy link
Author

cmake command fails:

CMake Error at src/PLASMA/CMakeLists.txt:45 (else):
  A duplicate ELSE command was found inside an IF block.

If I remove the offending else block then I have the following error:

CMake Error at src/Java/JavaUI/CMakeLists.txt:20 (unjar):
  Unknown CMake command "unjar".

@miatauro-NASA
Copy link
Contributor

Ack, I'm sorry, I dropped this right on the floor. What version of CMake are you using?

@rvlander
Copy link
Author

rvlander commented Oct 5, 2017

cmake version 3.9.3

Thanks

@miatauro-NASA
Copy link
Contributor

Just to let you know that I'm still looking at this. I'm pretty baffled by it, though, since unjar is defined in EuropaModule.cmake

@rvlander
Copy link
Author

Any news?

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

No branches or pull requests

2 participants