Friday, December 19, 2008

warning: "YY_MAIN" is not defined

gmake[4]: Entering directory
`/tmp/usr/ports/devel/kdesdk3/work/kdesdk-3.5.10/kbabel/common/libgettext'
flex -+ -opofiles.cc ./pofiles.ll
/bin/sh /usr/local/bin/libtool --silent --tag=CXX --mode=compile
c++ -DHAVE_CONFIG_H -I. -I../../.. -D_THREAD_SAFE -pthread -DQT_THREAD_SUPPORT -I/usr/local/include -I/usr/local/include -I/usr/local/include -D_GETOPT_H -D_THREAD_SAFE -Wno-long-long -Wundef -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -O2 -fno-strict-aliasing -pipe -march=nocona -fconserve-space -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 -MT
pofiles.lo -MD -MP -MF .deps/pofiles.Tpo -c -o pofiles.lo pofiles.cc
pofiles.cc:451:5: warning: "YY_STACK_USED" is not defined
pofiles.cc:1519:5: warning: "YY_MAIN" is not defined
In file included from pofiles.cc:250:
/usr/local/include/FlexLexer.h:130: error: expected unqualified-id before
numeric constant
pofiles.cc: In member function 'virtual int GettextBaseFlexLexer::yylex()':
pofiles.cc:576: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc:732: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc:755: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc: In
constructor 'GettextBaseFlexLexer::GettextBaseFlexLexer(std::istream*,
std::ostream*)':
pofiles.cc:872: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc: In destructor 'virtual
GettextBaseFlexLexer::~GettextBaseFlexLexer()':
pofiles.cc:884: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc: In member function 'virtual void
GettextBaseFlexLexer::switch_streams(std::istream*, std::ostream*)':
pofiles.cc:891: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc: In member function 'int
GettextBaseFlexLexer::yy_get_next_buffer()':
pofiles.cc:944: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc: In member function 'void GettextBaseFlexLexer::yyunput(int,
char*)':
pofiles.cc:1139: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc: In member function 'int GettextBaseFlexLexer::yyinput()':
pofiles.cc:1181: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc: In member function 'virtual void
GettextBaseFlexLexer::yyrestart(std::istream*)':
pofiles.cc:1240: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc:1243: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc: In member function 'virtual void
GettextBaseFlexLexer::yy_switch_to_buffer(yy_buffer_state*)':
pofiles.cc:1250: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc:1253: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc:1261: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc: In member function 'void
GettextBaseFlexLexer::yy_load_buffer_state()':
pofiles.cc:1275: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc: In member function 'virtual void
GettextBaseFlexLexer::yy_delete_buffer(yy_buffer_state*)':
pofiles.cc:1312: error: 'yy_current_buffer' was not declared in this scope
pofiles.cc: In member function 'void
GettextBaseFlexLexer::yy_flush_buffer(yy_buffer_state*)':
pofiles.cc:1354: error: 'yy_current_buffer' was not declared in this scope
gmake[4]: *** [pofiles.lo] Error 1
gmake[4]: Leaving directory
`/tmp/usr/ports/devel/kdesdk3/work/kdesdk-3.5.10/kbabel/common/libgettext'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory
`/tmp/usr/ports/devel/kdesdk3/work/kdesdk-3.5.10/kbabel/common'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory
`/tmp/usr/ports/devel/kdesdk3/work/kdesdk-3.5.10/kbabel'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/tmp/usr/ports/devel/kdesdk3/work/kdesdk-3.5.10'
gmake: *** [all] Error 2
*** Error code 2

from links the answer from Jason Hale

Solution:

This is a known problem with flex and kdesdk. See the following thread on the kde-freebsd mailing list: http://mail.kde.org/pipermail/kde-fr...er/003894.html
You can try to apply the following patch to the textproc/flex port: http://mail.kde.org/pipermail/kde-fr...ttachment.diff

# cd /usr/port/textproc/flex
#patch < /path/to/patch #pkg_delete -fx flex #make install clean

Alternatively, just build KDE without kdesdk.
Reply With Quote

No comments: