From maintainers-request at octave dot org Wed Apr 12 11:48:42 2006 Subject: Compiling octave-forge 2006.03.17 with Octave 2.1.73 and g++ 4.1 From: "John W. Eaton" To: Rafael Laboissiere Cc: maintainers at octave dot org, octave-dev@lists.sourceforge.net, Debian Octave Group Date: Wed, 12 Apr 2006 12:44:43 -0400 On 2-Apr-2006, Rafael Laboissiere wrote: | [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::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 | at @ -63,7 +63,7 @@ | ArrayN (const dim_vector& dv) : Array (dv) { } | | ArrayN (const dim_vector& dv, const T& val) | - : Array (dv) { fill (val); } | + : Array (dv) { Array::fill (val); } | | template | explicit ArrayN (const Array2& a) : Array (a, a.dims ()) { } | --- DiagArray2.h-orig 2005-05-02 13:16:16.000000000 +0200 | +++ DiagArray2.h 2006-04-02 14:25:04.380340048 +0200 | at @ -125,7 +125,7 @@ | { | this->dimensions = dim_vector (r, c); | | - fill (val); | + Array::fill (val); | } | | DiagArray2 (const Array& a) : Array (a) | ==================================================================== | | Are the patches above correct? Would they be applied to CVS? Yes, I applied these changes. Thanks, jwe