[Pkg-octave-devel] Compiling octave-forge 2006.03.17 with Octave
2.1.73 and g++ 4.1
Rafael Laboissiere
rafael at debian.org
Sun Apr 2 12:45:53 UTC 2006
[First of all, sorry for the cross-posting. I wish that the Octave Forge
developers and the Debian Octave Group to be aware of the issue discussed
below, hence the Cc:s. Please, respect the M-F-T header and keep this
discussion in octave-maintainers.]
I am not sure I should have reported this to octave-bug. Anyway, in
trying to build the Debian package for octave-forge 2006.03.17 with
Octave 2.1.73 and g++ 4.1.0, I stumbled on several error messages like
this:
====================================================================
[...]
Processing main/sparse/...
make[3]: Entering directory `/root/octave-forge/octave-forge-2006.03.17/main/sparse'
mkoctfile -Doctave_idx_type=int -DHAVE_OCTAVE_21 -v -c sparse_ops.cc -ISuperLU/SRC/ -ISuperLU/CBLAS -DNDEBUG -DHAVE_ND_ARRAYS -DTYPEID_HAS_CLASS -DCLASS_HAS_LOAD_SAVE -DHAVE_OCTAVE_CONCAT -DHAVE_OCTAVE_UPLUS -o sparse_ops.o
/usr/bin/g++ -c -fPIC -I/usr/include/octave-2.1.73 -I/usr/include/octave-2.1.73/octave -mieee-fp -O2 -ISuperLU/SRC/ -ISuperLU/CBLAS -Doctave_idx_type=int -DHAVE_OCTAVE_21 -DNDEBUG -DHAVE_ND_ARRAYS -DTYPEID_HAS_CLASS -DCLASS_HAS_LOAD_SAVE -DHAVE_OCTAVE_CONCAT -DHAVE_OCTAVE_UPLUS sparse_ops.cc -o sparse_ops.o
[...]
/usr/include/octave-2.1.73/octave/ArrayN.h: In constructor 'ArrayN<T>::ArrayN(const dim_vector&, const T&) [with T = bool]':
/usr/include/octave-2.1.73/octave/boolNDArray.h:49: instantiated from here
/usr/include/octave-2.1.73/octave/ArrayN.h:66: error: no matching function for call to 'fill(const bool&)'
/usr/lib/gcc/i486-linux-gnu/4.1.0/../../../../include/c++/4.1.0/bits/stl_algobase.h:573: note: candidates are: void std::fill(unsigned char*, unsigned char*, const unsigned char&)
/usr/lib/gcc/i486-linux-gnu/4.1.0/../../../../include/c++/4.1.0/bits/stl_algobase.h:581: note: void std::fill(signed char*, signed char*, const signed char&)
/usr/lib/gcc/i486-linux-gnu/4.1.0/../../../../include/c++/4.1.0/bits/stl_algobase.h:589: note: void std::fill(char*, char*, const char&)
[...]
====================================================================
Compilation succeeded with the following patch to two Octave headers
files:
====================================================================
--- ArrayN.h-orig 2005-05-02 13:16:12.000000000 +0200
+++ ArrayN.h 2006-04-02 14:26:35.350510480 +0200
@@ -63,7 +63,7 @@
ArrayN (const dim_vector& dv) : Array<T> (dv) { }
ArrayN (const dim_vector& dv, const T& val)
- : Array<T> (dv) { fill (val); }
+ : Array<T> (dv) { Array<T>::fill (val); }
template <class U>
explicit ArrayN (const Array2<U>& a) : Array<T> (a, a.dims ()) { }
--- DiagArray2.h-orig 2005-05-02 13:16:16.000000000 +0200
+++ DiagArray2.h 2006-04-02 14:25:04.380340048 +0200
@@ -125,7 +125,7 @@
{
this->dimensions = dim_vector (r, c);
- fill (val);
+ Array<T>::fill (val);
}
DiagArray2 (const Array<T>& a) : Array<T> (a)
====================================================================
Are the patches above correct? Would they be applied to CVS?
--
Rafael
More information about the Pkg-octave-devel
mailing list