about log2 for octave-3.1.51 (Not 3.1.50)

Jaroslav Hajek highegg at gmail.com
Fri Jul 25 03:58:49 CDT 2008


On Fri, Jul 25, 2008 at 9:43 AM, Tatsuro MATSUOKA <tmacchant at yahoo.co.jp> wrote:
> Hello
>
>
> I have gottten the imformation at cygwin ML.
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Tatsuro MATSUOKA wrote:
> | The following lines the config.log which are related to log2.
> | The existence of log2 is found.  However it did not go well octave
> configure test.
>
> log2 is defined as a cpp macro in <math.h>.  You either need to fix the
> configure test, or you may find it easier to pass "ac_cv_func_log2=yes"
> to configure.
>
>
> Yaakov
> -----BEGIN PGP SIGNATURE-----
>
> Is the above useful?
>

I think we're getting closer :) math.h should never be included in any
c++ header, but rather cmath (this is handled by liboctave/lo-math.h).
The cmath header tries to undefine the functional macros defined in
math.h - but log2 is apparently missing. I reckon this is a bug in
g++; given that log and log10 are both there, log2 should probably be
as well. Would you like to report this to gcc bugzilla?
Still, it's reasonable to workaround the bug in some way. The easiest
fix I can think of is the attached changeset. After all, the
interfering macro is quite useless for us, because we already have the
proper wrappers in lo-mappers.cc.
Can you try if the changeset fixes the problem for you?

cheers

> Regards
>
> Tatsuro
>
>




-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log2.diff
Type: text/x-patch
Size: 870 bytes
Desc: not available
Url : https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080725/27f0e74c/attachment-0001.bin 


More information about the Bug-octave mailing list