help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave-forge compiles, but...


From: David Bateman
Subject: Re: octave-forge compiles, but...
Date: Mon, 14 Jun 2004 12:13:12 +0200
User-agent: Mutt/1.4.1i

According to Tom G. Smith (Smitty) <address@hidden> (on 06/09/04):
> I've gotten octave-forge to compile and install on octave 2.1.57,
> but I'm not at all sure I have anything more than compiled garbage.
> I had to make numerous source code changes, some of which were
> correcting simple typographical errors, so I know this code has never
> been successfully compiled and tested.  As previously indicated the
> make of the latest CVS of octave-forge first failed with these messages:
> 
> make[2]: Entering directory `/contrib/octave/octave-forge/main/fixed'
> Compiling fixedCNDArray.o
> g++ -c -fPIC -I/usr/local/include/octave-2.1.57
> -I/usr/local/include/octave-2.1.57/octave -I/usr/local/include -mieee-fp -g
> -O2 -DHAVE_OCTAVE_21 -DOCTAVE_FORGE -DHAVE_ND_ARRAYS -DTYPEID_HAS_CLASS
> -DCLASS_HAS_LOAD_SAVE fixedCNDArray.cc -o fixedCNDArray.o
> fixedCNDArray.cc: In member function `FixedComplexNDArray
>    FixedComplexNDArray::sumsq(int) const':
> fixedCNDArray.cc:638: operands to ?: have different types
> make[2]: *** [fixedCNDArray.o] Error 1
> make[2]: Leaving directory `/contrib/octave/octave-forge/main/fixed'
> make[1]: *** [fixed/] Error 2
> make[1]: Leaving directory `/contrib/octave/octave-forge/main'
> make: *** [main/] Error 2
> 
> Guessing the type was intended to be double, since conj and imag
> are declared in /usr/local/include/octave-2.1.57/octave/lo-mappers.h
> as -
> 
>       extern double conj (double x);
>       extern double imag (double x);
> 
> I got the make to run further, by changing fixedCNDArray.cc as follows:
> 
>       cd /contrib/octave/octave-forge/main/fixed
>       bash-2.05b$ diff fixedCNDArray.cc fixedCNDArray.cc.d040609.t150924.root
> 635,636c635,636
> <   MX_ND_REDUCTION (acc += (imag (elem (iter_idx)) > 0) ? real (elem
> (iter_idx) *
> <                  conj (elem (iter_idx))) : pow (elem (iter_idx), 2),
> ---
> >   MX_ND_REDUCTION (acc += (imag (elem (iter_idx)) > 0) ? elem (iter_idx) *
> >                  conj (elem (iter_idx)) : pow (elem (iter_idx), 2),
> 

Ok I don't see this problem on my system.... Not sure why you do in
fact. At the moment the NDArray stuff is just the classes and not used
in the rest of the code, so the easiest fix would be just not to build
that file...

The code in question is almost a cut and paste of CNDArray.cc from the
octave source itself. The conj and pow operators on an element of this
class are defined in fixedComplex.h and so should all be of the same
type.  I.E. FixedPointComplex (not double)..... 

Your fix assumes that conj, pow, and real all return the same type,
that isn't FixedPointComplex. The question is why your compile is not
picking up the headers in FixedComplex.h correctly. 

I see you are using g++, but which version are you using? The problem might
be related to this...

> The make then died with these messages:
> 
> make[3]: Entering directory `/contrib/octave/octave-forge/main/fixed/examples'
> Depending ffft.cc
> rm -f ffft.d
> g++ -M -I/usr/local/include/octave-2.1.57
> -I/usr/local/include/octave-2.1.57/octave -I/usr/local/include -mieee-fp -g
> -O2 -I../ -DHAVE_OCTAVE_21 -DHAVE_RESIZE_AND_FILL ffft.cc | /bin/sed -e
> 's,^[^:]*/\(.*\.o\):,\1:,' -e 's,ffft\.o,pic/& & ffft.d,g' > ffft.d-t && mv
> ffft.d-t ffft.d
> In file included from ffft.h:34,
>                  from ffft.cc:29:
> ../fixed.h:42:27: fixedCNDArary.h: No such file or directory
> Depending fixed_inc.cc
> rm -f fixed_inc.d
> g++ -M -I/usr/local/include/octave-2.1.57
> -I/usr/local/include/octave-2.1.57/octave -I/usr/local/include -mieee-fp -g
> -O2 -I../ -DHAVE_OCTAVE_21 -DHAVE_RESIZE_AND_FILL fixed_inc.cc | /bin/sed -e
> 's,^[^:]*/\(.*\.o\):,\1:,' -e 's,fixed_inc\.o,pic/& & fixed_inc.d,g' >
> fixed_inc.d-t && mv fixed_inc.d-t fixed_inc.d
> In file included from fixed_inc.cc:28:
> ../fixed.h:42:27: fixedCNDArary.h: No such file or directory
> Compiling ffft.o
> g++ -c -fPIC -I/usr/local/include/octave-2.1.57
> -I/usr/local/include/octave-2.1.57/octave -I/usr/local/include -mieee-fp -g
> -O2 -I../ -DHAVE_OCTAVE_21 -DHAVE_RESIZE_AND_FILL ffft.cc -o ffft.o
> In file included from ffft.h:34,
>                  from ffft.cc:29:
> ../fixed.h:42:27: fixedCNDArary.h: No such file or directory
> make[3]: *** [ffft.o] Error 1
> make[3]: Leaving directory `/contrib/octave/octave-forge/main/fixed/examples'
> make[2]: *** [examples] Error 2
> make[2]: Leaving directory `/contrib/octave/octave-forge/main/fixed'
> make[1]: *** [fixed/] Error 2
> make[1]: Leaving directory `/contrib/octave/octave-forge/main'
> make: *** [main/] Error 2

Ok, this is a typo on my part. Wierd that I can still build even with this..

> Guessing the author had simply made a typographical error, I got the
> make to continue by changing fixed.h as follows:

Hey, "make" is a perfectly good debugging technique :-) .... I won't
comment on the GSL stuff..

D.

-- 
David Bateman                                address@hidden
Motorola CRM                                 +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 1 69 35 77 01 (Fax) 
91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]