Dear Developers of GiNaC,


[0] Thank you very much for developing continuously GiNaC,

which is a very nice C++ library to write programs for symbolic computation.

I recently built ginac-1.8.10 from source code on my MacBook Pro.

The compilation stage was successful but the check stage failed.

To pass the check stage, I needed several modifications of the source file

ginac-1.8.10/check/exam_Gt.cpp. I will explain these modifications below.


My environment is the following:


OS: macOS Tahoe 26.3

C++ compiler:


g++ --version


-->


Apple clang version 17.0.0 (clang-1700.6.3.2)

Target: arm64-apple-darwin25.3.0

Thread model: posix

InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin



[1] The build from the original source code of ginac-1.8.10 produced

the following result:


mkdir /tmp/AAA

/tmp/AAA

bzcat /usr/local/src/SymbolicComputation/GiNaC/ginac-1.8.10.tar.bz2 | tar xvf -

cd ginac-1.8.10

./configure

make

make check


-->


...

...

/bin/sh ../libtool  --tag=CXX   --mode=link g++  -g -O2   -o exam_inifcns_elliptic exam_inifcns_elliptic.o ../ginac/libginac.la -L/usr/local/lib -lcln 

libtool: link: g++ -g -O2 -o .libs/exam_inifcns_elliptic exam_inifcns_elliptic.o -Wl,-bind_at_load  ../ginac/.libs/libginac.dylib -ldl -L/usr/local/lib /usr/local/lib/libcln.dylib /usr/local/lib/libgmp.dylib

ld: warning: -bind_at_load is deprecated on macOS

depbase=`echo exam_Gt.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

g++ -DHAVE_CONFIG_H -I. -I../config  -I./../ginac -I../ginac -DIN_GINAC -I/usr/local/include  -g -O2 -MT exam_Gt.o -MD -MP -MF $depbase.Tpo -c -o exam_Gt.o exam_Gt.cpp &&\

mv -f $depbase.Tpo $depbase.Po

exam_Gt.cpp:1891:17: error: call to 'pow' is ambiguous

 1891 |         const ex eps = pow(10,-30);

      |                        ^~~

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__math/exponential_functions.h:161:65: note: candidate function [with _A1 = int, _A2 = int, $2 = 0]

  161 | inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type pow(_A1 __x, _A2 __y) _NOEXCEPT {

      |                                                                 ^

./../ginac/power.h:120:11: note: candidate function [with T1 = int, T2 = int]

  120 | inline ex pow(const T1 & b, const T2 & e)

      |           ^

1 error generated.



[2] The above error indicates that pow() in GiNaC and pow() in MacOS conflict

as having the same name. Accordingly, I modified exam_Gt.cpp as follows:


cd /tmp/AAA/ginac-1.8.10/check

mv exam_Gt.cpp exam_Gt.cpp.org

cat exam_Gt.cpp.org | sed -e 's/pow(10,-30)/GiNaC::pow(10,-30)/' > exam_Gt.cpp

diff -u exam_Gt.cpp.org exam_Gt.cpp


-->


------------------------------------------------------------------------------

--- exam_Gt.cpp.org 2026-02-10 01:49:00

+++ exam_Gt.cpp 2026-02-17 07:54:20

@@ -1888,7 +1888,7 @@

  };

 

  Digits = 40;

- const ex eps = pow(10,-30);

+ const ex eps = GiNaC::pow(10,-30);

 

  auto evaluate = [&](const ex& points) {

  for (int deform = -1; deform <= +1; deform += 1) {

------------------------------------------------------------------------------



[3] Then the check stage proceeded as follows


make check


-->


...

...

PASS: exam_paranoia

PASS: exam_heur_gcd

PASS: exam_match

PASS: exam_parser

PASS: exam_numeric

PASS: exam_relational

PASS: exam_powerlaws

PASS: exam_collect

PASS: exam_inifcns

PASS: exam_inifcns_nstdsums

PASS: exam_inifcns_elliptic

../config/test-driver: line 112: 73792 Abort trap: 6           "$@" >> "$log_file" 2>&1

FAIL: exam_Gt

PASS: exam_differentiation

PASS: exam_polygcd

PASS: exam_collect_common_factors

PASS: exam_normalization

PASS: exam_sqrfree

PASS: exam_factor

PASS: exam_pseries

PASS: exam_matrices

PASS: exam_lsolve

PASS: exam_indexed

PASS: exam_color

PASS: exam_clifford

PASS: exam_archive

PASS: exam_structure

PASS: exam_misc

PASS: exam_pgcd

PASS: exam_mod_gcd

PASS: exam_chinrem_gcd

PASS: exam_function_exvector

PASS: exam_real_imag

PASS: check_numeric

PASS: check_inifcns

PASS: check_matrices

PASS: check_lsolve

PASS: check_cra

PASS: time_dennyfliegner

PASS: time_gammaseries

PASS: time_vandermonde

PASS: time_toeplitz

PASS: time_lw_A

PASS: time_lw_B

PASS: time_lw_C

PASS: time_lw_D

PASS: time_lw_E

PASS: time_lw_F

PASS: time_lw_G

PASS: time_lw_H

PASS: time_lw_IJKL

PASS: time_lw_M1

PASS: time_lw_M2

PASS: time_lw_N

PASS: time_lw_O

PASS: time_lw_P

PASS: time_lw_Pprime

PASS: time_lw_Q

PASS: time_lw_Qprime

PASS: time_antipode

PASS: time_fateman_expand

PASS: time_uvar_gcd

PASS: time_Gt

PASS: time_parser

============================================================================

Testsuite summary for GiNaC 1.8.10

============================================================================

# TOTAL: 63

# PASS:  62

# SKIP:  0

# XFAIL: 0

# FAIL:  1

# XPASS: 0

# ERROR: 0

============================================================================

See check/test-suite.log for debugging.

Some test(s) failed.  Please report this to ginac-list@ginac.de,

together with the test-suite.log file (gzipped) and your system

information.  Thanks.

============================================================================



[3] I have investigated the above failure of exam_Gt and found that

in exam_Gt.cpp the code fragment lst{lst{A,B}} is expected to produce

{ { A, B } } but actually produces { A, B } when g++ on my MacOS is used.

Namely, the outside constructor lst in lst{lst{A,B}} is interpreted as

the copy constructor.

Accordingly, I modify lst{lst{A,B}} to lst().append(lst{A,B}) as follows:


cat exam_Gt.cpp.org | sed -e 's/lst{\(lst{[^}]*}\)}/lst().append(\1)/' -e 's/pow(10,-30)/GiNaC::pow(10,-30)/' > exam_Gt.cpp



[4] Now, the check stage becomes successful as follows:


make check


-->


...

...

e_lw_M2

PASS: time_lw_N

PASS: time_lw_O

PASS: time_lw_P

PASS: time_lw_Pprime

PASS: time_lw_Q

PASS: time_lw_Qprime

PASS: time_antipode

PASS: time_fateman_expand

PASS: time_uvar_gcd

PASS: time_Gt

PASS: time_parser

============================================================================

Testsuite summary for GiNaC 1.8.10

============================================================================

# TOTAL: 63

# PASS:  63

# SKIP:  0

# XFAIL: 0

# FAIL:  0

# XPASS: 0

# ERROR: 0

============================================================================


Now, everything is fine.

I do not know what is the most appropriate way to fix the code fragment

lst{lst{A,B}} to produce { { A, B } } and please take the above modification

as just a reference.


Again, thank you very much for developing and maintaining GiNaC

to help us write programs for symbolic commutation.


Sincerely yours,


Satoshi Adachi