ports/128008: [patch] devel/kdesdk3: fails to build when textproc/flex is installed
Scot Hetzel
swhetzel at gmail.com
Sat Oct 11 00:40:01 UTC 2008
>Number: 128008
>Category: ports
>Synopsis: [patch] devel/kdesdk3: fails to build when textproc/flex is installed
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Oct 11 00:40:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Scot Hetzel
>Release: 8.0-CURRENT
>Organization:
>Environment:
FreeBSD hp010 8.0-CURRENT FreeBSD 8.0-CURRENT #8: Mon Aug 11 17:10:07 CDT 2008 root at hp010:/usr/obj/usr/src/sys/DV8135NR amd64
>Description:
While trying to upgrade to devel/kdesdk3 to 3.5.10, it would fail to build when the textproc/flex port is installed.
gmake[4]: Entering directory `/usr/obj/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 -pipe -march=k8 -fno-strict-aliasing -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 `/usr/obj/usr/ports/devel/kdesdk3/work/kdesdk-3.5.10/kbabel/common/libgettext'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/usr/obj/usr/ports/devel/kdesdk3/work/kdesdk-3.5.10/kbabel/common'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/obj/usr/ports/devel/kdesdk3/work/kdesdk-3.5.10/kbabel'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/obj/usr/ports/devel/kdesdk3/work/kdesdk-3.5.10'
gmake: *** [all] Error 2
*** Error code 2
Stop in /usr/ports/devel/kdesdk3.
The cause of the problem is that the configure script chooses the wrong flex (/usr/bin/flex). It should have used /usr/local/bin/flex when /usr/local/include/FlexLexer.h exists.
>How-To-Repeat:
install textproc/flex
build devel/kdesdk3
>Fix:
There are two solutions:
- unistall textproc/flex
- set LEX=/usr/local/bin/flex in CONFIGURE_ENV
The attached patch sets LEX if ${LOCALBASE}/bin/flex exists.
Patch attached with submission follows:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/kdesdk3/Makefile,v
retrieving revision 1.67
diff -u -r1.67 Makefile
--- Makefile 29 Aug 2008 11:29:44 -0000 1.67
+++ Makefile 11 Oct 2008 00:13:54 -0000
@@ -44,6 +44,10 @@
.include "${.CURDIR}/../../x11/kde3/Makefile.kde"
.include <bsd.port.pre.mk>
+.if exists(${LOCALBASE}/bin/flex)
+CONFIGURE_ENV+= LEX="${LOCALBASE}/bin/flex"
+.endif
+
pre-everything::
.if !defined(WITH_OPTIONAL_DEPENDS)
@${ECHO_MSG}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list