Menu

installing katephpbrowser-0.1b/ syntax errors

2007-02-15
2013-04-17
  • Christian Weiske

    Hello,

    I'm trying to install katephpbrowser on a Gentoo box with kde 3.5.5 and antlr 2.77. Configure runs fine without any errors, but when doing "make" I get some:

    Making all in parser
    make[3]: Entering directory `/home/cweiske/compilethings/katephpbrowser-0.1beta/src/parser'
    Makefile:690: warning: overriding commands for target `libphpparser_la.all_cpp.cpp'
    Makefile:678: warning: ignoring old commands for target `libphpparser_la.all_cpp.cpp'
    antlr ./lexer.g
    Antlr parser generator   Version 1.33MR33   1989-2001
    ./lexer.g, line 22: syntax error at "{" missing { QuotedTerm PassAction ! \< \> : }
    ./lexer.g, line 23: syntax error at "namespace" missing { QuotedTerm PassAction ! \< \> : }
    ./lexer.g, line 23: syntax error at "antlr" missing { QuotedTerm PassAction ! \< \> : }
    ./lexer.g, line 23: syntax error at ";" missing Eof
    ./lexer.g, line 34: lexical error: invalid token (text was ''')
    ./lexer.g, line 34: lexical error: invalid token (text was ''')
    ./lexer.g, line 34: lexical error: invalid token (text was ''')
    ./lexer.g, line 34: lexical error: invalid token (text was ''')
    ...
    more of this.

    What can I do to fix them?

     
    • Thiago Silva

      Thiago Silva - 2007-02-18

      Well...this is an antlr error...for now, maybe you could try another version of antlr (like 2.7.6, wich was the one I used to develop the project).

      Thanks for reporting this,
      Thiago Silva

       
      • Christian Weiske

        I finally found the problem:
        On gentoo, dev-java/antlr by default does not install the antlr executable. /usr/bin/antlr is installed by some weird dev-util/pccts in version 1.3.3.
        Unless you enable the "script" use flag for dev-java/antlr, calling antlr will always execute the old antlr version.

         
    • Patrick Allaert

      Patrick Allaert - 2007-03-02

      Also under gentoo with:
      KDE: 3.5.6
      antlr: 2.7.7
      gcc: 4.1.1

      configured with:
      ./configure --prefix=/usr/kde/3.5/ --enable-final

      [...]
      /usr/qt/3/bin/moc ./plugin_katephpbrowser.h -o plugin_katephpbrowser.moc
      /usr/qt/3/bin/moc ./browserloader.h -o browserloader.moc
      /usr/qt/3/bin/moc ./schemaconfigurationdlg.h -o schemaconfigurationdlg.moc
      /usr/qt/3/bin/moc ./browsertab.h -o browsertab.moc
      /usr/qt/3/bin/moc ./browserlistview.h -o browserlistview.moc
      creating katephpbrowserplugin_la.all_cpp.cpp ...
      if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../src/nodeclasses -I../src/parser -Iparser -I/usr/kde/3.5/include -I/usr/qt/3/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -fexceptions -MT katephpbrowserplugin_la.all_cpp.lo -MD -MP -MF ".deps/katephpbrowserplugin_la.all_cpp.Tpo" -c -o katephpbrowserplugin_la.all_cpp.lo katephpbrowserplugin_la.all_cpp.cpp; \
              then mv -f ".deps/katephpbrowserplugin_la.all_cpp.Tpo" ".deps/katephpbrowserplugin_la.all_cpp.Plo"; else rm -f ".deps/katephpbrowserplugin_la.all_cpp.Tpo"; exit 1; fi
      /usr/kde/3.5/include/ktexteditor/cursorinterface.h:34: warning: 'class KTextEditor::Cursor' has virtual functions but non-virtual destructor
      /usr/kde/3.5/include/keditlistbox.h:60: warning: 'class KEditListBox::CustomEditor' has virtual functions but non-virtual destructor
      /bin/sh ../libtool --silent --tag=CXX --mode=link g++  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -fexceptions   -o katephpbrowserplugin.la -rpath /usr/kde/3.5/lib/kde3 -module -avoid-version -module -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined -R /usr/kde/3.5/lib -R /usr/qt/3/lib -R /usr/lib  -L/usr/lib -L/usr/qt/3/lib -L/usr/kde/3.5/lib  katephpbrowserplugin_la.all_cpp.lo  ../src/parser/libphpparser.la ../src/nodeclasses/libnodes.la -lantlr -lkateinterfaces
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o): In function `PHPBrowserParser::PHPBrowserParser()':
      libphpparser_la.all_cpp.cpp:(.text+0x0): multiple definition of `PHPBrowserParser::PHPBrowserParser()'
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o):libphpparser_la.all_cpp.cpp:(.text+0x0): first defined here
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o): In function `PHPBrowserParser::PHPBrowserParser()':
      libphpparser_la.all_cpp.cpp:(.text+0x10): multiple definition of `PHPBrowserParser::PHPBrowserParser()'
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o):libphpparser_la.all_cpp.cpp:(.text+0x10): first defined here
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o): In function `PHPBrowserParser::~PHPBrowserParser()':
      libphpparser_la.all_cpp.cpp:(.text+0x20): multiple definition of `PHPBrowserParser::~PHPBrowserParser()'
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o):libphpparser_la.all_cpp.cpp:(.text+0x20): first defined here
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o): In function `PHPBrowserParser::~PHPBrowserParser()':
      libphpparser_la.all_cpp.cpp:(.text+0x30): multiple definition of `PHPBrowserParser::~PHPBrowserParser()'
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o):libphpparser_la.all_cpp.cpp:(.text+0x30): first defined here
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o): In function `PHPAST::typeName() const':
      libphpparser_la.all_cpp.cpp:(.text+0x40): multiple definition of `PHPAST::typeName() const'
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o):libphpparser_la.all_cpp.cpp:(.text+0x40): first defined here
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o): In function `PHPAST::setLine(int)':
      libphpparser_la.all_cpp.cpp:(.text+0x60): multiple definition of `PHPAST::setLine(int)'
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o):libphpparser_la.all_cpp.cpp:(.text+0x60): first defined here
      ../src/parser/.libs/libphpparser.a(libphpparser_la.all_cpp.o): In function `PHPAST::getLine()':
      [...]

       
    • Christian Weiske

      I get the same error with antlr 2.7.3 and 2.7.5-rc3

       
    • Christian Weiske

      I also get the error with antlr 2.7.6

       
    • Thiago Silva

      Thiago Silva - 2007-03-08

      That's messed up!
      I have tested here in slackware (GCC 3.x + antlr 2.7.7) and debian (GCC 4.1.2 + antlr 2.7.6). All compilations successfull. Unfortunately, I don't have a machine running Gentoo.

      From what I can see from the output, I'm not familiar with the ".all_cpp" things (such as libphpparser_la.all_cpp.cpp and katephpbrowserplugin_la.all_cpp.lo). I never saw those and I don't know why they are part of the build. However, seems to me that some library/objects are been linked twice, therefore the linker complains about duplicates:

      libphpparser.a(libphpparser_la.all_cpp.o): libphpparser_la.all_cpp.cpp:(.text+0x0): multiple definition of `PHPBrowserParser::PHPBrowserParser()'

      libphpparser.a(libphpparser_la.all_cpp.o):libphpparser_la.all_cpp.cpp:(.text+0x0): first defined here libphpparser.a(libphpparser_la.all_cpp.o)

      Sorry I couldn't help more for now.
      Thiago Silva

       

Log in to post a comment.

MongoDB Logo MongoDB