Menu

Compilation error in Linux

2007-09-25
2013-04-29
  • Nobody/Anonymous

    I am trying to compile jaula.1.2.0 / 1.1.0 source code in a linux 2.6.9 and getting the following error.

    My system details are as follows

    >uname -a
    Linux aaa.aaaaaaa.com 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux

    >flex --version
    flex version 2.5.4

    I am following the steps mentioned in INSTALL file. I am getting the following error while attempting make , Can some one help me out.
    Making all in jaula
    make[2]: Entering directory `/users/home55/uu/install/SRC/jaula-1.2.0/jaula'
    Making all in .
    make[3]: Entering directory `/users/home55/uu/install/SRC/jaula-1.2.0/jaula'
    /bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -Wall   -g -O2 -MT jaula_bad_data_type.lo -MD -MP -MF .deps/jaula_bad_data_type.Tpo -c -o jaula_bad_data_type.lo jaula_bad_data_type.cc
    mkdir .libs
    g++ -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT jaula_bad_data_type.lo -MD -MP -MF .deps/jaula_bad_data_type.Tpo -c jaula_bad_data_type.cc  -fPIC -DPIC -o .libs/jaula_bad_data_type.o
    g++ -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT jaula_bad_data_type.lo -MD -MP -MF .deps/jaula_bad_data_type.Tpo -c jaula_bad_data_type.cc -o jaula_bad_data_type.o >/dev/null 2>&1
    mv -f .deps/jaula_bad_data_type.Tpo .deps/jaula_bad_data_type.Plo
    /bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -Wall   -g -O2 -MT jaula_exception.lo -MD -MP -MF .deps/jaula_exception.Tpo -c -o jaula_exception.lo jaula_exception.cc
    g++ -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT jaula_exception.lo -MD -MP -MF .deps/jaula_exception.Tpo -c jaula_exception.cc  -fPIC -DPIC -o .libs/jaula_exception.o
    g++ -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT jaula_exception.lo -MD -MP -MF .deps/jaula_exception.Tpo -c jaula_exception.cc -o jaula_exception.o >/dev/null 2>&1
    mv -f .deps/jaula_exception.Tpo .deps/jaula_exception.Plo
    /bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -Wall   -g -O2 -MT jaula_lexan_error.lo -MD -MP -MF .deps/jaula_lexan_error.Tpo -c -o jaula_lexan_error.lo jaula_lexan_error.cc
    g++ -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT jaula_lexan_error.lo -MD -MP -MF .deps/jaula_lexan_error.Tpo -c jaula_lexan_error.cc  -fPIC -DPIC -o .libs/jaula_lexan_error.o
    g++ -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT jaula_lexan_error.lo -MD -MP -MF .deps/jaula_lexan_error.Tpo -c jaula_lexan_error.cc -o jaula_lexan_error.o >/dev/null 2>&1
    mv -f .deps/jaula_lexan_error.Tpo .deps/jaula_lexan_error.Plo
    /bin/sh ../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -Wall   -g -O2 -MT jaula_lexan.lo -MD -MP -MF .deps/jaula_lexan.Tpo -c -o jaula_lexan.lo jaula_lexan.cc
    g++ -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT jaula_lexan.lo -MD -MP -MF .deps/jaula_lexan.Tpo -c jaula_lexan.cc  -fPIC -DPIC -o .libs/jaula_lexan.o
    jaula_lexan.cc: In member function `virtual int JAULA::Lexan::yylex()':
    jaula_lexan.cc:663: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:663: error: (Each undeclared identifier is reported only once for each function it appears in.)
    jaula_lexan.cc:663: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc:664: error: `yyensure_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc: In constructor `jaulaFlexLexer::jaulaFlexLexer(std::istream*, std::ostream*)':
    jaula_lexan.cc:1146: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1147: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc:1148: error: `yy_buffer_stack_max' undeclared (first use this function)
    jaula_lexan.cc: In member function `virtual void jaulaFlexLexer::switch_streams(std::istream*, std::ostream*)':
    jaula_lexan.cc:1158: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1158: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: In member function `int jaulaFlexLexer::yy_get_next_buffer()':
    jaula_lexan.cc:1210: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1210: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: In member function `void jaulaFlexLexer::yyunput(int, char*)':
    jaula_lexan.cc:1398: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1398: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: In member function `int jaulaFlexLexer::yyinput()':
    jaula_lexan.cc:1442: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1442: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: In member function `virtual void jaulaFlexLexer::yyrestart(std::istream*)':
    jaula_lexan.cc:1510: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1510: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc:1511: error: `yyensure_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc: In member function `virtual void jaulaFlexLexer::yy_switch_to_buffer(yy_buffer_state*)':
    jaula_lexan.cc:1532: error: `yyensure_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1533: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1533: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: In member function `void jaulaFlexLexer::yy_load_buffer_state()':
    jaula_lexan.cc:1557: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1557: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: In member function `virtual void jaulaFlexLexer::yy_delete_buffer(yy_buffer_state*)':
    jaula_lexan.cc:1603: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1603: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: In member function `void jaulaFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)':
    jaula_lexan.cc:1632: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1632: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: In member function `void jaulaFlexLexer::yy_flush_buffer(yy_buffer_state*)':
    jaula_lexan.cc:1664: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1664: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: At global scope:
    jaula_lexan.cc:1675: error: no `void jaulaFlexLexer::yypush_buffer_state(yy_buffer_state*)' member function declared in class `jaulaFlexLexer'
    jaula_lexan.cc: In member function `void jaulaFlexLexer::yypush_buffer_state(yy_buffer_state*)':
    jaula_lexan.cc:1679: error: `yyensure_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1682: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1682: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: At global scope:
    jaula_lexan.cc:1705: error: no `void jaulaFlexLexer::yypop_buffer_state()' member function declared in class `jaulaFlexLexer'
    jaula_lexan.cc: In member function `void jaulaFlexLexer::yypop_buffer_state()':
    jaula_lexan.cc:1706: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1706: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: At global scope:
    jaula_lexan.cc:1724: error: no `void jaulaFlexLexer::yyensure_buffer_stack()' member function declared in class `jaulaFlexLexer'
    jaula_lexan.cc: In member function `void jaulaFlexLexer::yyensure_buffer_stack()':
    jaula_lexan.cc:1727: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1740: error: `yy_buffer_stack_max' undeclared (first use this function)
    jaula_lexan.cc:1741: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc: In destructor `virtual jaulaFlexLexer::~jaulaFlexLexer()':
    jaula_lexan.cc:1833: error: `yy_buffer_stack' undeclared (first use this function)
    jaula_lexan.cc:1833: error: `yy_buffer_stack_top' undeclared (first use this function)
    jaula_lexan.cc:1836: error: `yypop_buffer_state' undeclared (first use this function)
    jaula_lexan.ll:251: confused by earlier errors, bailing out
    make[3]: *** [jaula_lexan.lo] Error 1
    make[3]: Leaving directory `/users/home55/uu/install/SRC/jaula-1.2.0/jaula'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/users/home55/uu/install/SRC/jaula-1.2.0/jaula'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/users/home55/uu/install/SRC/jaula-1.2.0'
    make: *** [all] Error 2

     
    • Kombo Morongo

      Kombo Morongo - 2007-09-26

      The most recent flex release I have tried is 2.5.33 and it seems to be quite close to your release to be the reason for this problem.

      From the log provided by you, the problem seems to be that you are unable to compile against FlexLexer.h header file. The usual reason for this is that this header is not available in your system, what happens to be quite strange as this header is specifically checked during the configuration process. Please check config.log output or run ./configure again and check the result for the specific FlexLexer.h check.

      If this check has worked, the only possible explanation for this behaviour is that you may have more than one flex release installed in your system and on different directories. Notice that jaula_lexan.cc is not a source provided by the distribution but a file created by flex based on jaula_lexan.ll. If your flex execution results on a jaula_lexan.cc file that requires some symbol definitions, these definitions must be available in FlexLexer.h.

      If your flex installation was not performed on the standard system directories what you should do is to include the directory where this file is located reconfiguring the project with the following command instead of the default ./configure:

      CPPFLAGS="-I/path_to_right_FlexLexerH_location" ./configure

      and perhaps temporarily renaming the standard /usr/include/FlexLexer.h file so to be sure that the right release is used.

      Please let me know if some of this worked or give me some feedback in order to keep looking for a solution.

      Regards,

      Morongo

       
    • Nobody/Anonymous

      Hi Morongo,
      Thanks a lot for the response. I tried the ways you mentioned but no luck.

      The ./configure output are normal and doesnt have any issues. The compliation issue that I mentioned in the previous mail is still there.

      I have mentioned the steps I did and the output in the following section.

      ----------------------------------------------------
      The version of the tools I have in the linux box are

      > uname -a
      Linux kern.brocade.com 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 i686 i386 GNU/Linux

      >make -ver
      GNU Make 3.80
      Copyright (C) 2002  Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.
      There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
      PARTICULAR PURPOSE.

      >flex --version
      flex version 2.5.4

      ------------------------------
      On renaming the /usr/include/FlexLexer.h the ./configure itself fails with following error.

      configure: error: Header not found. Configuration aborted.

      Snippet from the configuration file

      checking for flex... flex
      checking lex output file root... lex.yy
      checking lex library... none needed
      checking whether yytext is a pointer... no
      checking FlexLexer.h usability... no
      checking FlexLexer.h presence... no
      checking for FlexLexer.h... no

      ---------------------------------------------
      I renamed the file back to original and tried ./configure and it was successful

      ------------------------------------------------

      Just to reconfirm that even 'make' is using the same FlexLexer.h , I renamed the /usr/include/FlexLexer.h after ./configure. I am getting the following error which makes sure that the same header file is being used for both ./configure

      g++ -DHAVE_CONFIG_H -I. -I.. -Wall -g -O2 -MT jaula_lexan.lo -MD -MP -MF .deps/jaula_lexan.Tpo -c jaula_lexan.cc  -fPIC -DPIC -o .libs/jaula_lexan.o
      jaula_lexan.cc:332:23: FlexLexer.h: No such file or directory
      jaula_lexan.cc:333: error: `jaulaFlexLexer' has not been declared
      jaula_lexan.cc: In function `int yylex()':
      jaula_lexan.cc:335: error: `LexerError' undeclared (first use this function)
      jaula_lexan.cc:335: error: (Each undeclared identifier is reported only once for each function it appears in.)
      In file included from jaula_lexan.ll:61:

      -----------------------------------------------------------

      Just to mention the version of the /usr/include/FlexLexer.h  - The following is the version of the FlexLexer.h that we have.

      // $Header: /home/daffy/u0/vern/flex/RCS/FlexLexer.h,v 1.19 96/05/25 20:43:02 vern Exp $

      // FlexLexer.h -- define interfaces for lexical analyzer classes generated
      //        by flex

      // Copyright (c) 1993 The Regents of the University of California.
      // All rights reserved.
      //
      // This code is derived from software contributed to Berkeley by
      // Kent Williams and Tom Epperly.

      -------------------------------------------------------------

      Please help me to fix this problem. I can send you some more info regarding the setup if you need.
      I even tried with a diferent version of RedHat linux (details follows), but same issue.
      > uname -a
      Linux escmrh5 2.6.18-8.el5PAE #1 SMP Fri Jan 26 14:28:43 EST 2007 i686 i686 i386 GNU/Linux

      Regards
      UU

       
    • Kombo Morongo

      Kombo Morongo - 2007-10-02

      From the last tests you have performed, there is no doubt that the only FlexLexer.h header present in your system is the one located at /usr/include and, from your first post we can conclude that this FlexLexer.h file does not include the definitions required by jaula_lexan.cc.

      As I mentioned before, jaula_lexan.cc is not a source file written directly by myself but created from jaula_lexan.ll by the execution of flex. As jaula_lexan.ll does not include any direct reference to any of the symbols your compilation cannot resolve, the only explanation for this is that flex is not working properly and its execution generates a code incompatible with its own FlexLexer.h (what seems a very strange behaviour for a so far stable tool), that your flex installation is corrupt on any way or that the flex release available in your system requires some parameter settings to work properly that are not detected by the configure process.

      As I mentioned in http://morongo.homelinux.net/jaula/jdg1-install-tarball-requirements I have succesfully compiled the project with flex 2.5.33 and, as it seems the most probably cause for this effect, my suggestion is to try to upgrade your flex installation to a newer release. Flex sources for the release I mention can be downloaded from http://flex.sourceforge.net/

      Just remember to configure flex with the following command:

      ./configure --prefix=/usr

      in order to overwrite /usr/bin/flex and /usr/include/FlexLexer.h with this new release. Please check carefully this as mixing flex releases will prevent compilation of the project.

      Please let me know if this worked or what happened in order to look for some other alternatives.

      Regards,

      Morongo

       
    • Nobody/Anonymous

      Hi Morongo,

      I am having the exact same problem as the original poster, also using flex 2.5.4 and the same FlexLexer.h file.

      -Jon

       
    • Kombo Morongo

      Kombo Morongo - 2007-11-07

      Hi Jon,

      Could you try any of the alternatives mentioned before? Please also take a look at bug 1766317 that is also related to this. Any detailed feedback on this can help to see what is happening.

      Anyway, as this problem persist, I will try to rewrite this  portion of the code for the next release.

      Regards,

      Morongo

       
    • Artur R. Czechowski

       
    • Nobody/Anonymous

      I ran into this very same problem and solved it by building and installing flex 2.5.33 from scratch.

       

Log in to post a comment.

MongoDB Logo MongoDB