janstarke / rexgen

API Documentation
https://github.com/janstarke/rexgen/blob/master/doc/api.md
GNU General Public License v2.0
52 stars 21 forks source link

./install.sh and got errors. #59

Closed airglow923 closed 5 years ago

airglow923 commented 5 years ago

The moment I ran ./install.sh, I got:

/home/<username>/git/rexgen/src/librexgen/state/serializablestate.cpp: In member function ‘void SerializableState::addValue(const std::shared_ptr<SerializableState>&)’:
/home/<username>/git/rexgen/src/librexgen/state/serializablestate.cpp:69:3: error: ‘assert’ was not declared in this scope
   assert(childStates.find(state->getIteratorId()) == childStates.cend());

So I added #include <cassert> to rexgen/src/librexgen/state/serializablestate.cpp

Then I ran again, and I got:

/home/<username>/git/rexgen/src/librexgen/parser/RexgenFlexLexer.cpp: In constructor ‘rexgen::RexgenFlexLexer::RexgenFlexLexer(const string&)’:
/home/<username>/git/rexgen/src/librexgen/parser/RexgenFlexLexer.cpp:33:10: error: ‘memset’ is not a member of ‘std’
     std::memset(&mbs, 0, sizeof(mbs));

So I added #include <cstring> to rexgen/src/librexgen/parser/RexgenFlexLexer.cpp

I managed to install it successfully. I just want you to know about these trivial errors.

Tchekda commented 5 years ago

Same error here

entering /root/src/rexgen/build
running >>> cmake  -DUSE_PYTHON=ON -DTEST_ENABLED=0 -DCOVERAGE_ENABLED=0 -DCMAKE_BUILD_TYPE=Release -DUSE_PYTHON=ON -DTEST_ENABLED=0 -DCOVERAGE_ENABLED=0 -DCMAKE_BUILD_TYPE=Release /root/src/rexgen/src <<<
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
creating rexgen 2.1.2
-- COMPILING OPTIMIZED VERSION: Release
-- found python 
-- Configuring done
-- Generating done
-- Build files have been written to: /root/src/rexgen/build
getconf: Variable non reconnue « NPROCESSORS_ONLN »
[  9%] Built target man
[  9%] Built target parser_target
[ 15%] Building CXX object librexgen/CMakeFiles/librexgen.dir/state/serializablestate.cpp.o
[ 15%] Building CXX object librexgen/CMakeFiles/librexgen.dir/parser/RexgenFlexLexer.cpp.o
/root/src/rexgen/src/librexgen/state/serializablestate.cpp: In member function ‘void SerializableState::addValue(const std::shared_ptr<SerializableState>&)’:
/root/src/rexgen/src/librexgen/state/serializablestate.cpp:69:3: error: ‘assert’ was not declared in this scope
   assert(childStates.find(state->getIteratorId()) == childStates.cend());
   ^~~~~~
/root/src/rexgen/src/librexgen/state/serializablestate.cpp:69:3: note: ‘assert’ is defined in header ‘<cassert>’; did you forget to ‘#include <cassert>’?
/root/src/rexgen/src/librexgen/state/serializablestate.cpp:26:1:
+#include <cassert>

/root/src/rexgen/src/librexgen/state/serializablestate.cpp:69:3:
   assert(childStates.find(state->getIteratorId()) == childStates.cend());
   ^~~~~~
make[2]: *** [librexgen/CMakeFiles/librexgen.dir/build.make:282: librexgen/CMakeFiles/librexgen.dir/state/serializablestate.cpp.o] Error 1
make[2]: *** Attente des tâches non terminées....
In file included from /root/src/rexgen/src/librexgen/regex/classregex.h:25,
                 from parser/regex_parser.y:38,
                 from /root/src/rexgen/src/librexgen/parser/RexgenFlexLexer.h:12,
                 from /root/src/rexgen/src/librexgen/parser/RexgenFlexLexer.cpp:20:
/root/src/rexgen/src/librexgen/iterator/classregexiterator.h: In member function ‘virtual void rexgen::ClassRegexIterator::setCurrentState(const std::shared_ptr<SerializableState>&)’:
/root/src/rexgen/src/librexgen/iterator/classregexiterator.h:108:12: warning: unused variable ‘c’ [-Wunused-variable]
       auto c = s->getValue(0);
            ^
In file included from /root/src/rexgen/src/librexgen/regex/classregex.h:27,
                 from parser/regex_parser.y:38,
                 from /root/src/rexgen/src/librexgen/parser/RexgenFlexLexer.h:12,
                 from /root/src/rexgen/src/librexgen/parser/RexgenFlexLexer.cpp:20:
/root/src/rexgen/src/librexgen/iterator/rangeiterator.h: In member function ‘void rexgen::RangeIterator<__MIN, __MAX>::value(SimpleString*) const’:
/root/src/rexgen/src/librexgen/iterator/rangeiterator.h:32:55: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
       dst->push_back(static_cast<const byte_t>(current));
                                                       ^
/root/src/rexgen/src/librexgen/parser/RexgenFlexLexer.cpp: In constructor ‘rexgen::RexgenFlexLexer::RexgenFlexLexer(const string&)’:
/root/src/rexgen/src/librexgen/parser/RexgenFlexLexer.cpp:33:10: error: ‘memset’ is not a member of ‘std’
     std::memset(&mbs, 0, sizeof(mbs));
          ^~~~~~
/root/src/rexgen/src/librexgen/parser/RexgenFlexLexer.cpp:33:10: note: suggested alternative: ‘set’
     std::memset(&mbs, 0, sizeof(mbs));
          ^~~~~~
          set
make[2]: *** [librexgen/CMakeFiles/librexgen.dir/build.make:321: librexgen/CMakeFiles/librexgen.dir/parser/RexgenFlexLexer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:97: librexgen/CMakeFiles/librexgen.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

While doing a ./install.sh

airglow923 commented 5 years ago

This issue has been resolved in #60