Major bug in qmake parser

Denis V Seleznyov denger at berebel.com
Wed Feb 7 12:47:57 UTC 2007


Andreas Pakulat wrote:

>> It'll have to wait until KDevelop 3.4.1. Provide me with a patch and I'll
>> email it to kde-packagers so they can add it to their packages.
> 
> Ok, actually thats a far better solution :) I shouldn't write such stuff
> so late in the night when I'm already half asleep :P
> 
> Patch attached, it also includes a small change to the lexer to fix
> parsing of VARIABLE+= foobar as this happened between the commits of the
> bugfix.
> 
> Andreas, who's sorry for the inconvience
> 

Unfortunately, kdevelop-3.4.0 does not compiles for me with given patch.

Configure options:
./configure --prefix=/usr \
--host=i686-pc-linux-gnu \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--datadir=/usr/share \
--sysconfdir=/etc \
--localstatedir=/var/lib \
--with-kdelibsdoxy-dir=/usr/kde/3.5/share/doc/HTML/en/kdelibs-apidocs \
--enable-java \
--enable-python \
--disable-ruby \
--disable-ada \
--enable-fortran \
--disable-haskell \
--disable-pascal \
--enable-perl \
--enable-php \
--enable-sql \
--enable-antproject \
--enable-cvs \
--disable-clearcase \
--disable-perforce \
--enable-subversion \
--with-db-includedir=//usr/include/db4.2 \
--with-db-lib=db-4.2 \
--with-x \
--enable-mitshm \
--without-xinerama \
--with-qt-dir=/usr/qt/3 \
--enable-mt \
--with-qt-libraries=/usr/qt/3/lib \
--disable-dependency-tracking \
--enable-debug=full \
--with-debug \
--with-arts \
--with-extra-includes=/usr/kde/3.5/include \
--with-extra-libs=/usr/kde/3.5/lib \
--build=i686-pc-linux-gnu

make[5]: Entering directory 
`/home/denger/tmp/kdevelop-3.4.0/buildtools/lib/parsers/qmake'
/bin/sh ../../../../libtool --silent --tag=CXX --mode=compile 
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../lib/interfaces -I../../../../lib/interfaces/extensions -I../../../../lib/util -I../../../../lib/widgets/propeditor -I/usr/kde/3.5/include -I/usr/qt/3/include -I.  -I/usr/kde/3.5/include  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -g3 -fno-inline -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o 
qmakeast.lo qmakeast.cpp
/bin/sh ../../../../libtool --silent --tag=CXX --mode=compile 
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../lib/interfaces -I../../../../lib/interfaces/extensions -I../../../../lib/util -I../../../../lib/widgets/propeditor -I/usr/kde/3.5/include -I/usr/qt/3/include -I.  -I/usr/kde/3.5/include  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -g3 -fno-inline -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o 
qmakedriver.lo qmakedriver.cpp
/bin/sh ../../../../libtool --silent --tag=CXX --mode=compile 
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../lib/interfaces -I../../../../lib/interfaces/extensions -I../../../../lib/util -I../../../../lib/widgets/propeditor -I/usr/kde/3.5/include -I/usr/qt/3/include -I.  -I/usr/kde/3.5/include  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -g3 -fno-inline -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o 
qmake_yacc.lo qmake_yacc.cpp
qmake_yacc.cpp:47:6: warning: "YYENABLE_NLS" is not defined
/bin/sh ../../../../libtool --silent --tag=CXX --mode=compile 
i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../lib/interfaces -I../../../../lib/interfaces/extensions -I../../../../lib/util -I../../../../lib/widgets/propeditor -I/usr/kde/3.5/include -I/usr/qt/3/include -I.  -I/usr/kde/3.5/include  -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -g3 -fno-inline -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o 
qmakeastvisitor.lo qmakeastvisitor.cpp
qmakeastvisitor.cpp: In member function 'virtual void 
QMake::ASTVisitor::processProject(QMake::ProjectAST*)':
qmakeastvisitor.cpp:38: warning: enumeration value 'OrOperatorAST' not handled 
in switch
/bin/sh ../../../../libtool --silent --tag=CXX --mode=link 
i686-pc-linux-gnu-g++  -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -g3 -fno-inline -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION    -o 
libkdevqmakeparser.la -rpath /usr/lib -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined -L/usr/kde/3.5/lib -L/usr/qt/3/lib -L/usr/lib    -L/usr/kde/3.5/lib -lkio 
qmakeast.lo qmakedriver.lo qmake_yacc.lo qmakeastvisitor.lo
.libs/qmakedriver.o: In function `QMake::Driver::parseString(char const*, 
QMake::ProjectAST**, int)':
/home/denger/tmp/kdevelop-3.4.0/buildtools/lib/parsers/qmake/qmakedriver.cpp:75: 
undefined reference to `QMake::Lexer::Lexer(std::basic_istream<char, 
std::char_traits<char> >*, std::basic_ostream<char, std::char_traits<char> 
>*)'
.libs/qmakedriver.o: In function `QMake::Driver::parseFile(char const*, 
QMake::ProjectAST**, int)':
/home/denger/tmp/kdevelop-3.4.0/buildtools/lib/parsers/qmake/qmakedriver.cpp:44: 
undefined reference to `QMake::Lexer::Lexer(std::basic_istream<char, 
std::char_traits<char> >*, std::basic_ostream<char, std::char_traits<char> 
>*)'
.libs/qmakedriver.o: In function `~Lexer':
/home/denger/tmp/kdevelop-3.4.0/buildtools/lib/parsers/qmake/qmake_lex.h:33: 
undefined reference to `vtable for QMake::Lexer'
/home/denger/tmp/kdevelop-3.4.0/buildtools/lib/parsers/qmake/qmake_lex.h:33: 
undefined reference to `yyFlexLexer::~yyFlexLexer()'
.libs/qmake_yacc.o: In function `QMake::Parser::parse()':
/home/denger/tmp/kdevelop-3.4.0/buildtools/lib/parsers/qmake/qmake_yacc.cpp:304: 
undefined reference to `QMakelex(QMake::Result*, QMake::Lexer*)'
collect2: ld returned 1 exit status
make[5]: *** [libkdevqmakeparser.la] Error 1
make[5]: Leaving directory 
`/home/denger/tmp/kdevelop-3.4.0/buildtools/lib/parsers/qmake'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory 
`/home/denger/tmp/kdevelop-3.4.0/buildtools/lib/parsers'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/denger/tmp/kdevelop-3.4.0/buildtools/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/denger/tmp/kdevelop-3.4.0/buildtools'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/denger/tmp/kdevelop-3.4.0'
make: *** [all] Error 2

However, ./configure without any options and make works fine.

denger at bachus ~ $ gcc --version
gcc (GCC) 4.1.1 (Gentoo 4.1.1-r3)

denger at bachus ~ $ qmake --version
QMake version: 2.00a
Using Qt version 4.1.4 in /usr/lib/qt4

denger at bachus ~ $ yacc --version
bison (GNU Bison) 2.2







More information about the KDevelop-devel mailing list