← Back to team overview

hugin-bug-hunters team mailing list archive

[Bug 2096612] Re: gcc-15 build error: conflicting types for ‘fcnPano’

 

Hello,
I just tried build HG tip (Changeset: 936) with gcc-15 and got the following error:

[ 35%] Building C object CMakeFiles/pano13.dir/lmdif.c.o
/usr/bin/gcc-15 -D__Ansi__ -Dpano13_EXPORTS -I/home/ametzler/PANO/libpano.hg/libpano -fPIC -MD -MT CMakeFiles/pano13.dir/lmdif.c.o -MF CMakeFiles/pano13.dir/lmdif.c.o.d -o CMakeFiles/pano13.dir/lmdif.c.o -c /home/ametzler/PANO/libpano.hg/libpano/lmdif.c
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c: In function 'qrsolv':
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1225:8: error: conflicting types for 'fabs'; have 'double(void)'
 1225 | double fabs(), sqrt();
      |        ^~~~
In file included from /usr/include/features.h:523,
                 from /usr/include/aarch64-linux-gnu/bits/libc-header-start.h:3,
                 from /usr/include/math.h:27,
                 from /home/ametzler/PANO/libpano.hg/libpano/filter.h:25,
                 from /home/ametzler/PANO/libpano.hg/libpano/lmdif.c:12:
/usr/include/aarch64-linux-gnu/bits/mathcalls.h:195:1: note: previous declaration of 'fabs' with type 'double(double)'
  195 | __MATHCALLX (fabs,, (_Mdouble_ __x), (__const__));
      | ^~~~~~~~~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1225:16: error: conflicting types for 'sqrt'; have 'double(void)'
 1225 | double fabs(), sqrt();
      |                ^~~~
/usr/include/aarch64-linux-gnu/bits/mathcalls.h:176:1: note: previous declaration of 'sqrt' with type 'double(double)'
  176 | __MATHCALL (sqrt,, (_Mdouble_ __x));
      | ^~~~~~~~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1279:12: error: too many arguments to function 'fabs'; expected 0, have 1
 1279 |         if(fabs(r[kk]) < fabs(sdiag[k]))
      |            ^~~~ ~~~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1225:8: note: declared here
 1225 | double fabs(), sqrt();
      |        ^~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1279:26: error: too many arguments to function 'fabs'; expected 0, have 1
 1279 |         if(fabs(r[kk]) < fabs(sdiag[k]))
      |                          ^~~~ ~~~~~~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1225:8: note: declared here
 1225 | double fabs(), sqrt();
      |        ^~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1282:26: error: too many arguments to function 'sqrt'; expected 0, have 1
 1282 |                 sin = p5/sqrt(p25+p25*cotan*cotan);
      |                          ^~~~ ~~~~~~~~~~~~~~~~~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1225:16: note: declared here
 1225 | double fabs(), sqrt();
      |                ^~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1288:26: error: too many arguments to function 'sqrt'; expected 0, have 1
 1288 |                 cos = p5/sqrt(p25+p25*tan*tan);
      |                          ^~~~ ~~~~~~~~~~~~~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1225:16: note: declared here
 1225 | double fabs(), sqrt();
      |                ^~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c: In function 'enorm':
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1431:8: error: too many arguments to function 'fabs'; expected 0, have 1
 1431 | xabs = fabs(x[i]);
      |        ^~~~ ~~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1419:8: note: declared here
 1419 | double fabs(), sqrt();
      |        ^~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1483:21: error: too many arguments to function 'sqrt'; expected 0, have 1
 1483 |         ans = x1max*sqrt(temp);
      |                     ^~~~ ~~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1419:16: note: declared here
 1419 | double fabs(), sqrt();
      |                ^~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1492:15: error: too many arguments to function 'sqrt'; expected 0, have 1
 1492 |         ans = sqrt(temp);
      |               ^~~~ ~~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1419:16: note: declared here
 1419 | double fabs(), sqrt();
      |                ^~~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1496:21: error: too many arguments to function 'sqrt'; expected 0, have 1
 1496 |         ans = x3max*sqrt(s3);
      |                     ^~~~ ~~
/home/ametzler/PANO/libpano.hg/libpano/lmdif.c:1419:16: note: declared here
 1419 | double fabs(), sqrt();
      |                ^~~~
make[2]: *** [CMakeFiles/pano13.dir/build.make:628: CMakeFiles/pano13.dir/lmdif.c.o] Error 1

cu Andreas

-- 
You received this bug notification because you are a member of Hugin Bug
Hunters, which is subscribed to Panotools.
https://bugs.launchpad.net/bugs/2096612

Title:
  gcc-15 build error: conflicting types for ‘fcnPano’

Status in Panotools:
  Fix Committed

Bug description:
  I'm seeing this error building on fedora rawhide with gcc-15.0.1:

  ```
  cd /builddir/build/BUILD/libpano13-2.9.22-build/libpano13-2.9.22/redhat-linux-build/man && /usr/bin/pod2man "--center=LIBPANO13 TOOLS" "--release=Version: 2.9.22" /builddir/build/BUILD/libpano13-2.9.22-build/libpano13-2.9.22/man/PTblender.pod /builddir/build/BUILD/libpano13-2.9.22-build/libpano13-2.9.22/redhat-linux-build/man/PTblender.1
  /builddir/build/BUILD/libpano13-2.9.22-build/libpano13-2.9.22/adjust.c:2448:5: error: conflicting types for ‘fcnPano’; have ‘int(int,  int,  double *, double *, int *)’
   2448 | int fcnPano(int m, int n, double x[], double fvec[], int *iflag)
        |     ^~~~~~~
  In file included from /builddir/build/BUILD/libpano13-2.9.22-build/libpano13-2.9.22/adjust.c:42:
  /builddir/build/BUILD/libpano13-2.9.22-build/libpano13-2.9.22/filter.h:785:33: note: previous declaration of ‘fcnPano’ with type ‘int(void)’
    785 | PANO13_IMPEX int                fcnPano();
        |                                 ^~~~~~~
  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/panotools/+bug/2096612/+subscriptions



References