janverschelde / PHCpack

The primary source code repository for PHCpack, a software package to solve polynomial systems with homotopy continuation methods.
http://www.phcpack.org
GNU General Public License v3.0
58 stars 21 forks source link

ts_getsys compilation problem #20

Open araven opened 6 years ago

araven commented 6 years ago

On MacOS X, the latest phcpack available from github clone compiles fine with make -f makefile_mac phc (with corrections and proper local directories in the makefile) into the Objects directory

Unfortunately, with make -f makefile_mac ts_getsys I get the following error

gcc -c ../Ada/CtoPHC/Funky/getsys2.c ../Ada/CtoPHC/Funky/getsys2.c:13:8: warning: type defaults to 'int' in declaration of '_ada_getsys3' [-Wimplicit-int] extern _ada_getsys3 ( int n, int m, int moncnt[n], ^~~~ gcc -c ../Ada/CtoPHC/Funky/ts_getsys.c gnatmake -c -I../Ada/System -I../Ada/System/Unix_Timer -I../Ada/Math_Lib/Numbers -I../Ada/Math_Lib/QD -I../Ada/Math_Lib/Vectors -I../Ada/Math_Lib/Matrices -I../Ada/Math_Lib/Divisors -I../Ada/Math_Lib/Reduction -I../Ada/Math_Lib/Polynomials -I../Ada/Math_Lib/Functions -I../Ada/Math_Lib/Supports -I../Ada/Math_Lib/Circuits -I../Ada/Math_Lib/Series -I../Ada/Deformations/Solutions -I../Ada/Deformations/Homotopy -I../Ada/Deformations/Newton -I../Ada/Deformations/Curves -I../Ada/Deformations/End_Games -I../Ada/Deformations/Sweep -I../Ada/Deformations/Trackers -I../Ada/Deformations/Continuation -I../Ada/Root_Counts/Product -I../Ada/Root_Counts/Binomials -I../Ada/Root_Counts/Implift -I../Ada/Root_Counts/Stalift -I../Ada/Root_Counts/Dynlift -I../Ada/Root_Counts/Symmetry -I../Ada/Root_Counts/MixedVol -I../Ada/Root_Counts/Puiseux -I../Ada/Schubert/SAGBI -I../Ada/Schubert/Pieri -I../Ada/Schubert/Induction -I../Ada/Components/Samplers -I../Ada/Components/Interpolators -I../Ada/Components/Factorization -I../Ada/Components/Decomposition -I../Ada/Components/Solver -I../Ada/Components/Tropical -I../Ada/CtoPHC/Funky -I../Ada/CtoPHC/State -I../MPI -I../Ada/PHCtoC -I../Ada/Tasking -I../Ada/Main -gnatv -O3 -gnatp -gnatf --GNATBIND="gnatbind -static" getsys1.adb gcc -c -I./ -I../Ada/System -I../Ada/System/Unix_Timer -I../Ada/Math_Lib/Numbers -I../Ada/Math_Lib/QD -I../Ada/Math_Lib/Vectors -I../Ada/Math_Lib/Matrices -I../Ada/Math_Lib/Divisors -I../Ada/Math_Lib/Reduction -I../Ada/Math_Lib/Polynomials -I../Ada/Math_Lib/Functions -I../Ada/Math_Lib/Supports -I../Ada/Math_Lib/Circuits -I../Ada/Math_Lib/Series -I../Ada/Deformations/Solutions -I../Ada/Deformations/Homotopy -I../Ada/Deformations/Newton -I../Ada/Deformations/Curves -I../Ada/Deformations/End_Games -I../Ada/Deformations/Sweep -I../Ada/Deformations/Trackers -I../Ada/Deformations/Continuation -I../Ada/Root_Counts/Product -I../Ada/Root_Counts/Binomials -I../Ada/Root_Counts/Implift -I../Ada/Root_Counts/Stalift -I../Ada/Root_Counts/Dynlift -I../Ada/Root_Counts/Symmetry -I../Ada/Root_Counts/MixedVol -I../Ada/Root_Counts/Puiseux -I../Ada/Schubert/SAGBI -I../Ada/Schubert/Pieri -I../Ada/Schubert/Induction -I../Ada/Components/Samplers -I../Ada/Components/Interpolators -I../Ada/Components/Factorization -I../Ada/Components/Decomposition -I../Ada/Components/Solver -I../Ada/Components/Tropical -I../Ada/CtoPHC/Funky -I../Ada/CtoPHC/State -I../MPI -I../Ada/PHCtoC -I../Ada/Tasking -I../Ada/Main -gnatv -O3 -gnatp -gnatf -I- /Volumes/Donnees/github.com/PHCpack/src/Ada/CtoPHC/Funky/getsys1.adb

GNAT 7.1.0 Copyright 1992-2017, Free Software Foundation, Inc.

Compiling: /Volumes/Donnees/github.com/PHCpack/src/Ada/CtoPHC/Funky/getsys1.adb Source file time stamp: 2017-12-04 12:47:02 Compiled at: 2017-12-06 13:42:19

24.     m : constant natural := Number_of_Unknowns(p(p'first));
                                |
    >>> expected type "Standard.Integer"
    >>> found type "natural32" defined at standard_natural_numbers.ads:7

64 lines: 2 errors gnatmake: "/Volumes/Donnees/github.com/PHCpack/src/Ada/CtoPHC/Funky/getsys1.adb" compilation error make: *** [ts_getsys] Error 4

Any hint to solve this issue ?

janverschelde commented 6 years ago

Thanks for reporting this problem. I patched the code so the compilation errors with the explicitly declared 32-bit integer types no longer occur in that test procedure. The changed files have been pushed.