[Pkg-lyx-devel] Bug#265533: lyx: FTBFS with gcc-3.4: `out_of_range_bit' undeclared (first use this function)
Andreas Jochens
Andreas Jochens <aj@andaco.de>, 265533@bugs.debian.org
Fri, 13 Aug 2004 17:26:42 +0200
Package: lyx
Severity: normal
Tags: patch
When building 'lyx' with gcc-3.4 I get the following error:
from ../../../src/mathed/formulamacro.C:20:
../../../boost/boost/config/compiler/gcc.hpp:57:7: warning: #warning "Unknown compiler version - please run the configure tests and report the results"
In file included from ../../../boost/boost/format.hpp:50,
from ../../../src/mathed/../BoostFormat.h:9,
from ../../../src/mathed/formulamacro.C:43:
../../../boost/boost/format/format_implementation.hpp: In member function `boost::basic_format<Ch, Tr>& boost::basic_format<charT, Traits>::clear_bind(int)':
../../../boost/boost/format/format_implementation.hpp:154: error: `out_of_range_bit' undeclared (first use this function)
../../../boost/boost/format/format_implementation.hpp:154: error: (Each undeclared identifier is reported only once for each function it appears in.)
In file included from ../../../src/mathed/formulamacro.C:43:
../../../src/mathed/../BoostFormat.h: At global scope:
../../../src/mathed/../BoostFormat.h:18: error: expected unqualified-id before ';' token
make[4]: *** [formulamacro.lo] Error 1
make[4]: Leaving directory `/lyx-1.3.4/build-tree-qt/src/mathed'
With the attached patch 'lyx' can be compiled using gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/lyx-1.3.4/boost/boost/format/format_implementation.hpp ./boost/boost/format/format_implementation.hpp
--- ../tmp-orig/lyx-1.3.4/boost/boost/format/format_implementation.hpp 2002-11-21 19:33:01.000000000 +0100
+++ ./boost/boost/format/format_implementation.hpp 2004-08-13 15:36:14.000000000 +0200
@@ -151,7 +151,7 @@
{
if(argN<1 || argN > num_args_ || bound_.size()==0 || !bound_[argN-1] )
{
- if( exceptions() & out_of_range_bit )
+ if( exceptions() & io::out_of_range_bit )
boost::throw_exception(io::out_of_range()); // arg not in range.
else return *this;
}
diff -urN ../tmp-orig/lyx-1.3.4/src/BoostFormat.h ./src/BoostFormat.h
--- ../tmp-orig/lyx-1.3.4/src/BoostFormat.h 2002-11-25 20:44:44.000000000 +0100
+++ ./src/BoostFormat.h 2004-08-13 14:07:44.000000000 +0200
@@ -14,8 +14,8 @@
namespace boost
{
-extern
-template basic_format<char>;
+//extern
+//template basic_format<char>;
extern template
std::ostream &
diff -urN ../tmp-orig/lyx-1.3.4/src/frontends/controllers/ControlDialog.tmpl ./src/frontends/controllers/ControlDialog.tmpl
--- ../tmp-orig/lyx-1.3.4/src/frontends/controllers/ControlDialog.tmpl 2003-03-19 12:04:11.000000000 +0100
+++ ./src/frontends/controllers/ControlDialog.tmpl 2004-08-13 15:00:00.000000000 +0200
@@ -27,54 +27,54 @@
template <class Base>
void ControlDialog<Base>::show()
{
- if (isBufferDependent() && !bufferIsAvailable())
+ if (this->isBufferDependent() && !this->bufferIsAvailable())
return;
- connect();
+ this->connect();
if (!dialog_built_) {
- view().build();
+ this->view().build();
dialog_built_ = true;
}
setParams();
- if (emergency_exit_) {
+ if (this->emergency_exit_) {
hide();
return;
}
- bc().readOnly(bufferIsReadonly());
- view().show();
+ this->bc().readOnly(this->bufferIsReadonly());
+ this->view().show();
// The widgets may not be valid, so refresh the button controller
- bc().refresh();
+ this->bc().refresh();
}
template <class Base>
void ControlDialog<Base>::update()
{
- if (isBufferDependent() && !bufferIsAvailable())
+ if (this->isBufferDependent() && !this->bufferIsAvailable())
return;
setParams();
- if (emergency_exit_) {
+ if (this->emergency_exit_) {
hide();
return;
}
- bc().readOnly(bufferIsReadonly());
- view().update();
+ this->bc().readOnly(this->bufferIsReadonly());
+ this->view().update();
// The widgets may not be valid, so refresh the button controller
- bc().refresh();
+ this->bc().refresh();
}
template <class Base>
void ControlDialog<Base>::hide()
{
- emergency_exit_ = false;
+ this->emergency_exit_ = false;
clearParams();
- disconnect();
- view().hide();
+ this->disconnect();
+ this->view().hide();
}
diff -urN ../tmp-orig/lyx-1.3.4/src/frontends/qt2/Qt2Base.h ./src/frontends/qt2/Qt2Base.h
--- ../tmp-orig/lyx-1.3.4/src/frontends/qt2/Qt2Base.h 2003-02-02 01:48:38.000000000 +0100
+++ ./src/frontends/qt2/Qt2Base.h 2004-08-13 15:13:11.000000000 +0200
@@ -174,14 +174,14 @@
template <class Controller, class Base>
Controller & Qt2CB<Controller, Base>::controller()
{
- return static_cast<Controller &>(getController());
+ return static_cast<Controller &>(this->getController());
}
template <class Controller, class Base>
Controller const & Qt2CB<Controller, Base>::controller() const
{
- return static_cast<Controller const &>(getController());
+ return static_cast<Controller const &>(this->getController());
}
diff -urN ../tmp-orig/lyx-1.3.4/src/frontends/xforms/FormBase.h ./src/frontends/xforms/FormBase.h
--- ../tmp-orig/lyx-1.3.4/src/frontends/xforms/FormBase.h 2003-02-02 01:48:38.000000000 +0100
+++ ./src/frontends/xforms/FormBase.h 2004-08-13 16:00:37.550898713 +0200
@@ -188,14 +188,14 @@
template <class Controller, class Base>
Controller & FormCB<Controller, Base>::controller()
{
- return static_cast<Controller &>(getController());
+ return static_cast<Controller &>(this->getController());
}
template <class Controller, class Base>
Controller const & FormCB<Controller, Base>::controller() const
{
- return static_cast<Controller const &>(getController());
+ return static_cast<Controller const &>(this->getController());
}