Add a New Comment (Rich Markup)

Comment Type & Canned Response: None None > Multiple Canned Responses Fixed in development Crash with no stack trace Already fixed in newer version Fixed in stable Bad description Bad description and crash Bad stack trace Obsolete version Duplicate and not fixed Duplicate and needs more info Duplicate and fixed Need info and old

( Jump to the original submission )

I changed the example in kron.cc to a column vector as well (http://hg.savannah.gnu.org/hgweb/octave/rev/718aaf1e84f7).

Rik, I saw you transposing the 'dim_vector's. This either 1) doesn't change the meaning or 2) makes it correct (as jwe said, the old constructor did a column "dimensions" vector), but note that I merely followed the example of cset 1f4455ff2329 -- in other words, my fix was "by analogy". Right now, kron.cc still has

Array<octave_idx_type> res_perm (dim_vector (1, na * nb));

so you might want to change that, too.

Yeah, I saw that too. It didn't seem to make a difference, i.e., 'make check' passed. But I agree it's probably a better idea to keep everything exactly the same. I'll swap them around.

I haven't looked closely, so maybe it doesn't matter, but the changeset http://hg.savannah.gnu.org/hgweb/octave/rev/d47e50953abc replaces the Array<> (n) constructor with Array<> (dim_vector (1, n)), but the deprecated code that was removed had Array<> (n) : dimensions (n, 1) so it seems to me that the orientation has been switched.

You found the problem. It is the alternate routines used when qrupdate isn't available that have the issue. I just added '--without-qrupdate' and I now get the same error.

I modified your commit message to reference the functions within each file that were changed and what was done to them, and then checked it in here (http://hg.savannah.gnu.org/hgweb/octave/rev/d47e50953abc).

Thanks for discovering and solving this bug. Closing report.

By the way, here's how I configure Octave. Maybe the liboctave/numeric/*QR.cc are built only without 'qrupdate'?

../configure \ --disable-docs \ --without-qrupdate \ --without-glpk \ --disable-java \ --disable-gui \ --disable-jit \ --enable-silent-rules \ --enable-strict-warnings

No, not for me. I have badly worded my initial report. What doesn't work is not including Array.h per se, but attempts to construct an Array<octave_idx_type> like these (where 'n' has type 'octave_idx_type'):

Array<octave_idx_type> p (n);

Changing these to

Array<octave_idx_type> p (dim_vector (1, n));

in the four remaining places (liboctave/numeric/{CmpplxQR,dbleQR,fCmplxQR,floatQR}.cc) analogously to the fix in libinterp/corefcn/kron.cc of cset 1f4455ff2329 makes everything build again.

Here's an example error message from G++. (The first report was with Clang simply because I wanted the colorful error message highlighting.)

../../liboctave/numeric/CmplxQR.cc: In function 'ComplexMatrix shift_cols(const ComplexMatrix&, octave_idx_type, octave_idx_type)': ../../liboctave/numeric/CmplxQR.cc:552:30: error: no matching function for call to 'Array<int>::Array(octave_idx_type&)' Array<octave_idx_type> p (n); ^ ../../liboctave/numeric/CmplxQR.cc:552:30: note: candidates are: In file included from ../../liboctave/array/MArray.h:28:0, from ../../liboctave/array/CMatrix.h:26, from ../../liboctave/numeric/CmplxQR.h:29, from ../../liboctave/numeric/CmplxQR.cc:29: ../../liboctave/array/Array.h:212:3: note: Array<T>::Array(const Array<T>&) [with T = int] Array (const Array<T>& a) ^ ../../liboctave/array/Array.h:212:3: note: no known conversion for argument 1 from 'octave_idx_type {aka int}' to 'const Array<int>&' ../../liboctave/array/Array.h:205:3: note: template<class U> Array<T>::Array(const Array<U>&) Array (const Array<U>& a) ^ ../../liboctave/array/Array.h:205:3: note: template argument deduction/substitution failed: ../../liboctave/numeric/CmplxQR.cc:552:30: note: mismatched types 'const Array<T>' and 'octave_idx_type {aka int}' Array<octave_idx_type> p (n); ^ In file included from ../../liboctave/array/MArray.h:28:0, from ../../liboctave/array/CMatrix.h:26, from ../../liboctave/numeric/CmplxQR.h:29, from ../../liboctave/numeric/CmplxQR.cc:29: ../../liboctave/array/Array.h:201:3: note: Array<T>::Array(const Array<T>&, const dim_vector&) [with T = int] Array (const Array<T>& a, const dim_vector& dv); ^ ../../liboctave/array/Array.h:201:3: note: candidate expects 2 arguments, 1 provided ../../liboctave/array/Array.h:191:12: note: Array<T>::Array(const dim_vector&, const T&) [with T = int] explicit Array (const dim_vector& dv, const T& val) ^ ../../liboctave/array/Array.h:191:12: note: candidate expects 2 arguments, 1 provided ../../liboctave/array/Array.h:182:12: note: Array<T>::Array(const dim_vector&) [with T = int] explicit Array (const dim_vector& dv) ^ ../../liboctave/array/Array.h:182:12: note: no known conversion for argument 1 from 'octave_idx_type {aka int}' to 'const dim_vector&' ../../liboctave/array/Array.h:174:3: note: Array<T>::Array() [with T = int] Array (void) ^ ../../liboctave/array/Array.h:174:3: note: candidate expects 0 arguments, 1 provided ../../liboctave/array/Array.h:166:3: note: Array<T>::Array(T*, octave_idx_type, octave_idx_type*, void*) [with T = int; octave_idx_type = int] Array (T *sdata, octave_idx_type slen, octave_idx_type *adims, void *arep) ^ ../../liboctave/array/Array.h:166:3: note: candidate expects 4 arguments, 1 provided ../../liboctave/array/Array.h:143:3: note: Array<T>::Array(const Array<T>&, const dim_vector&, octave_idx_type, octave_idx_type) [with T = int; octave_idx_type = int] Array (const Array<T>& a, const dim_vector& dv, ^ ../../liboctave/array/Array.h:143:3: note: candidate expects 4 arguments, 1 provided

A patch that fixes it for me is attached.

I didn't know about 'make maintainer-clean' and have previously used a simple 'make clean'. Thanks for the information.

(file #32495)

The cset 1f4455ff2329 fixed the building of the default branch. You might want to start over with

make maintainer-clean ./bootstrap ./configure --ANY_OPTIONS_YOU_USE make

This might also be particular to Clang. Most of the developers are using gcc.

After the following commit,

changeset: 19326:5b263e517c95 user: CarnĂ« Draug <carandraug@octave.org> date: Mon Nov 10 12:37:04 2014 +0000 summary: Remove liboctave methods and classes deprecated for longer than 3 years.

source files including Array.h fail to be compiled. Here's an example output with Clang.

../../liboctave/numeric/CmplxQR.cc:552:26: error: no matching constructor for initialization of 'Array<octave_idx_type>' Array<octave_idx_type> p (n); ^ ~ ../../liboctave/array/Array.h:182:12: note: candidate constructor not viable: no known conversion from 'octave_idx_type' (aka 'int') to 'const dim_vector' for 1st argument explicit Array (const dim_vector& dv) ^ ../../liboctave/array/Array.h:212:3: note: candidate constructor not viable: no known conversion from 'octave_idx_type' (aka 'int') to 'const Array<int>' for 1st argument Array (const Array<T>& a) ^ ../../liboctave/array/Array.h:205:3: note: candidate template ignored: could not match 'Array<type-parameter-0-0>' against 'int' Array (const Array<U>& a) ^ ../../liboctave/array/Array.h:143:3: note: candidate constructor not viable: requires 4 arguments, but 1 was provided Array (const Array<T>& a, const dim_vector& dv, ^ ../../liboctave/array/Array.h:166:3: note: candidate constructor not viable: requires 4 arguments, but 1 was provided Array (T *sdata, octave_idx_type slen, octave_idx_type *adims, void *arep) ^ ../../liboctave/array/Array.h:174:3: note: candidate constructor not viable: requires 0 arguments, but 1 was provided Array (void) ^ ../../liboctave/array/Array.h:191:12: note: candidate constructor not viable: requires 2 arguments, but 1 was provided explicit Array (const dim_vector& dv, const T& val) ^ ../../liboctave/array/Array.h:201:3: note: candidate constructor not viable: requires 2 arguments, but 1 was provided Array (const Array<T>& a, const dim_vector& dv); ^

Resurrecting the two Array ctors marked GCC_ATTR_DEPRECATED fixes it (haven't checked which).

The revision is 19334:1213af866a89, plus my patches on top.

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files: Comment:

Depends on the following items: None found

Items that depend on this one: None found

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only project members can vote.

Please enter the title of George Orwell's famous dystopian book (it's a date):

Follow 4 latest changes.

Copyright © 2022 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code

Powered by Savane 3.9