[GiNaC-devel] ginac-1.8.8/cln-1.3.7/gcc-15.1.0 test failures

Vladimir V. Kisil V.Kisil at leeds.ac.uk
Tue Apr 29 21:21:41 CEST 2025


	Hello, Andrey!

	It seems the new version of GCC introduces the class complex, which
  was not there before. Now the compiler is confused which one to use:
  the previously existing cln::complex or std::complex. The attached
  simple patch shall resolve that.

  Best wishes,
  Vladimir
-- 
Vladimir V. Kisil                  http://v-v-kisil.scienceontheweb.net
  Book:      Geometry of Mobius Maps       https://doi.org/10.1142/p835
  Soft:      Geometry of cycles         http://moebinv.sourceforge.net/
  Jupyter notebooks:        https://github.com/vvkisil?tab=repositories
>>>>> On Tue, 29 Apr 2025 19:27:40 +0700 (+07), "Andrey G. Grozin via GiNaC-devel" <ginac-devel at ginac.de> said:

    AG> Hello *,

    AG> I've compiled cln-1.3.7 and ginac-1.8.8 by gcc-15.1.0 on Gentoo
    AG> linux (I'm the maintainer of the ginal package in this
    AG> distro). Everything's fine.  But when I run ginac tests, I get

    AG> x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../config
    AG> -I./../ginac -I../ginac -DIN_GINAC -O2 -march=alderlake -mabm
    AG> -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk
    AG> --param=l1-cache-line-size=64 --param=l1-cache-size=32
    AG> --param=l2-cache-size=24576 -pipe -c -o exam_archive.o
    AG> exam_archive.cpp exam_archive.cpp: In function ‘unsigned int
    AG> numeric_complex_bug()’: exam_archive.cpp:104:17: error:
    AG> reference to ‘complex’ is ambiguous 104 | complex(one, one), |
    AG> ^~~~~~~ In file included from
    AG> /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/tuple:40,
    AG> from
    AG> /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/functional:55,
    AG> from ./../ginac/ptr.h:29, from ./../ginac/basic.h:27, from
    AG> ./../ginac/ginac.h:28, from exam_archive.cpp:23:
    AG> /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/stl_pair.h:105:11:
    AG> note: candidates are: ‘template<class _Tp> class std::complex’
    AG> 105 | class complex; | ^~~~~~~ In file included from
    AG> ./../ginac/numeric.h:30, from ./../ginac/ginac.h:40:
    AG> /usr/include/cln/complex.h:22:19: note: ‘const cln::cl_N
    AG> cln::complex(const cl_R&, const cl_R&)’ 22 | extern const cl_N
    AG> complex (const cl_R& a, const cl_R& b); | ^~~~~~~
    AG> exam_archive.cpp:105:17: error: reference to ‘complex’ is
    AG> ambiguous 105 | complex(one, three_fp), | ^~~~~~~
    AG> /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/stl_pair.h:105:11:
    AG> note: candidates are: ‘template<class _Tp> class std::complex’
    AG> 105 | class complex; | ^~~~~~~ /usr/include/cln/complex.h:22:19:
    AG> note: ‘const cln::cl_N cln::complex(const cl_R&, const cl_R&)’
    AG> 22 | extern const cl_N complex (const cl_R& a, const cl_R& b); |
    AG> ^~~~~~~ exam_archive.cpp:106:17: error: reference to ‘complex’
    AG> is ambiguous 106 | complex(three_fp, one), | ^~~~~~~
    AG> /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/stl_pair.h:105:11:
    AG> note: candidates are: ‘template<class _Tp> class std::complex’
    AG> 105 | class complex; | ^~~~~~~ /usr/include/cln/complex.h:22:19:
    AG> note: ‘const cln::cl_N cln::complex(const cl_R&, const cl_R&)’
    AG> 22 | extern const cl_N complex (const cl_R& a, const cl_R& b); |
    AG> ^~~~~~~ exam_archive.cpp:107:17: error: reference to ‘complex’
    AG> is ambiguous 107 | complex(three_fp, three_fp) | ^~~~~~~
    AG> /usr/lib/gcc/x86_64-pc-linux-gnu/15/include/g++-v15/bits/stl_pair.h:105:11:
    AG> note: candidates are: ‘template<class _Tp> class std::complex’
    AG> 105 | class complex; | ^~~~~~~ /usr/include/cln/complex.h:22:19:
    AG> note: ‘const cln::cl_N cln::complex(const cl_R&, const cl_R&)’
    AG> 22 | extern const cl_N complex (const cl_R& a, const cl_R& b); |
    AG> ^~~~~~~ exam_archive.cpp:108:9: error: could not convert
    AG> ‘{<expression error>, <expression error>, <expression error>,
    AG> <expression error>}’ from ‘<brace-enclosed initializer list>’ to
    AG> ‘std::vector<cln::cl_N>’ 108 | }; | ^ | | | <brace-enclosed
    AG> initializer list>

    AG> Any ideas?

    AG> Andrey _______________________________________________
    AG> GiNaC-devel mailing list GiNaC-devel at ginac.de
    AG> https://www.ginac.de/mailman/listinfo/ginac-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-ambiguity-in-calling-complex-constructor.patch
Type: application/mbox
Size: 956 bytes
Desc: patch.patch
URL: <http://www.ginac.de/pipermail/ginac-devel/attachments/20250429/fbf627e5/attachment.mbox>


More information about the GiNaC-devel mailing list