You are not logged in.
Hi Folks,
I'm trying to install OMNeT++ but I'm running into an error which nobody else online seems to be encountering.
This error pops up when running make:
expression.cc: In member function ‘virtual omnetpp::common::expression::ExprNode* omnetpp::common::Expression::parseAndTranslate(const char*, AstTranslator*) const’:
expression.cc:141:10: error: ‘unique_ptr’ is not a member of ‘std’
141 | std::unique_ptr<AstNode> astTree(parseToAst(expr));
| ^~~~~~~~~~
expression.cc:29:1: note: ‘std::unique_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?
28 | #include "exprnodes.h"
+++ |+#include <memory>
29 | #include "unitconversion.h"
expression.cc:141:28: error: expected primary-expression before ‘>’ token
141 | std::unique_ptr<AstNode> astTree(parseToAst(expr));
| ^
expression.cc:141:30: error: ‘astTree’ was not declared in this scope; did you mean ‘tree’?
141 | std::unique_ptr<AstNode> astTree(parseToAst(expr));
| ^~~~~~~
| tree
If I follow the directed guidance of adding `#include <memory>`, then "expression.cc" compiles correctly but the same shows up in another file.
This happens whether I compile with Clang or GCC and whether I try to build from source or use the AUR package "omnetpp".
I can't see anyone with the same issue in the comments for the AUR package, and as the issue occurs when building from source I am hesitant to comment on the AUR page about this issue.
Why does this work for everyone else? What could be going wrong with my system?
Offline
I recently saw a very similar error with building openmw using gcc 12.1 .
It does appear gcc 12.1 (and other compilers) used to include stuff implicitly but now requires explicit instructions instead.
In atleast one case this occurred only with boost1.76 AND gcc 12.1 , older boost and GCC 12.1 didn't fail building, so there's more involved then just the compiler version.
I have not seen this issue mentioned when compiling with clang or with gcc 11.x .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
It seems like this actually was a bug with OMNeT++, as they committed a fix for it literally yesterday on their GitHub https://github.com/omnetpp/omnetpp/comm … c1c74475b1.
I was downloading the (as of now) out-of-date ZIP file from their website.
I couldn't find anything about implicit imports in the changelogs of GCC or Clang---perhaps I didn't look hard enough.
Thanks for the reply
Offline
Moving to AUR issues.
Offline