bugGNU Octave - Bugs: bug #54217, Build fails with error: call of...

 
 

bug #54217: Build fails with error: call of overloaded ‘pow(int, int)’ is ambiguous

Submitted by:  Michele <michele31415>
Submitted on:  Sun 01 Jul 2018 12:13:01 AM UTC  
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Fixed Assigned to:  None
Originator Name:  Michele31415 Open/Closed:  Closed
Release:  4.4.0 Operating System:  Solaris/SunOS

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Mon 02 Jul 2018 09:27:08 PM UTC, comment #21:

@Michele: I added you to the CC list for bug #54235. Definitely a problem with Octave's configure.ac.

Rik <rik5>
Project Administrator
Mon 02 Jul 2018 09:08:47 PM UTC, comment #20:

"Okay to close this report and move on to bug #54235?"

It's OK with me. I'll try

gmake FPICFLAG=-fPIC

Thanks.

Michele <michele31415>
Mon 02 Jul 2018 09:06:57 PM UTC, comment #19:

Yeah I'm closing this as fixed, even though the 'abs' problem is not resolved. I will open a new bug report about problems with the local 'abs' function template in pr-output.cc.

Mike Miller <mtmiller>
Project Administrator
Mon 02 Jul 2018 08:54:35 PM UTC, comment #18:

Okay to close this report and move on to bug #54235?

Rik <rik5>
Project Administrator
Mon 02 Jul 2018 08:49:36 PM UTC, comment #17:

Thanks. It looks like configure is setting the FPICFLAG variable to be '-KPIC' on your system, even though the Fortran compiler is GNU gfortran. This is an Octave flag and Octave logic, not an Autoconf bug. I've opened bug #54235 for that, please follow that report. You might be able to build with 'make FPICFLAG=-fPIC', please report whether that works on the new bug report.

Mike Miller <mtmiller>
Project Administrator
Mon 02 Jul 2018 08:41:08 PM UTC, comment #16:

Hmm, OK see

https://login.filesanywhere.com/fs/v.aspx?v=8c69638a605e70b1b068

Michele <michele31415>
Mon 02 Jul 2018 07:23:31 PM UTC, comment #15:

I have pushed a change on the stable branch to fix the ambiguous overloads of floor and pow for Octave 4.4.1

https://hg.savannah.gnu.org/hgweb/octave/rev/e5208e98ab92

Mike Miller <mtmiller>
Project Administrator
Mon 02 Jul 2018 06:26:53 PM UTC, comment #14:

It's not attached, please gzip it or pastebin it on another site as I suggested :) Savannah's attachment limits are obscure.

Mike Miller <mtmiller>
Project Administrator
Mon 02 Jul 2018 06:20:13 PM UTC, comment #13:

OK, config.log attached. Note though that it has a timestamp of June 30. I don't know why it doesn't have today's date.

Here is the autoconf I've got:

# which autoconf
/opt/csw/bin/autoconf
# autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.
#

Michele <michele31415>
Mon 02 Jul 2018 05:40:39 PM UTC, comment #12:

The PIC option is determined automatically by configure, this may be an Autoconf problem or a configuration issue that can be worked around on your system.

Can you attach or pastebin a compressed copy of your config.log?

Assuming the PIC option can be fixed, the patches I have posted so far fall into two categories

  • use exp2 instead of pow, delete unnecessary floor on int types
  • rename local abs function template to xabs

The first changes for pow and floor are definitely good changes and those will be included in Octave 4.4.1.

The 'abs' changes look like a workaround for a weird C++ overload resolution problem that I don't understand, or that may have been fixed in later versions of GCC, so I do not think it should be included in 4.4.1 at this point. But we should look at cleaning up the 'abs' section of code for Octave 5.

Mike Miller <mtmiller>
Project Administrator
Mon 02 Jul 2018 05:17:26 PM UTC, comment #11:

Oh duh. OK, so I reapplied pow.diff and it actually finished all the CXX stuff. Now it's complaining about something else.

CXX liboctave/array/liboctave_array_libarray_la-uint64NDArray.lo
CXX liboctave/array/liboctave_array_libarray_la-uint8NDArray.lo
CXXLD liboctave/array/libarray.la
F77 liboctave/external/ranlib/advnst.lo
gfortran: error: unrecognized command line option ‘-KPIC’
gmake[2]: *** [Makefile:23956: liboctave/external/ranlib/advnst.lo] Error 1
gmake[2]: Leaving directory '/export/home/michele/octave-4.4.0'
gmake[1]: *** [Makefile:26469: all-recursive] Error 1
gmake[1]: Leaving directory '/export/home/michele/octave-4.4.0'
gmake: *** [Makefile:10185: all] Error 2
# which gfortran
/opt/csw/bin/gfortran

I don't see anything in the build guide about KPIC.

Michele <michele31415>
Sun 01 Jul 2018 10:50:12 PM UTC, comment #10:

Yes, you've now undone the previous pow.diff when you answered 'y' to the question 'Assume -R?' GNU patch is being too smart and assuming when you apply a patch twice that you meant to reverse the patch the second time.

Mike Miller <mtmiller>
Project Administrator
Sun 01 Jul 2018 10:45:04 PM UTC, comment #9:

Oops - I reapplied pow.diff by mistake. Please just ignore my last post. This time I applied abs.diff and got this:

# gpatch -p1 < abs.diff
patching file libinterp/corefcn/pr-output.cc
# pwd
/export/home/denber/octave-4.4.0
# gmake LDFLAGS=/opt/csw/lib
preserving existing HG-ID file
GEN libinterp/builtin-defun-decls.h
gmake all-recursive
gmake[1]: Entering directory '/export/home/michele/octave-4.4.0'
preserving existing HG-ID file
Making all in libgnu
gmake[2]: Entering directory '/export/home/michele/octave-4.4.0/libgnu'
gmake all-recursive
gmake[3]: Entering directory '/export/home/michele/octave-4.4.0/libgnu'
gmake[4]: Entering directory '/export/home/michele/octave-4.4.0/libgnu'
gmake[4]: Nothing to be done for 'all-am'.
gmake[4]: Leaving directory '/export/home/michele/octave-4.4.0/libgnu'
gmake[3]: Leaving directory '/export/home/michele/octave-4.4.0/libgnu'
gmake[2]: Leaving directory '/export/home/michele/octave-4.4.0/libgnu'
gmake[2]: Entering directory '/export/home/michele/octave-4.4.0'
preserving existing HG-ID file
GEN libinterp/builtins.cc
GEN libinterp/builtin-defun-decls.h
CXX libinterp/libinterp_liboctinterp_la-builtins.lo
CXX libinterp/corefcn/libinterp_corefcn_libcorefcn_la-__betainc__.lo
libinterp/corefcn/__betainc__.cc: In function ‘octave_value_list F__betainc__(const octave_value_list&, int)’:
libinterp/corefcn/__betainc__.cc:80:44: error: call of overloaded ‘pow(int, int)’ is ambiguous
static const float tiny = pow (2, -50);
^
libinterp/corefcn/__betainc__.cc:80:44: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from /opt/csw/include/c++/4.9.2/random:38,
from /opt/csw/include/c++/4.9.2/bits/stl_algo.h:66,
from /opt/csw/include/c++/4.9.2/algorithm:62,
from ./liboctave/array/Array.h:33,
from ./liboctave/util/str-vec.h:32,
from ./libinterp/octave-value/ov-fcn.h:31,
from ./libinterp/octave-value/ov-builtin.h:32,
from libinterp/corefcn/defun-int.h:30,
from libinterp/corefcn/defun.h:32,
from libinterp/corefcn/__betainc__.cc:28:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:204:21: note: long double std::pow(long double, long double)
inline long double pow(long double __X, long double __Y) { return
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:171:15: note: float std::pow(float, float)
inline float pow(float __X, float __Y) { return __powf(__X, __Y); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:72:15: note: double std::pow(double, double)
extern double pow __P((double, double));
^
libinterp/corefcn/__betainc__.cc:151:46: error: call of overloaded ‘pow(int, int)’ is ambiguous
static const double tiny = pow (2, -100);
^
libinterp/corefcn/__betainc__.cc:151:46: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from /opt/csw/include/c++/4.9.2/random:38,
from /opt/csw/include/c++/4.9.2/bits/stl_algo.h:66,
from /opt/csw/include/c++/4.9.2/algorithm:62,
from ./liboctave/array/Array.h:33,
from ./liboctave/util/str-vec.h:32,
from ./libinterp/octave-value/ov-fcn.h:31,
from ./libinterp/octave-value/ov-builtin.h:32,
from libinterp/corefcn/defun-int.h:30,
from libinterp/corefcn/defun.h:32,
from libinterp/corefcn/__betainc__.cc:28:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:204:21: note: long double std::pow(long double, long double)
inline long double pow(long double __X, long double __Y) { return
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:171:15: note: float std::pow(float, float)
inline float pow(float __X, float __Y) { return __powf(__X, __Y); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:72:15: note: double std::pow(double, double)
extern double pow __P((double, double));
^
gmake[2]: *** [Makefile:17556: libinterp/corefcn/libinterp_corefcn_libcorefcn_la-__betainc__.lo] Error 1
gmake[2]: Leaving directory '/export/home/denber/octave-4.4.0'
gmake[1]: *** [Makefile:26469: all-recursive] Error 1
gmake[1]: Leaving directory '/export/home/denber/octave-4.4.0'
gmake: *** [Makefile:10185: all] Error 2
#

Michele <michele31415>
Sun 01 Jul 2018 10:38:50 PM UTC, comment #8:

I tried this patch and got the results below. Possibly I did something wrong. I wasn't sure what to answer to its question. Would it help if I installed gcc 5 from opencsw and tried again?

# gpatch -p1 < pow.diff
patching file libinterp/corefcn/__betainc__.cc
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file libinterp/corefcn/__expint__.cc
Reversed (or previously applied) patch detected! Assume -R? [n] y
patching file libinterp/corefcn/__gammainc__.cc
Reversed (or previously applied) patch detected! Assume -R? [n] y
# gmake LDFLAGS=/opt/csw/lib
preserving existing HG-ID file
GEN libinterp/builtin-defun-decls.h
gmake all-recursive
gmake[1]: Entering directory '/export/home/michele/octave-4.4.0'
preserving existing HG-ID file
Making all in libgnu
gmake[2]: Entering directory '/export/home/michele/octave-4.4.0/libgnu'
gmake all-recursive
gmake[3]: Entering directory '/export/home/michele/octave-4.4.0/libgnu'
gmake[4]: Entering directory '/export/home/michele/octave-4.4.0/libgnu'
gmake[4]: Nothing to be done for 'all-am'.
gmake[4]: Leaving directory '/export/home/michele/octave-4.4.0/libgnu'
gmake[3]: Leaving directory '/export/home/michele/octave-4.4.0/libgnu'
gmake[2]: Leaving directory '/export/home/michele/octave-4.4.0/libgnu'
gmake[2]: Entering directory '/export/home/michele/octave-4.4.0'
preserving existing HG-ID file
GEN libinterp/builtins.cc
GEN libinterp/builtin-defun-decls.h
CXX libinterp/libinterp_liboctinterp_la-builtins.lo
CXX libinterp/corefcn/libinterp_corefcn_libcorefcn_la-__betainc__.lo
libinterp/corefcn/__betainc__.cc: In function ‘octave_value_list F__betainc__(con st octave_value_list&, int)’:
libinterp/corefcn/__betainc__.cc:80:44: error: call of overloaded ‘pow(int, int)’ is ambiguous
static const float tiny = pow (2, -50);
^
libinterp/corefcn/__betainc__.cc:80:44: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/ math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from /opt/csw/include/c++/4.9.2/random:38,
from /opt/csw/include/c++/4.9.2/bits/stl_algo.h:66,
from /opt/csw/include/c++/4.9.2/algorithm:62,
from ./liboctave/array/Array.h:33,
from ./liboctave/util/str-vec.h:32,
from ./libinterp/octave-value/ov-fcn.h:31,
from ./libinterp/octave-value/ov-builtin.h:32,
from libinterp/corefcn/defun-int.h:30,
from libinterp/corefcn/defun.h:32,
from libinterp/corefcn/__betainc__.cc:28:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:204:21: note: long double std::pow(long double, long double)
inline long double pow(long double __X, long double __Y) { return
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:171:15: note: float std::pow(float, float)
inline float pow(float __X, float __Y) { return __powf(__X, __Y); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:72:15: note: double std::pow(double, double)
extern double pow __P((double, double));
^
libinterp/corefcn/__betainc__.cc:151:46: error: call of overloaded ‘pow(int, int) ’ is ambiguous
static const double tiny = pow (2, -100);
^
libinterp/corefcn/__betainc__.cc:151:46: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/ math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from /opt/csw/include/c++/4.9.2/random:38,
from /opt/csw/include/c++/4.9.2/bits/stl_algo.h:66,
from /opt/csw/include/c++/4.9.2/algorithm:62,
from ./liboctave/array/Array.h:33,
from ./liboctave/util/str-vec.h:32,
from ./libinterp/octave-value/ov-fcn.h:31,
from ./libinterp/octave-value/ov-builtin.h:32,
from libinterp/corefcn/defun-int.h:30,
from libinterp/corefcn/defun.h:32,
from libinterp/corefcn/__betainc__.cc:28:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:204:21: note: long double std::pow(long double, long double)
inline long double pow(long double __X, long double __Y) { return
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:171:15: note: float std::pow(float, float)
inline float pow(float __X, float __Y) { return __powf(__X, __Y); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:72:15: note: double std::pow(double, double)
extern double pow __P((double, double));
^
gmake[2]: *** [Makefile:17556: libinterp/corefcn/libinterp_corefcn_libcorefcn_la- _betainc_.lo] Error 1
gmake[2]: Leaving directory '/export/home/denber/octave-4.4.0'
gmake[1]: *** [Makefile:26469: all-recursive] Error 1
gmake[1]: Leaving directory '/export/home/denber/octave-4.4.0'
gmake: *** [Makefile:10185: all] Error 2
#

Michele <michele31415>
Sun 01 Jul 2018 09:24:56 PM UTC, comment #7:

I don't understand this last error. There is a section of code, admittedly marked with a "FIXME" comment meaning that it is not an ideal solution, that explicitly declares 'abs' overloads to operate on all signed and unsigned integer types. Your compiler is saying that a later call to 'abs' in the same file is ambiguous. I'm not sure what to do about that. This may be a template overload resolution problem that has been fixed in later versions of GCC. Or it may be specific to GCC on Solaris.

I guess you could try something like the attached patch, does that get you past this error?

(file #44481)

Mike Miller <mtmiller>
Project Administrator
Sun 01 Jul 2018 07:56:12 PM UTC, comment #6:

I applied the pow.diff patch file. It went a lot further this time but stopped again on more math issues. This is as far back as my window buffer contained. I think there's even more further up. Presumably it saved this in a log somewhere but I can't find it. I have something in the top level called config.log but it's dated yesterday.

I also forgot this time to save the originals of the files to be patched before I ran patch. Is there some sort of rollback function if I have to start over again?

Oh, and for the benefit of anyone else coming along at a later date, the patch command supplied with Solaris doesn't work, but gpatch does.

Here's the log:

6: note: long int std::abs(long int)
inline long abs(long _l) { return labs(_l); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:117:12: note: int std::abs(int)
extern int abs(int);
^
In file included from libinterp/corefcn/pr-output.cc:27:0:
/opt/csw/include/c++/4.9.2/cmath:99:5: note: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = short int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^
libinterp/corefcn/pr-output.cc:1696:1: note: T abs(T) [with T = short int]
abs (T x)
^
libinterp/corefcn/pr-output.cc:3079:46: error: call of overloaded ‘abs(short int)’ is ambiguous
isneg = (abs (nda(i).value ()) != nda(i).value ());
^
libinterp/corefcn/pr-output.cc:3079:46: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from libinterp/corefcn/pr-output.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:182:21: note: long double std::abs(long double)
inline long double abs(long double __X) { return __fabsl(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:154:15: note: float std::abs(float)
inline float abs(float __X) { return __fabsf(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:148:16: note: double std::abs(double)
inline double abs(double __X) { return fabs(__X); }
^
In file included from /usr/include/stdlib.h:17:0,
from /opt/csw/include/c++/4.9.2/cstdlib:72,
from /opt/csw/include/c++/4.9.2/ext/string_conversions.h:41,
from /opt/csw/include/c++/4.9.2/bits/basic_string.h:2850,
from /opt/csw/include/c++/4.9.2/string:52,
from /opt/csw/include/c++/4.9.2/bits/locale_classes.h:40,
from /opt/csw/include/c++/4.9.2/bits/ios_base.h:41,
from /opt/csw/include/c++/4.9.2/iomanip:40,
from libinterp/corefcn/pr-output.cc:29:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:163:16: note: long int std::abs(long int)
inline long abs(long _l) { return labs(_l); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:117:12: note: int std::abs(int)
extern int abs(int);
^
In file included from libinterp/corefcn/pr-output.cc:27:0:
/opt/csw/include/c++/4.9.2/cmath:99:5: note: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = short int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^
libinterp/corefcn/pr-output.cc:1696:1: note: T abs(T) [with T = short int]
abs (T x)
^
libinterp/corefcn/pr-output.cc: In instantiation of ‘void octave_print_internal_template(std::ostream&, const intNDArray<U>&, bool, int) [with T = octave_int<short unsigned int>; std::ostream = std::basic_ostream<char>]’:
libinterp/corefcn/pr-output.cc:3201:1: required from here
libinterp/corefcn/pr-output.cc:3073:67: error: call of overloaded ‘abs(short unsigned int)’ is ambiguous
(std::floor (log10 (double (abs (nda(i).value ()))) + 1));
^
libinterp/corefcn/pr-output.cc:3073:67: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from libinterp/corefcn/pr-output.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:182:21: note: long double std::abs(long double)
inline long double abs(long double __X) { return __fabsl(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:154:15: note: float std::abs(float)
inline float abs(float __X) { return __fabsf(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:148:16: note: double std::abs(double)
inline double abs(double __X) { return fabs(__X); }
^
In file included from /usr/include/stdlib.h:17:0,
from /opt/csw/include/c++/4.9.2/cstdlib:72,
from /opt/csw/include/c++/4.9.2/ext/string_conversions.h:41,
from /opt/csw/include/c++/4.9.2/bits/basic_string.h:2850,
from /opt/csw/include/c++/4.9.2/string:52,
from /opt/csw/include/c++/4.9.2/bits/locale_classes.h:40,
from /opt/csw/include/c++/4.9.2/bits/ios_base.h:41,
from /opt/csw/include/c++/4.9.2/iomanip:40,
from libinterp/corefcn/pr-output.cc:29:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:163:16: note: long int std::abs(long int)
inline long abs(long _l) { return labs(_l); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:117:12: note: int std::abs(int)
extern int abs(int);
^
In file included from libinterp/corefcn/pr-output.cc:27:0:
/opt/csw/include/c++/4.9.2/cmath:99:5: note: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = short unsigned int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^
libinterp/corefcn/pr-output.cc:1713:3: note: T abs(T) [with T = short unsigned int]
abs (unsigned T x) \
^
libinterp/corefcn/pr-output.cc:1719:1: note: in expansion of macro ‘SPECIALIZE_UABS’
SPECIALIZE_UABS(short)
^
libinterp/corefcn/pr-output.cc:3079:46: error: call of overloaded ‘abs(short unsigned int)’ is ambiguous
isneg = (abs (nda(i).value ()) != nda(i).value ());
^
libinterp/corefcn/pr-output.cc:3079:46: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from libinterp/corefcn/pr-output.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:182:21: note: long double std::abs(long double)
inline long double abs(long double __X) { return __fabsl(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:154:15: note: float std::abs(float)
inline float abs(float __X) { return __fabsf(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:148:16: note: double std::abs(double)
inline double abs(double __X) { return fabs(__X); }
^
In file included from /usr/include/stdlib.h:17:0,
from /opt/csw/include/c++/4.9.2/cstdlib:72,
from /opt/csw/include/c++/4.9.2/ext/string_conversions.h:41,
from /opt/csw/include/c++/4.9.2/bits/basic_string.h:2850,
from /opt/csw/include/c++/4.9.2/string:52,
from /opt/csw/include/c++/4.9.2/bits/locale_classes.h:40,
from /opt/csw/include/c++/4.9.2/bits/ios_base.h:41,
from /opt/csw/include/c++/4.9.2/iomanip:40,
from libinterp/corefcn/pr-output.cc:29:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:163:16: note: long int std::abs(long int)
inline long abs(long _l) { return labs(_l); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:117:12: note: int std::abs(int)
extern int abs(int);
^
In file included from libinterp/corefcn/pr-output.cc:27:0:
/opt/csw/include/c++/4.9.2/cmath:99:5: note: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = short unsigned int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^
libinterp/corefcn/pr-output.cc:1713:3: note: T abs(T) [with T = short unsigned int]
abs (unsigned T x) \
^
libinterp/corefcn/pr-output.cc:1719:1: note: in expansion of macro ‘SPECIALIZE_UABS’
SPECIALIZE_UABS(short)
^
libinterp/corefcn/pr-output.cc: In instantiation of ‘void octave_print_internal_template(std::ostream&, const intNDArray<U>&, bool, int) [with T = octave_int<unsigned int>; std::ostream = std::basic_ostream<char>]’:
libinterp/corefcn/pr-output.cc:3203:1: required from here
libinterp/corefcn/pr-output.cc:3073:67: error: call of overloaded ‘abs(unsigned int)’ is ambiguous
(std::floor (log10 (double (abs (nda(i).value ()))) + 1));
^
libinterp/corefcn/pr-output.cc:3073:67: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from libinterp/corefcn/pr-output.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:182:21: note: long double std::abs(long double)
inline long double abs(long double __X) { return __fabsl(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:154:15: note: float std::abs(float)
inline float abs(float __X) { return __fabsf(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:148:16: note: double std::abs(double)
inline double abs(double __X) { return fabs(__X); }
^
In file included from /usr/include/stdlib.h:17:0,
from /opt/csw/include/c++/4.9.2/cstdlib:72,
from /opt/csw/include/c++/4.9.2/ext/string_conversions.h:41,
from /opt/csw/include/c++/4.9.2/bits/basic_string.h:2850,
from /opt/csw/include/c++/4.9.2/string:52,
from /opt/csw/include/c++/4.9.2/bits/locale_classes.h:40,
from /opt/csw/include/c++/4.9.2/bits/ios_base.h:41,
from /opt/csw/include/c++/4.9.2/iomanip:40,
from libinterp/corefcn/pr-output.cc:29:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:163:16: note: long int std::abs(long int)
inline long abs(long _l) { return labs(_l); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:117:12: note: int std::abs(int)
extern int abs(int);
^
In file included from libinterp/corefcn/pr-output.cc:27:0:
/opt/csw/include/c++/4.9.2/cmath:99:5: note: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = unsigned int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^
libinterp/corefcn/pr-output.cc:1713:3: note: T abs(T) [with T = unsigned int]
abs (unsigned T x) \
^
libinterp/corefcn/pr-output.cc:1720:1: note: in expansion of macro ‘SPECIALIZE_UABS’
SPECIALIZE_UABS(int)
^
libinterp/corefcn/pr-output.cc:3079:46: error: call of overloaded ‘abs(unsigned int)’ is ambiguous
isneg = (abs (nda(i).value ()) != nda(i).value ());
^
libinterp/corefcn/pr-output.cc:3079:46: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from libinterp/corefcn/pr-output.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:182:21: note: long double std::abs(long double)
inline long double abs(long double __X) { return __fabsl(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:154:15: note: float std::abs(float)
inline float abs(float __X) { return __fabsf(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:148:16: note: double std::abs(double)
inline double abs(double __X) { return fabs(__X); }
^
In file included from /usr/include/stdlib.h:17:0,
from /opt/csw/include/c++/4.9.2/cstdlib:72,
from /opt/csw/include/c++/4.9.2/ext/string_conversions.h:41,
from /opt/csw/include/c++/4.9.2/bits/basic_string.h:2850,
from /opt/csw/include/c++/4.9.2/string:52,
from /opt/csw/include/c++/4.9.2/bits/locale_classes.h:40,
from /opt/csw/include/c++/4.9.2/bits/ios_base.h:41,
from /opt/csw/include/c++/4.9.2/iomanip:40,
from libinterp/corefcn/pr-output.cc:29:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:163:16: note: long int std::abs(long int)
inline long abs(long _l) { return labs(_l); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:117:12: note: int std::abs(int)
extern int abs(int);
^
In file included from libinterp/corefcn/pr-output.cc:27:0:
/opt/csw/include/c++/4.9.2/cmath:99:5: note: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = unsigned int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^
libinterp/corefcn/pr-output.cc:1713:3: note: T abs(T) [with T = unsigned int]
abs (unsigned T x) \
^
libinterp/corefcn/pr-output.cc:1720:1: note: in expansion of macro ‘SPECIALIZE_UABS’
SPECIALIZE_UABS(int)
^
libinterp/corefcn/pr-output.cc: In instantiation of ‘void octave_print_internal_template(std::ostream&, const intNDArray<U>&, bool, int) [with T = octave_int<long long int>; std::ostream = std::basic_ostream<char>]’:
libinterp/corefcn/pr-output.cc:3204:1: required from here
libinterp/corefcn/pr-output.cc:3073:67: error: call of overloaded ‘abs(long long int)’ is ambiguous
(std::floor (log10 (double (abs (nda(i).value ()))) + 1));
^
libinterp/corefcn/pr-output.cc:3073:67: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from libinterp/corefcn/pr-output.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:182:21: note: long double std::abs(long double)
inline long double abs(long double __X) { return __fabsl(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:154:15: note: float std::abs(float)
inline float abs(float __X) { return __fabsf(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:148:16: note: double std::abs(double)
inline double abs(double __X) { return fabs(__X); }
^
In file included from /usr/include/stdlib.h:17:0,
from /opt/csw/include/c++/4.9.2/cstdlib:72,
from /opt/csw/include/c++/4.9.2/ext/string_conversions.h:41,
from /opt/csw/include/c++/4.9.2/bits/basic_string.h:2850,
from /opt/csw/include/c++/4.9.2/string:52,
from /opt/csw/include/c++/4.9.2/bits/locale_classes.h:40,
from /opt/csw/include/c++/4.9.2/bits/ios_base.h:41,
from /opt/csw/include/c++/4.9.2/iomanip:40,
from libinterp/corefcn/pr-output.cc:29:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:163:16: note: long int std::abs(long int)
inline long abs(long _l) { return labs(_l); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:117:12: note: int std::abs(int)
extern int abs(int);
^
In file included from libinterp/corefcn/pr-output.cc:27:0:
/opt/csw/include/c++/4.9.2/cmath:99:5: note: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = long long int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^
libinterp/corefcn/pr-output.cc:1696:1: note: T abs(T) [with T = long long int]
abs (T x)
^
libinterp/corefcn/pr-output.cc:3079:46: error: call of overloaded ‘abs(long long int)’ is ambiguous
isneg = (abs (nda(i).value ()) != nda(i).value ());
^
libinterp/corefcn/pr-output.cc:3079:46: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from libinterp/corefcn/pr-output.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:182:21: note: long double std::abs(long double)
inline long double abs(long double __X) { return __fabsl(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:154:15: note: float std::abs(float)
inline float abs(float __X) { return __fabsf(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:148:16: note: double std::abs(double)
inline double abs(double __X) { return fabs(__X); }
^
In file included from /usr/include/stdlib.h:17:0,
from /opt/csw/include/c++/4.9.2/cstdlib:72,
from /opt/csw/include/c++/4.9.2/ext/string_conversions.h:41,
from /opt/csw/include/c++/4.9.2/bits/basic_string.h:2850,
from /opt/csw/include/c++/4.9.2/string:52,
from /opt/csw/include/c++/4.9.2/bits/locale_classes.h:40,
from /opt/csw/include/c++/4.9.2/bits/ios_base.h:41,
from /opt/csw/include/c++/4.9.2/iomanip:40,
from libinterp/corefcn/pr-output.cc:29:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:163:16: note: long int std::abs(long int)
inline long abs(long _l) { return labs(_l); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:117:12: note: int std::abs(int)
extern int abs(int);
^
In file included from libinterp/corefcn/pr-output.cc:27:0:
/opt/csw/include/c++/4.9.2/cmath:99:5: note: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = long long int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^
libinterp/corefcn/pr-output.cc:1696:1: note: T abs(T) [with T = long long int]
abs (T x)
^
libinterp/corefcn/pr-output.cc: In instantiation of ‘void octave_print_internal_template(std::ostream&, const intNDArray<U>&, bool, int) [with T = octave_int<long long unsigned int>; std::ostream = std::basic_ostream<char>]’:
libinterp/corefcn/pr-output.cc:3205:1: required from here
libinterp/corefcn/pr-output.cc:3073:67: error: call of overloaded ‘abs(long long unsigned int)’ is ambiguous
(std::floor (log10 (double (abs (nda(i).value ()))) + 1));
^
libinterp/corefcn/pr-output.cc:3073:67: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from libinterp/corefcn/pr-output.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:182:21: note: long double std::abs(long double)
inline long double abs(long double __X) { return __fabsl(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:154:15: note: float std::abs(float)
inline float abs(float __X) { return __fabsf(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:148:16: note: double std::abs(double)
inline double abs(double __X) { return fabs(__X); }
^
In file included from /usr/include/stdlib.h:17:0,
from /opt/csw/include/c++/4.9.2/cstdlib:72,
from /opt/csw/include/c++/4.9.2/ext/string_conversions.h:41,
from /opt/csw/include/c++/4.9.2/bits/basic_string.h:2850,
from /opt/csw/include/c++/4.9.2/string:52,
from /opt/csw/include/c++/4.9.2/bits/locale_classes.h:40,
from /opt/csw/include/c++/4.9.2/bits/ios_base.h:41,
from /opt/csw/include/c++/4.9.2/iomanip:40,
from libinterp/corefcn/pr-output.cc:29:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:163:16: note: long int std::abs(long int)
inline long abs(long _l) { return labs(_l); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:117:12: note: int std::abs(int)
extern int abs(int);
^
In file included from libinterp/corefcn/pr-output.cc:27:0:
/opt/csw/include/c++/4.9.2/cmath:99:5: note: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = long long unsigned int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^
libinterp/corefcn/pr-output.cc:1713:3: note: T abs(T) [with T = long long unsigned int]
abs (unsigned T x) \
^
libinterp/corefcn/pr-output.cc:1722:1: note: in expansion of macro ‘SPECIALIZE_UABS’
SPECIALIZE_UABS(long long)
^
libinterp/corefcn/pr-output.cc:3079:46: error: call of overloaded ‘abs(long long unsigned int)’ is ambiguous
isneg = (abs (nda(i).value ()) != nda(i).value ());
^
libinterp/corefcn/pr-output.cc:3079:46: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from libinterp/corefcn/pr-output.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:182:21: note: long double std::abs(long double)
inline long double abs(long double __X) { return __fabsl(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:154:15: note: float std::abs(float)
inline float abs(float __X) { return __fabsf(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:148:16: note: double std::abs(double)
inline double abs(double __X) { return fabs(__X); }
^
In file included from /usr/include/stdlib.h:17:0,
from /opt/csw/include/c++/4.9.2/cstdlib:72,
from /opt/csw/include/c++/4.9.2/ext/string_conversions.h:41,
from /opt/csw/include/c++/4.9.2/bits/basic_string.h:2850,
from /opt/csw/include/c++/4.9.2/string:52,
from /opt/csw/include/c++/4.9.2/bits/locale_classes.h:40,
from /opt/csw/include/c++/4.9.2/bits/ios_base.h:41,
from /opt/csw/include/c++/4.9.2/iomanip:40,
from libinterp/corefcn/pr-output.cc:29:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:163:16: note: long int std::abs(long int)
inline long abs(long _l) { return labs(_l); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/stdlib_iso.h:117:12: note: int std::abs(int)
extern int abs(int);
^
In file included from libinterp/corefcn/pr-output.cc:27:0:
/opt/csw/include/c++/4.9.2/cmath:99:5: note: constexpr typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type std::abs(_Tp) [with _Tp = long long unsigned int; typename __gnu_cxx::__enable_if<std::__is_integer<_Tp>::__value, double>::__type = double]
abs(_Tp __x)
^
libinterp/corefcn/pr-output.cc:1713:3: note: T abs(T) [with T = long long unsigned int]
abs (unsigned T x) \
^
libinterp/corefcn/pr-output.cc:1722:1: note: in expansion of macro ‘SPECIALIZE_UABS’
SPECIALIZE_UABS(long long)
^
gmake[2]: *** [Makefile:18284: libinterp/corefcn/libinterp_corefcn_libcorefcn_la-pr-output.lo] Error 1
gmake[2]: Leaving directory '/export/home/michele/octave-4.4.0'
gmake[1]: *** [Makefile:26469: all-recursive] Error 1
gmake[1]: Leaving directory '/export/home/michele/octave-4.4.0'
gmake: *** [Makefile:10185: all] Error 2
#

Michele <michele31415>
Sun 01 Jul 2018 06:43:41 PM UTC, comment #5:

Please try the updated patch (attachment this time instead of inline). This patch includes the changes in the previous patch, so you'll have to back out the changes from the original patch, or your version of patch may automatically skip already-applied hunks.

(file #44480)

Mike Miller <mtmiller>
Project Administrator
Sun 01 Jul 2018 04:04:49 PM UTC, comment #4:

Thanks Mike, we're making progress - that seems to have worked. But now it's breaking on a similar error later on:

gmake[2]: Entering directory '/export/home/michele/octave-4.4.0'
preserving existing HG-ID file
GEN libinterp/builtins.cc
GEN libinterp/builtin-defun-decls.h
CXX libinterp/libinterp_liboctinterp_la-builtins.lo
CXX libinterp/corefcn/libinterp_corefcn_libcorefcn_la-__betainc__.lo
CXX libinterp/corefcn/libinterp_corefcn_libcorefcn_la-__contourc__.lo
CXX libinterp/corefcn/libinterp_corefcn_libcorefcn_la-__dsearchn__.lo
CXX libinterp/corefcn/libinterp_corefcn_libcorefcn_la-__expint__.lo
libinterp/corefcn/__expint__.cc: In function ‘octave_value_list F__expint__(const octave_value_list&, int)’:
libinterp/corefcn/__expint__.cc:64:51: error: call of overloaded ‘pow(int, int)’ is ambiguous
static const FloatComplex tiny = pow (2, -50);
^
libinterp/corefcn/__expint__.cc:64:51: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from /opt/csw/include/c++/4.9.2/random:38,
from /opt/csw/include/c++/4.9.2/bits/stl_algo.h:66,
from /opt/csw/include/c++/4.9.2/algorithm:62,
from ./liboctave/array/Array.h:33,
from ./liboctave/array/MArray.h:29,
from ./liboctave/array/CNDArray.h:28,
from libinterp/corefcn/__expint__.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:204:21: note: long double std::pow(long double, long double)
inline long double pow(long double __X, long double __Y) { return
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:171:15: note: float std::pow(float, float)
inline float pow(float __X, float __Y) { return __powf(__X, __Y); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:72:15: note: double std::pow(double, double)
extern double pow __P((double, double));
^
libinterp/corefcn/__expint__.cc:98:43: error: call of overloaded ‘floor(int)’ is ambiguous
alpha_j = floor ((j + 1) / 2);
^
libinterp/corefcn/__expint__.cc:98:43: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from /opt/csw/include/c++/4.9.2/random:38,
from /opt/csw/include/c++/4.9.2/bits/stl_algo.h:66,
from /opt/csw/include/c++/4.9.2/algorithm:62,
from ./liboctave/array/Array.h:33,
from ./liboctave/array/MArray.h:29,
from ./liboctave/array/CNDArray.h:28,
from libinterp/corefcn/__expint__.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:193:21: note: long double std::floor(long double)
inline long double floor(long double __X) { return __floorl(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:164:15: note: float std::floor(float)
inline float floor(float __X) { return __floorf(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:77:15: note: double std::floor(double)
extern double floor __P((double));
^
libinterp/corefcn/__expint__.cc:122:47: error: call of overloaded ‘pow(int, int)’ is ambiguous
static const Complex tiny = pow (2, -100);
^
libinterp/corefcn/__expint__.cc:122:47: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from /opt/csw/include/c++/4.9.2/random:38,
from /opt/csw/include/c++/4.9.2/bits/stl_algo.h:66,
from /opt/csw/include/c++/4.9.2/algorithm:62,
from ./liboctave/array/Array.h:33,
from ./liboctave/array/MArray.h:29,
from ./liboctave/array/CNDArray.h:28,
from libinterp/corefcn/__expint__.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:204:21: note: long double std::pow(long double, long double)
inline long double pow(long double __X, long double __Y) { return
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:171:15: note: float std::pow(float, float)
inline float pow(float __X, float __Y) { return __powf(__X, __Y); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:72:15: note: double std::pow(double, double)
extern double pow __P((double, double));
^
libinterp/corefcn/__expint__.cc:156:43: error: call of overloaded ‘floor(int)’ is ambiguous
alpha_j = floor ((j + 1) / 2);
^
libinterp/corefcn/__expint__.cc:156:43: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from /opt/csw/include/c++/4.9.2/random:38,
from /opt/csw/include/c++/4.9.2/bits/stl_algo.h:66,
from /opt/csw/include/c++/4.9.2/algorithm:62,
from ./liboctave/array/Array.h:33,
from ./liboctave/array/MArray.h:29,
from ./liboctave/array/CNDArray.h:28,
from libinterp/corefcn/__expint__.cc:27:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:193:21: note: long double std::floor(long double)
inline long double floor(long double __X) { return __floorl(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:164:15: note: float std::floor(float)
inline float floor(float __X) { return __floorf(__X); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:77:15: note: double std::floor(double)
extern double floor __P((double));
^
gmake[2]: *** [Makefile:17577: libinterp/corefcn/libinterp_corefcn_libcorefcn_la-__expint__.lo] Error 1
gmake[2]: Leaving directory '/export/home/michele/octave-4.4.0'
gmake[1]: *** [Makefile:26469: all-recursive] Error 1
gmake[1]: Leaving directory '/export/home/michele/octave-4.4.0'
gmake: *** [Makefile:10185: all] Error 2
#

Michele <michele31415>
Sun 01 Jul 2018 12:42:04 AM UTC, comment #3:

No, that is not a valid syntax.

When it is a power of base 2, it's probably better to call exp2(x) instead of pow(2,x) anyway.

You can save the diff to a file and use

while your shell is in the root directory of the Octave source code.

Mike Miller <mtmiller>
Project Administrator
Sun 01 Jul 2018 12:35:32 AM UTC, comment #2:

Thanks very much. I'll try that (once I figure out how to use diff). I'm looking at the two offending lines in _betainc_.cc right now.

Meanwhile, it looks like I'm not alone. I've been reading this: https://bytes.com/topic/c/answers/727736-ambiguous-call-pow

where this same problem seems to have engendered some heated discussion. Would simply changing line 80:

static const float tiny = pow (2, -50);

to

static const float tiny = int pow (2, -50);

work?

Michele <michele31415>
Sun 01 Jul 2018 12:25:24 AM UTC, comment #1:

Can you try changing the two calls to pow like the following diff?

If that change fixes it for you I believe this can be fixed in time for a 4.4.1 release.

Mike Miller <mtmiller>
Project Administrator
Sun 01 Jul 2018 12:13:01 AM UTC, original submission:

While building Octave 4.4.0 on a Solaris 10 Sparc M3000 using opencsw dependencies,gcc 4.9.2, and gmake, after nearly reaching the end, I get:

...
CXX libinterp/corefcn/libinterp_corefcn_libcorefcn_la-__betainc__.lo
libinterp/corefcn/__betainc__.cc: In function ‘octave_value_list F__betainc__(const octave_value_list&, int)’:
libinterp/corefcn/__betainc__.cc:80:44: error: call of overloaded ‘pow(int, int)’ is ambiguous
static const float tiny = pow (2, -50);
^
libinterp/corefcn/__betainc__.cc:80:44: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from /opt/csw/include/c++/4.9.2/random:38,
from /opt/csw/include/c++/4.9.2/bits/stl_algo.h:66,
from /opt/csw/include/c++/4.9.2/algorithm:62,
from ./liboctave/array/Array.h:33,
from ./liboctave/util/str-vec.h:32,
from ./libinterp/octave-value/ov-fcn.h:31,
from ./libinterp/octave-value/ov-builtin.h:32,
from libinterp/corefcn/defun-int.h:30,
from libinterp/corefcn/defun.h:32,
from libinterp/corefcn/__betainc__.cc:28:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:204:21: note: long double std::pow(long double, long double)
inline long double pow(long double __X, long double __Y) { return
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:171:15: note: float std::pow(float, float)
inline float pow(float __X, float __Y) { return __powf(__X, __Y); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:72:15: note: double std::pow(double, double)
extern double pow __P((double, double));
^
libinterp/corefcn/__betainc__.cc:151:46: error: call of overloaded ‘pow(int, int)’ is ambiguous
static const double tiny = pow (2, -100);
^
libinterp/corefcn/__betainc__.cc:151:46: note: candidates are:
In file included from /opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/math.h:26:0,
from /opt/csw/include/c++/4.9.2/cmath:44,
from /opt/csw/include/c++/4.9.2/random:38,
from /opt/csw/include/c++/4.9.2/bits/stl_algo.h:66,
from /opt/csw/include/c++/4.9.2/algorithm:62,
from ./liboctave/array/Array.h:33,
from ./liboctave/util/str-vec.h:32,
from ./libinterp/octave-value/ov-fcn.h:31,
from ./libinterp/octave-value/ov-builtin.h:32,
from libinterp/corefcn/defun-int.h:30,
from libinterp/corefcn/defun.h:32,
from libinterp/corefcn/__betainc__.cc:28:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:204:21: note: long double std::pow(long double, long double)
inline long double pow(long double __X, long double __Y) { return
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:171:15: note: float std::pow(float, float)
inline float pow(float __X, float __Y) { return __powf(__X, __Y); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/4.9.2/include-fixed/iso/math_iso.h:72:15: note: double std::pow(double, double)
extern double pow __P((double, double));
^
gmake[2]: *** [Makefile:17556: libinterp/corefcn/libinterp_corefcn_libcorefcn_la-__betainc__.lo] Error 1
gmake[2]: Leaving directory '/export/home/michele/octave-4.4.0'
gmake[1]: *** [Makefile:26469: all-recursive] Error 1
gmake[1]: Leaving directory '/export/home/michele/octave-4.4.0'
gmake: *** [Makefile:10185: all] Error 2

This one really has me stumped. Does anyone know what it's complaining about here? Thanks.

Michele <michele31415>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44481:  abs.diff added by mtmiller (3KiB - text/x-patch)
file #44480:  pow.diff added by mtmiller (3KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by michele31415 (Submitted the item)
  • -email is unavailable- added by michele31415
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-02 mtmiller StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2018-07-01 mtmiller Attached File- => Added abs.diff, #44481
    2018-07-01 mtmiller Attached File- => Added pow.diff, #44480
    2018-07-01 mtmiller StatusNone => Patch Submitted
    2018-07-01 michele31415 Carbon-Copy- => Added -email is unavailable-

    Back to the top


    Powered by Savane 3.3