I am attempting to the compile the source at this page. After resolving the dependencies, I am able to configure successfully, however make does not execute without errors. I was under the impression that a successful configure was meant to ensure a successful make, but since this does not seem to be the case, I am unsure of how to proceed.

Some of the dependencies are flex, bison, and boost. During configure I did have to specify the location of boost manually, but the other dependencies were detected automatically.

A snippet of the output from make:

player_command_tok.o: In function `main': /usr/local/src/rcssserver-15.0.1/src/player_command_tok.cpp:1: multiple definition of `main' main.o:/usr/local/src/rcssserver-15.0.1/src/main.cpp:66: first defined here coach.o: In function `~RCSSCLangLexer': /usr/local/src/rcssserver-15.0.1/src/coach_lang_tok.h:38: undefined reference to `vtable for RCSSCLangLexer' /usr/local/src/rcssserver-15.0.1/src/coach_lang_tok.h:38: undefined reference to `RCSSCLangFLexLexer::~RCSSCLangFLexLexer()' /usr/local/src/rcssserver-15.0.1/src/coach_lang_tok.h:38: undefined reference to `vtable for RCSSCLangLexer' /usr/local/src/rcssserver-15.0.1/src/coach_lang_tok.h:38: undefined reference to `RCSSCLangFLexLexer::~RCSSCLangFLexLexer()' /usr/local/src/rcssserver-15.0.1/src/coach_lang_tok.h:38: undefined reference to `vtable for RCSSCLangLexer' /usr/local/src/rcssserver-15.0.1/src/coach_lang_tok.h:38: undefined reference to `RCSSCLangFLexLexer::~RCSSCLangFLexLexer()' player.o: In function `~RCSSPComLexer': /usr/local/src/rcssserver-15.0.1/src/player_command_tok.h:33: undefined reference to `vtable for RCSSPComLexer' /usr/local/src/rcssserver-15.0.1/src/player_command_tok.h:33: undefined reference to `RCSSPComFlexLexer::~RCSSPComFlexLexer()' pcomparser.o: In function `RCSSPComLexer': /usr/local/src/rcssserver-15.0.1/src/player_command_tok.h:33: undefined reference to `RCSSPComFlexLexer::RCSSPComFlexLexer(std::basic_istream<char, std::char_traits<char> >*, std::basic_ostream<char, std::char_traits<char> >*)' /usr/local/src/rcssserver-15.0.1/src/player_command_tok.h:33: undefined reference to `vtable for RCSSPComLexer' pcomparser.o: In function `~RCSSPComLexer': /usr/local/src/rcssserver-15.0.1/src/player_command_tok.h:33: undefined reference to `vtable for RCSSPComLexer' /usr/local/src/rcssserver-15.0.1/src/player_command_tok.h:33: undefined reference to `RCSSPComFlexLexer::~RCSSPComFlexLexer()' /usr/local/src/rcssserver-15.0.1/src/player_command_tok.h:33: undefined reference to `vtable for RCSSPComLexer' /usr/local/src/rcssserver-15.0.1/src/player_command_tok.h:33: undefined reference to `RCSSPComFlexLexer::~RCSSPComFlexLexer()' /usr/local/src/rcssserver-15.0.1/src/.libs/librcssclangparser.so: undefined reference to `RCSSCLangFLexLexer::RCSSCLangFLexLexer(std::basic_istream<char, std::char_traits<char> >*, std::basic_ostream<char, std::char_traits<char> >*)' collect2: ld returned 1 exit status make[3]: *** [rcssserver] Error 1 make[3]: Leaving directory `/usr/local/src/rcssserver-15.0.1/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/usr/local/src/rcssserver-15.0.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/rcssserver-15.0.1' make: *** [all] Error 2

It seems as if the problem is related to flex, and that the compiler is not finding the flex header files (I believe?). If this assumption is correct, how do I approach this problem?
Otherwise, any other advice would also be helpful--is it typical for a configure to work but the corresponding make fail? What is the default dir for boost's lib files? Can there be issues during make due to running a 64bit os?

Dani AI

Generated

— configure succeeding but make failing with duplicate main plus a bunch of “undefined reference to …FlexLexer / vtable” messages strongly points to two build problems that are easy to verify and fix: either some Flex-generated scanner objects are not being built/linked (so virtual methods/destructors live nowhere), or a scanner object that contains a test main() is being linked into the final binary (causing the duplicate main). Both produce linker errors rather than compiler complaints.

Quick checks to run in the project tree:

grep -R -n "int main" src
grep -R -n "FlexLexer" src
make V=1     # or make -n to print the compile/link commands

What to look for and how to fix it

  • If you find main inside a generated *_tok.* file, remove/guard that test main in the .l source (or fix the Makefile so the test scanner is not linked). Editing generated files is a quick test, but fix the .l or the automake sources so it stays fixed after a clean.
  • If the linker command does not include the object produced from the scanner .l (or you see unresolved RCSS*FlexLexer symbols), ensure the generated scanner .cpp/.cc is actually being created and compiled. Re-run the autoreconf/configure step with a working flex/bison in PATH, or regenerate with flex++/flex -+ as the project expects.
  • Missing yyFlexLexer symbols are commonly resolved by linking the Flex runtime (libfl). Add -lfl to LIBS/LDFLAGS if the build system isn’t already doing so, and ensure you have the Flex development files installed.

A couple of extra notes

  • Undefined vtable errors mean a class declared with virtual methods has no out-of-line definitions compiled into any object — this usually traces back to a generated scanner file not being built or a name mismatch between declarations and generated symbols, so check class names in the generated headers and scanner sources.
  • 64-bit Ubuntu typically isn’t the root cause here; just confirm any manually-specified Boost path points to the same-architecture libs.

As suggested, collect and include the full linker command, config.log, configure output, and the presence/contents of the generated *_tok.* files when you open an issue on the project tracker — that information lets maintainers pinpoint whether the lex/bison step failed or a makefile needs a tweak.

I have seen situations like this where I had to either tweak the configuration (options to the configure script) so it knew where the headers and related libraries were, and in rare cases I've had to modify the generated Makefile. In your case, this is a bit weird since the errors are for missing vtables, and those are generated by the compiler for classes with virtual methods. IE, mostly they are linker errors - not compiler errors. My suggestion is to post those errors to the user/bug reporting forum for this project on SourceForge.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.