gwc icon indicating copy to clipboard operation
gwc copied to clipboard

Build fails on Arch Linux

Open AlisterH opened this issue 11 months ago • 1 comments

An Arch user reported he could no longer build:

$ makepkg -se
==> Making package: gwc 0.22_06-1 (Sun 12 Jan 2025 08:21:29 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
(cd meschach ; ./configure --with-sparse ; make part1 ; make part2 ;
make part3 ; cp machine.h ..)
checking for acc
checking for cc
checking how to run the C preprocessor
checking for AIX
checking for minix/config.h
checking for POSIXized ISC
checking for ranlib
checking for memory.h
checking for ANSI C header files
checking for malloc.h
checking for varargs.h
checking for size_t in sys/types.h
checking for working const
checking byte ordering
checking for u_int
computing machine epsilon(s)
cc -o macheps dmacheps.c
cc -o macheps fmacheps.c
computing M_MAX_INT
cc -o maxint maxint.c
checking char \\0 vs. float zeros
checking for bcopy
checking for bzero
checking for function prototypes
creating config.status
creating makefile
creating machine.h
Extensions to basic version: use configure --with-opt1 --with-opt2
   Option:
     --with-complex     incorporate complex functions
     --with-sparse      incorporate sparse matrix functions
     --with-all         both of the above
     --with-unroll      unroll low level loops on vectors
     --with-munroll     unroll low level loops on matrices
     --with-float       single precision
     --with-double      double precision (default)
Re-run configure with these options if you want them
make[1]: Entering directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
cc -c  -DHAVE_CONFIG_H copy.c
copy.c: In function ‘_m_copy’:
copy.c:53:17: error: implicit declaration of function ‘MEM_COPY’; did
you mean ‘MEMCOPY’? [-Wimplicit-function-declaration]
    53 | MEM_COPY(&(in->me[i][j0]),&(out->me[i][j0]),
       |                 ^~~~~~~~
       |                 MEMCOPY
make[1]: *** [makefile:24: copy.o] Error 1
make[1]: Leaving directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
make[1]: Entering directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
cc -c  -DHAVE_CONFIG_H lufactor.c
In file included from matrix.h:38,
                  from lufactor.c:36:
lufactor.c: In function ‘m_inverse’:
err.h:172:17: error: implicit declaration of function ‘MEM_COPY’; did
you mean ‘MEMCOPY’? [-Wimplicit-function-declaration]
   172 |                 MEM_COPY(restart,_save,sizeof(jmp_buf)); \
       |                 ^~~~~~~~
lufactor.c:222:9: note: in expansion of macro ‘tracecatch’
   222 |         tracecatch(LUfactor(A_cp,pivot),"m_inverse");
       |         ^~~~~~~~~~
make[1]: *** [makefile:24: lufactor.o] Error 1
make[1]: Leaving directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
make[1]: Entering directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
cc -c  -DHAVE_CONFIG_H sparse.c
sparse.c: In function ‘sp_set_val’:
sparse.c:112:9: error: implicit declaration of function ‘MEM_COPY’; did
you mean ‘MEMCOPY’? [-Wimplicit-function-declaration]
   112 |         MEM_COPY((char *)(&(r->elt[idx2])),
       |         ^~~~~~~~
       |         MEMCOPY
make[1]: *** [makefile:24: sparse.o] Error 1
make[1]: Leaving directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
cp meschach/meschach.a .
cp: cannot stat 'meschach/meschach.a': No such file or directory
make: *** [Makefile:780: meschach.a] Error 1
(cd meschach ; ./configure --with-sparse ; make part1 ; make part2 ;
make part3 ; cp machine.h ..)
checking for acc
checking for cc
checking how to run the C preprocessor
checking for AIX
checking for minix/config.h
checking for POSIXized ISC
checking for ranlib
checking for memory.h
checking for ANSI C header files
checking for malloc.h
checking for varargs.h
checking for size_t in sys/types.h
checking for working const
checking byte ordering
checking for u_int
computing machine epsilon(s)
cc -o macheps dmacheps.c
cc -o macheps fmacheps.c
computing M_MAX_INT
cc -o maxint maxint.c
checking char \\0 vs. float zeros
checking for bcopy
checking for bzero
checking for function prototypes
creating config.status
creating makefile
creating machine.h
Extensions to basic version: use configure --with-opt1 --with-opt2
   Option:
     --with-complex     incorporate complex functions
     --with-sparse      incorporate sparse matrix functions
     --with-all         both of the above
     --with-unroll      unroll low level loops on vectors
     --with-munroll     unroll low level loops on matrices
     --with-float       single precision
     --with-double      double precision (default)
Re-run configure with these options if you want them
make[1]: Entering directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
cc -c  -DHAVE_CONFIG_H copy.c
copy.c: In function ‘_m_copy’:
copy.c:53:17: error: implicit declaration of function ‘MEM_COPY’; did
you mean ‘MEMCOPY’? [-Wimplicit-function-declaration]
    53 | MEM_COPY(&(in->me[i][j0]),&(out->me[i][j0]),
       |                 ^~~~~~~~
       |                 MEMCOPY
make[1]: *** [makefile:24: copy.o] Error 1
make[1]: Leaving directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
make[1]: Entering directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
cc -c  -DHAVE_CONFIG_H lufactor.c
In file included from matrix.h:38,
                  from lufactor.c:36:
lufactor.c: In function ‘m_inverse’:
err.h:172:17: error: implicit declaration of function ‘MEM_COPY’; did
you mean ‘MEMCOPY’? [-Wimplicit-function-declaration]
   172 |                 MEM_COPY(restart,_save,sizeof(jmp_buf)); \
       |                 ^~~~~~~~
lufactor.c:222:9: note: in expansion of macro ‘tracecatch’
   222 |         tracecatch(LUfactor(A_cp,pivot),"m_inverse");
       |         ^~~~~~~~~~
make[1]: *** [makefile:24: lufactor.o] Error 1
make[1]: Leaving directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
make[1]: Entering directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
cc -c  -DHAVE_CONFIG_H sparse.c
sparse.c: In function ‘sp_set_val’:
sparse.c:112:9: error: implicit declaration of function ‘MEM_COPY’; did
you mean ‘MEMCOPY’? [-Wimplicit-function-declaration]
   112 |         MEM_COPY((char *)(&(r->elt[idx2])),
       |         ^~~~~~~~
       |         MEMCOPY
make[1]: *** [makefile:24: sparse.o] Error 1
make[1]: Leaving directory
'/home/ted/temp/gwc/src/gtk-wave-cleaner-0.22-06/meschach'
cp meschach/meschach.a .
cp: cannot stat 'meschach/meschach.a': No such file or directory
make: *** [Makefile:780: meschach.a] Error 1
==> ERROR: A failure occurred in build().
     Aborting...

I figured out a way to build this (dirty but it works): There are three patches for this package in the Fedora project, which can be snatched from the source rpm. The patches are credited to a "Yann Collette" These are the patches that have to be applied to the sources: gwc-0001-fix-implicite-declaration.patch gwc-0002-fix-makefile.patch gwc-0003-fix-initialization.patch

Also, configure needs CLFAGS="-Wno-incompatible-pointer-types"

The patches are at https://copr-dist-git.fedorainfracloud.org/cgit/ycollet/audinux/gtk-wave-cleaner.git/tree/

AlisterH avatar Jan 14 '25 06:01 AlisterH

If anyone knows why people are suddenly encountering these meschach build errors I'd be keen to know - presumably either the build tools or distro configurations (e.g. environment variables) have changed.

AlisterH avatar Jan 14 '25 06:01 AlisterH

I have the same kind of problem on Fedora 42. The problem here was triggered by the use of gcc-15 for the compilation of gwc. It looks like some more checks are performed on headers by gcc-15. Here are some new errors spotted by gcc:

matrixio.c: In function ‘m_finput’:
matrixio.c:92:18: error: too many arguments to function ‘im_finput’; expected 0, have 2
   92 |           return im_finput(fp,a);
      |                  ^~~~~~~~~ ~~
matrixio.c:89:18: note: declared here
   89 |      MAT        *im_finput(),*bm_finput();
      |                  ^~~~~~~~~
matrixio.c:94:18: error: too many arguments to function ‘bm_finput’; expected 0, have 2
   94 |           return bm_finput(fp,a);
      |                  ^~~~~~~~~ ~~
matrixio.c:89:31: note: declared here
   89 |      MAT        *im_finput(),*bm_finput();
      |                               ^~~~~~~~~
matrixio.c: At top level:
matrixio.c:103:10: error: conflicting types for ‘im_finput’; have ‘MAT *(FILE *, MAT *)’
  103 | MAT     *im_finput(FILE *fp,MAT *mat)
      |          ^~~~~~~~~
matrixio.c:89:18: note: previous declaration of ‘im_finput’ with type ‘MAT *(void)’
   89 |      MAT        *im_finput(),*bm_finput();
      |                  ^~~~~~~~~
matrixio.c:169:10: error: conflicting types for ‘bm_finput’; have ‘MAT *(FILE *, MAT *)’
  169 | MAT     *bm_finput(FILE *fp,MAT *mat)
      |          ^~~~~~~~~
matrixio.c:89:31: note: previous declaration of ‘bm_finput’ with type ‘MAT *(void)’
   89 |      MAT        *im_finput(),*bm_finput();
      |                               ^~~~~~~~~
matrixio.c: In function ‘px_finput’:
matrixio.c:219:18: error: too many arguments to function ‘ipx_finput’; expected 0, have 2
  219 |           return ipx_finput(fp,px);
      |                  ^~~~~~~~~~ ~~
matrixio.c:216:18: note: declared here
  216 |      PERM       *ipx_finput(),*bpx_finput();
      |                  ^~~~~~~~~~
matrixio.c:221:18: error: too many arguments to function ‘bpx_finput’; expected 0, have 2
  221 |           return bpx_finput(fp,px);
      |                  ^~~~~~~~~~ ~~
matrixio.c:216:32: note: declared here
  216 |      PERM       *ipx_finput(),*bpx_finput();
      |                                ^~~~~~~~~~
matrixio.c: At top level:
matrixio.c:231:10: error: conflicting types for ‘ipx_finput’; have ‘PERM *(FILE *, PERM *)’
  231 | PERM    *ipx_finput(FILE *fp,PERM *px)
      |          ^~~~~~~~~~
matrixio.c:216:18: note: previous declaration of ‘ipx_finput’ with type ‘PERM *(void)’
  216 |      PERM       *ipx_finput(),*bpx_finput();
      |                  ^~~~~~~~~~
matrixio.c:289:10: error: conflicting types for ‘bpx_finput’; have ‘PERM *(FILE *, PERM *)’
  289 | PERM    *bpx_finput(FILE *fp,PERM *px)
      |          ^~~~~~~~~~
matrixio.c:216:32: note: previous declaration of ‘bpx_finput’ with type ‘PERM *(void)’
  216 |      PERM       *ipx_finput(),*bpx_finput();
      |                                ^~~~~~~~~~
matrixio.c: In function ‘v_finput’:
matrixio.c:345:18: error: too many arguments to function ‘ifin_vec’; expected 0, have 2
  345 |           return ifin_vec(fp,x);
      |                  ^~~~~~~~ ~~
matrixio.c:342:18: note: declared here
  342 |      VEC        *ifin_vec(),*bfin_vec();
      |                  ^~~~~~~~
matrixio.c:347:18: error: too many arguments to function ‘bfin_vec’; expected 0, have 2
  347 |           return bfin_vec(fp,x);
      |                  ^~~~~~~~ ~~
matrixio.c:342:30: note: declared here
  342 |      VEC        *ifin_vec(),*bfin_vec();
      |                              ^~~~~~~~
matrixio.c: At top level:
matrixio.c:356:10: error: conflicting types for ‘ifin_vec’; have ‘VEC *(FILE *, VEC *)’
  356 | VEC     *ifin_vec(FILE *fp,VEC *vec)
      |          ^~~~~~~~
matrixio.c:342:18: note: previous declaration of ‘ifin_vec’ with type ‘VEC *(void)’
  342 |      VEC        *ifin_vec(),*bfin_vec();
      |                  ^~~~~~~~
matrixio.c:405:10: error: conflicting types for ‘bfin_vec’; have ‘VEC *(FILE *, VEC *)’
  405 | VEC     *bfin_vec(FILE *fp,VEC *vec)
      |          ^~~~~~~~
matrixio.c:342:30: note: previous declaration of ‘bfin_vec’ with type ‘VEC *(void)’
  342 |      VEC        *ifin_vec(),*bfin_vec();
      |                              ^~~~~~~~
matrixio.c: In function ‘iv_finput’:
matrixio.c:662:13: error: too many arguments to function ‘iiv_finput’; expected 0, have 2
  662 |      return iiv_finput(fp,x);
      |             ^~~~~~~~~~ ~~
matrixio.c:659:10: note: declared here
  659 |    IVEC *iiv_finput(),*biv_finput();
      |          ^~~~~~~~~~
matrixio.c:664:13: error: too many arguments to function ‘biv_finput’; expected 0, have 2
  664 |      return biv_finput(fp,x);
      |             ^~~~~~~~~~ ~~
matrixio.c:659:24: note: declared here
  659 |    IVEC *iiv_finput(),*biv_finput();
      |                        ^~~~~~~~~~
matrixio.c: At top level:
matrixio.c:673:10: error: conflicting types for ‘iiv_finput’; have ‘IVEC *(FILE *, IVEC *)’
  673 | IVEC    *iiv_finput(FILE *fp, IVEC *iv)
      |          ^~~~~~~~~~
matrixio.c:659:10: note: previous declaration of ‘iiv_finput’ with type ‘IVEC *(void)’
  659 |    IVEC *iiv_finput(),*biv_finput();
      |          ^~~~~~~~~~
matrixio.c:718:10: error: conflicting types for ‘biv_finput’; have ‘IVEC *(FILE *, IVEC *)’
  718 | IVEC    *biv_finput(FILE *fp, IVEC *iv)
      |          ^~~~~~~~~~
matrixio.c:659:24: note: previous declaration of ‘biv_finput’ with type ‘IVEC *(void)’
  659 |    IVEC *iiv_finput(),*biv_finput();
      |                        ^~~~~~~~~~
matrixio.c: In function ‘im_finput’:
matrixio.c:150:11: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  150 |           fscanf(fp,"%c",&c);
      |           ^~~~~~~~~~~~~~~~~~
make[1]: *** [makefile:23: matrixio.o] Error 1
In file included from err.h:37,
                 from matrix.h:38,
                 from zmatrix.h:32,
                 from zmachine.c:37:
MACHINES/Linux/machine.h:143:9: warning: ‘MACHEPS’ redefined
  143 | #define MACHEPS DBL_EPSILON
      |         ^~~~~~~
In file included from zmachine.c:36:
machine.h:186:9: note: this is the location of the previous definition
  186 | #define MACHEPS D_MACHEPS
      |         ^~~~~~~
In file included from err.h:37,
                 from matrix.h:38,
                 from zmatrix.h:32,
                 from zcopy.c:28:
MACHINES/Linux/machine.h:143:9: warning: ‘MACHEPS’ redefined
  143 | #define MACHEPS DBL_EPSILON
      |         ^~~~~~~
In file included from matrix.h:37:
machine.h:186:9: note: this is the location of the previous definition
  186 | #define MACHEPS D_MACHEPS
      |         ^~~~~~~
zcopy.c: In function ‘zvm_move’:
zcopy.c:201:17: warning: variable ‘dim0’ set but not used [-Wunused-but-set-variable]
  201 |     int         dim0, i;
      |                 ^~~~
In file included from err.h:37,
                 from matrix.h:38,
                 from zmatrix.h:32,
                 from zmatio.c:30:
MACHINES/Linux/machine.h:143:9: warning: ‘MACHEPS’ redefined
  143 | #define MACHEPS DBL_EPSILON
      |         ^~~~~~~
In file included from matrix.h:37:
machine.h:186:9: note: this is the location of the previous definition
  186 | #define MACHEPS D_MACHEPS
      |         ^~~~~~~
zmatio.c: In function ‘zm_finput’:
zmatio.c:89:18: error: too many arguments to function ‘izm_finput’; expected 0, have 2
   89 |           return izm_finput(fp,a);
      |                  ^~~~~~~~~~ ~~
zmatio.c:86:19: note: declared here
   86 |      ZMAT        *izm_finput(),*bzm_finput();
      |                   ^~~~~~~~~~
zmatio.c:91:18: error: too many arguments to function ‘bzm_finput’; expected 0, have 2
   91 |           return bzm_finput(fp,a);
      |                  ^~~~~~~~~~ ~~
zmatio.c:86:33: note: declared here
   86 |      ZMAT        *izm_finput(),*bzm_finput();
      |                                 ^~~~~~~~~~
zmatio.c: At top level:
zmatio.c:100:11: error: conflicting types for ‘izm_finput’; have ‘ZMAT *(FILE *, ZMAT *)’
  100 | ZMAT     *izm_finput(FILE *fp, ZMAT *mat)
      |           ^~~~~~~~~~
zmatio.c:86:19: note: previous declaration of ‘izm_finput’ with type ‘ZMAT *(void)’
   86 |      ZMAT        *izm_finput(),*bzm_finput();
      |                   ^~~~~~~~~~
zmatio.c:168:11: error: conflicting types for ‘bzm_finput’; have ‘ZMAT *(FILE *, ZMAT *)’
  168 | ZMAT     *bzm_finput(FILE *fp,ZMAT *mat)
      |           ^~~~~~~~~~
zmatio.c:86:33: note: previous declaration of ‘bzm_finput’ with type ‘ZMAT *(void)’
   86 |      ZMAT        *izm_finput(),*bzm_finput();
      |                                 ^~~~~~~~~~
zmatio.c: In function ‘zv_finput’:
zmatio.c:217:18: error: too many arguments to function ‘izv_finput’; expected 0, have 2
  217 |           return izv_finput(fp,x);
      |                  ^~~~~~~~~~ ~~
zmatio.c:214:19: note: declared here
  214 |      ZVEC        *izv_finput(),*bzv_finput();
      |                   ^~~~~~~~~~
zmatio.c:219:18: error: too many arguments to function ‘bzv_finput’; expected 0, have 2
  219 |           return bzv_finput(fp,x);
      |                  ^~~~~~~~~~ ~~
zmatio.c:214:33: note: declared here
  214 |      ZVEC        *izv_finput(),*bzv_finput();
      |                                 ^~~~~~~~~~
zmatio.c: At top level:
zmatio.c:228:11: error: conflicting types for ‘izv_finput’; have ‘ZVEC *(FILE *, ZVEC *)’
  228 | ZVEC     *izv_finput(FILE *fp,ZVEC *vec)
      |           ^~~~~~~~~~
zmatio.c:214:19: note: previous declaration of ‘izv_finput’ with type ‘ZVEC *(void)’
  214 |      ZVEC        *izv_finput(),*bzv_finput();
      |                   ^~~~~~~~~~
zmatio.c:280:11: error: conflicting types for ‘bzv_finput’; have ‘ZVEC *(FILE *, ZVEC *)’
  280 | ZVEC     *bzv_finput(FILE *fp, ZVEC *vec)
      |           ^~~~~~~~~~
zmatio.c:214:33: note: previous declaration of ‘bzv_finput’ with type ‘ZVEC *(void)’
  214 |      ZVEC        *izv_finput(),*bzv_finput();
      |                                 ^~~~~~~~~~
zmatio.c: In function ‘izm_finput’:
zmatio.c:149:11: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  149 |           fscanf(fp,"%c",&c);
      |           ^~~~~~~~~~~~~~~~~~
make[1]: *** [makefile:23: zmatio.o] Error 1
In file included from err.h:37,
                 from matrix.h:38,
                 from lufactor.c:36:
MACHINES/Linux/machine.h:143:9: warning: ‘MACHEPS’ redefined
  143 | #define MACHEPS DBL_EPSILON
      |         ^~~~~~~
In file included from lufactor.c:35:
machine.h:186:9: note: this is the location of the previous definition
  186 | #define MACHEPS D_MACHEPS
      |         ^~~~~~~
In file included from err.h:37,
                 from matrix.h:38,
                 from chfactor.c:35:
MACHINES/Linux/machine.h:143:9: warning: ‘MACHEPS’ redefined
  143 | #define MACHEPS DBL_EPSILON
      |         ^~~~~~~
In file included from matrix.h:37:
machine.h:186:9: note: this is the location of the previous definition
  186 | #define MACHEPS D_MACHEPS
      |         ^~~~~~~
In file included from err.h:37,
                 from matrix.h:38,
                 from bkpfacto.c:34:
MACHINES/Linux/machine.h:143:9: warning: ‘MACHEPS’ redefined
  143 | #define MACHEPS DBL_EPSILON
      |         ^~~~~~~
In file included from matrix.h:37:
machine.h:186:9: note: this is the location of the previous definition
  186 | #define MACHEPS D_MACHEPS
      |         ^~~~~~~
bkpfacto.c: In function ‘sqr’:
bkpfacto.c:44:9: warning: old-style function definition [-Wold-style-definition]
   44 | double  sqr(x)
      |         ^~~
bkpfacto.c: In function ‘interchange’:
bkpfacto.c:49:13: warning: old-style function definition [-Wold-style-definition]
   49 | static void interchange(A,i,j)
      |             ^~~~~~~~~~~
bkpfacto.c:53:19: warning: variable ‘A_me’ set but not used [-Wunused-but-set-variable]
   53 |         Real    **A_me, tmp;
      |                   ^~~~
bkpfacto.c: In function ‘BKPfactor’:
bkpfacto.c:110:19: warning: variable ‘A_me’ set but not used [-Wunused-but-set-variable]
  110 |         Real    **A_me, aii, aip1, aip1i, lambda, sigma, tmp;
      |                   ^~~~
bkpfacto.c: In function ‘BKPsolve’:
bkpfacto.c:242:59: warning: variable ‘tmp_ve’ set but not used [-Wunused-but-set-variable]
  242 |         Real    **A_me, a11, a12, a22, b1, b2, det, sum, *tmp_ve, tmp_diag;
      |                                                           ^~~~~~
bkpfacto.c:242:19: warning: variable ‘A_me’ set but not used [-Wunused-but-set-variable]
  242 |         Real    **A_me, a11, a12, a22, b1, b2, det, sum, *tmp_ve, tmp_diag;
      |                   ^~~~
In file included from err.h:37,
                 from matrix.h:38,
                 from matrix2.h:35,
                 from qrfactor.c:44:
MACHINES/Linux/machine.h:143:9: warning: ‘MACHEPS’ redefined
  143 | #define MACHEPS DBL_EPSILON
      |         ^~~~~~~
In file included from matrix.h:37:
machine.h:186:9: note: this is the location of the previous definition
  186 | #define MACHEPS D_MACHEPS
      |         ^~~~~~~
qrfactor.c:52:18: error: conflicting types for ‘Usolve’; have ‘VEC *(void)’
   52 | extern  VEC     *Usolve();      /* See matrix2.h */
      |                  ^~~~~~
matrix2.h:161:18: note: previous declaration of ‘Usolve’ with type ‘VEC *(MAT *, VEC *, VEC *, double)’
  161 |                 *Usolve(const MAT *A,const VEC *b,VEC *x,double diag_val),
      |                  ^~~~~~
qrfactor.c: In function ‘QRsolve’:
qrfactor.c:346:9: error: too many arguments to function ‘Usolve’; expected 0, have 4
  346 |     x = Usolve(QR,x,x,0.0);
      |         ^~~~~~ ~~
qrfactor.c:52:18: note: declared here
   52 | extern  VEC     *Usolve();      /* See matrix2.h */
      |                  ^~~~~~
qrfactor.c: In function ‘QRcondest’:
qrfactor.c:548:9: error: too many arguments to function ‘Usolve’; expected 0, have 4
  548 |         Usolve(QR,y,y,0.0);
      |         ^~~~~~ ~~
qrfactor.c:52:18: note: declared here
   52 | extern  VEC     *Usolve();      /* See matrix2.h */
      |                  ^~~~~~
make[1]: *** [makefile:23: qrfactor.o] Error 1
make[1]: *** Waiting for unfinished jobs....
sparse.c: In function ‘sp_set_val’:
sparse.c:106:17: warning: operation on ‘r->elt’ may be undefined [-Wsequence-point]
  106 |          r->elt = RENEW(r->elt,new_len,row_elt);
sparse.c: In function ‘sp_mv_mlt’:
sparse.c:138:22: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
  138 |    int  i, j_idx, m, n, max_idx;
      |                      ^
sparse.c: In function ‘sp_vm_mlt’:
sparse.c:178:22: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
  178 |    int  i, j_idx, m, n, max_idx;
      |                      ^
sparse.c: In function ‘sp_copy2’:
sparse.c:754:16: warning: operation on ‘OUT->row’ may be undefined [-Wsequence-point]
  754 |       OUT->row = RENEW(OUT->row,A->m,SPROW);
sparse.c: In function ‘sp_resize’:
sparse.c:840:14: warning: operation on ‘A->row’ may be undefined [-Wsequence-point]
  840 |       A->row = RENEW(A->row,(unsigned)m,SPROW);
sparse.c:867:20: warning: operation on ‘A->start_row’ may be undefined [-Wsequence-point]
  867 |       A->start_row = RENEW(A->start_row,(unsigned)n,int);
sparse.c:868:20: warning: operation on ‘A->start_idx’ may be undefined [-Wsequence-point]
  868 |       A->start_idx = RENEW(A->start_idx,(unsigned)n,int);
sparse.c: In function ‘sp_mlt’:
sparse.c:938:17: warning: unused variable ‘k’ [-Wunused-variable]
  938 |   int     i, j, k, idx, cp;
      |                 ^
sparse.c: In function ‘sp_get_vars’:
sparse.c:995:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  995 |    while (par = va_arg(ap,SPMAT **)) {   /* NULL ends the list*/
      |           ^~~
sparse.c: In function ‘sp_resize_vars’:
sparse.c:1025:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
 1025 |    while (par = va_arg(ap,SPMAT **)) {   /* NULL ends the list*/
      |           ^~~
sparse.c: In function ‘sp_free_vars’:
sparse.c:1054:11: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
 1054 |    while (par = va_arg(ap,SPMAT **)) {   /* NULL ends the list*/
      |           ^~~
sprow.c: In function ‘sprow_xpd’:
sprow.c:217:14: warning: operation on ‘r->elt’ may be undefined [-Wsequence-point]
  217 |       r->elt = RENEW(r->elt,newlen,row_elt);
sprow.c: In function ‘sprow_resize’:
sprow.c:267:14: warning: operation on ‘r->elt’ may be undefined [-Wsequence-point]
  267 |       r->elt = RENEW(r->elt,n,row_elt);
sprow.c: In function ‘sprow_set_val’:
sprow.c:751:17: warning: operation on ‘r->elt’ may be undefined [-Wsequence-point]
  751 |          r->elt = RENEW(r->elt,new_len,row_elt);
sparseio.c: In function ‘sp_finput’:
sparseio.c:247:35: warning: operation on ‘scratch’ may be undefined [-Wsequence-point]
  247 |                           scratch = RENEW(scratch,2*scratch_len,row_elt);
sparseio.c:325:35: warning: operation on ‘scratch’ may be undefined [-Wsequence-point]
  325 |                           scratch = RENEW(scratch,2*scratch_len,row_elt);
sparseio.c:297:17: warning: ignoring return value of ‘fscanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  297 |                 fscanf(fp,"SparseMatrix:");
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from err.h:37,
                 from matrix.h:38,
                 from sparse.h:39,
                 from sparse2.h:36,
                 from spchfctr.c:36:
MACHINES/Linux/machine.h:143:9: warning: ‘MACHEPS’ redefined
  143 | #define MACHEPS DBL_EPSILON
      |         ^~~~~~~
In file included from matrix.h:37:
machine.h:186:9: note: this is the location of the previous definition
  186 | #define MACHEPS D_MACHEPS
      |         ^~~~~~~
spchfctr.c: In function ‘spICHfactor’:
spchfctr.c:408:23: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
  408 |         int     k, m, n, nxt_row, nxt_idx, diag_idx;
      |                       ^
splufctr.c: In function ‘spILUfactor’:
splufctr.c:329:37: warning: variable ‘m’ set but not used [-Wunused-but-set-variable]
  329 |     int         i, k, idx, idx_piv, m, n, old_idx, old_idx_piv;
      |                                     ^
In file included from err.h:37,
                 from matrix.h:38,
                 from sparse.h:39,
                 from sparse2.h:36,
                 from spswap.c:36:
MACHINES/Linux/machine.h:143:9: warning: ‘MACHEPS’ redefined
  143 | #define MACHEPS DBL_EPSILON
      |         ^~~~~~~
In file included from matrix.h:37:
machine.h:186:9: note: this is the location of the previous definition
  186 | #define MACHEPS D_MACHEPS
      |         ^~~~~~~
spswap.c: In function ‘chase_col’:
spswap.c:153:18: warning: ‘e’ may be used uninitialized [-Wmaybe-uninitialized]
  153 |     row_elt     *e;
      |                  ^
In file included from err.h:37,
                 from matrix.h:38,
                 from itersym.c:38:
MACHINES/Linux/machine.h:143:9: warning: ‘MACHEPS’ redefined
  143 | #define MACHEPS DBL_EPSILON
      |         ^~~~~~~
In file included from itersym.c:37:
machine.h:186:9: note: this is the location of the previous definition
  186 | #define MACHEPS D_MACHEPS
      |         ^~~~~~~
itersym.c: In function ‘iter_cg’:
itersym.c:157:21: error: too many arguments to function ‘ip->info’; expected 0, have 4
  157 |       if (ip->info) ip->info(ip,nres,r,rr);
      |                     ^~       ~~
In file included from itersym.c:41:
iter.h:95:11: note: declared here
   95 |    void (*info)();
      |           ^~~~
itersym.c:159:12: error: too many arguments to function ‘ip->stop_crit’; expected 0, have 4
  159 |       if ( ip->stop_crit(ip,nres,r,rr) ) break;
      |            ^~            ~~
iter.h:96:11: note: declared here
   96 |    int  (*stop_crit)();
      |           ^~~~~~~~~
itersym.c: In function ‘iter_cg1’:
itersym.c:606:18: error: too many arguments to function ‘ip->info’; expected 0, have 4
  606 |    if (ip->info) ip->info(ip,nres,r,p);
      |                  ^~       ~~
iter.h:95:11: note: declared here
   95 |    void (*info)();
      |           ^~~~
itersym.c:632:21: error: too many arguments to function ‘ip->info’; expected 0, have 4
  632 |       if (ip->info) ip->info(ip,nres,r,z);
      |                     ^~       ~~
iter.h:95:11: note: declared here
   95 |    void (*info)();
      |           ^~~~
itersym.c:634:12: error: too many arguments to function ‘ip->stop_crit’; expected 0, have 4
  634 |       if ( ip->stop_crit(ip,nres,r,z) ) break;
      |            ^~            ~~
iter.h:96:11: note: declared here
   96 |    int  (*stop_crit)();
      |           ^~~~~~~~~
make[1]: *** [makefile:23: itersym.o] Error 1
make[1]: *** Waiting for unfinished jobs....

ycollet avatar May 12 '25 19:05 ycollet

It isn't just due to this?:

C23 by default: GCC 15 changes the default language version for C compilation from -std=gnu17 to -std=gnu23. If your code relies on older versions of the C standard, you will need to either add -std= to your build flags, or port your code; see the porting notes.

AlisterH avatar May 13 '25 03:05 AlisterH

Fixing the gcc 14 errors is fairly simple - for example on Nixos

  env.NIX_CFLAGS_COMPILE = toString [
    "-Wno-error=implicit-function-declaration"
    "-Wno-error=implicit-int"
    "-Wno-error=incompatible-pointer-types"
  ];

If you're building manually on a normal distro I think you would just need to use make CFLAGS="-Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types"

For some reason I can't easily try gcc15 in my nixos channel yet, so I'll come back to that.

AlisterH avatar Jun 04 '25 10:06 AlisterH

For the gcc 15 errors try adding something like -std=gnu17 to the CFLAGS.

AlisterH avatar Jun 04 '25 11:06 AlisterH

Still not compiling... Used gcc 15.1.1 and CFLAGS="-Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -std=gnu17" .

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SNDFILE... yes
checking for PULSEAUDIO... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... none
checking for cos in -lm... yes
checking for ogg... disabled
checking for mp3... disabled
checking for ALSA... yes
checking Pulse Audio enabled... no
checking for fftw_plan_r2r_1d in -lfftw3... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking sndfile.h usability... yes
checking sndfile.h presence... yes
checking for sndfile.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking for GTK... yes
checking whether gcc needs -traditional... no
checking return type of signal handlers... void
checking for vprintf... yes
checking for _doprnt... no
checking for gettimeofday... yes
checking for Mac OS X platform... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: executing depfiles commands
==> Removendo diretório $pkgdir/ existente...
==> Iniciando build()...
gcc -DDATADIR=\"/usr/share\" -DHELPDIR=\"/usr/share/doc\" -DLIBDIR=\"/usr/lib\" -DAPPNAME=\"gtk-wave-cleaner\"  -DHAVE_ALSA  -DHAVE_FFTW3 -DFFTWPREC=2     -D_FILE_OFFSET_BITS=64 -Wall -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -std=gnu17 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/opus -c gwc.c
gcc -DDATADIR=\"/usr/share\" -DHELPDIR=\"/usr/share/doc\" -DLIBDIR=\"/usr/lib\" -DAPPNAME=\"gtk-wave-cleaner\"  -DHAVE_ALSA  -DHAVE_FFTW3 -DFFTWPREC=2     -D_FILE_OFFSET_BITS=64 -Wall -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -std=gnu17 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/opus -c audio_device.c
gcc -DDATADIR=\"/usr/share\" -DHELPDIR=\"/usr/share/doc\" -DLIBDIR=\"/usr/lib\" -DAPPNAME=\"gtk-wave-cleaner\"  -DHAVE_ALSA  -DHAVE_FFTW3 -DFFTWPREC=2     -D_FILE_OFFSET_BITS=64 -Wall -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -std=gnu17 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/opus -c audio_util.c
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
                 from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:33,
                 from audio_util.c:44:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: warning: ‘GTypeDebugFlags’ is deprecated [-Wdeprecated-declarations]
  236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);
      | ^~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:26,
                 from /usr/include/glib-2.0/gobject/gbinding.h:31,
                 from /usr/include/glib-2.0/glib-object.h:24,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32:
/usr/include/glib-2.0/gobject/gtype.h:725:1: note: declared here
  725 | {
      | ^
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
                 from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:33,
                 from gwc.h:27,
                 from gwc.c:35:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: warning: ‘GTypeDebugFlags’ is deprecated [-Wdeprecated-declarations]
  236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);
      | ^~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:26,
                 from /usr/include/glib-2.0/gobject/gbinding.h:31,
                 from /usr/include/glib-2.0/glib-object.h:24,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32:
/usr/include/glib-2.0/gobject/gtype.h:725:1: note: declared here
  725 | {
      | ^
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
                 from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:33,
                 from gwc.h:27,
                 from audio_alsa.c:32,
                 from audio_device.c:23:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: warning: ‘GTypeDebugFlags’ is deprecated [-Wdeprecated-declarations]
  236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);
      | ^~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:26,
                 from /usr/include/glib-2.0/gobject/gbinding.h:31,
                 from /usr/include/glib-2.0/glib-object.h:24,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32:
/usr/include/glib-2.0/gobject/gtype.h:725:1: note: declared here
  725 | {
      | ^
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
                 from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtk.h:126:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
   73 |   GTimeVal last_popdown;
      |   ^~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:34,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/glib-2.0/gobject/gbinding.h:30:
/usr/include/glib-2.0/glib/gtypes.h:580:8: note: declared here
  580 | struct _GTimeVal
      |        ^~~~~~~~~
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
                 from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtk.h:126:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
   73 |   GTimeVal last_popdown;
      |   ^~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:34,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/glib-2.0/gobject/gbinding.h:30:
/usr/include/glib-2.0/glib/gtypes.h:580:8: note: declared here
  580 | struct _GTimeVal
      |        ^~~~~~~~~
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
                 from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtk.h:126:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
   73 |   GTimeVal last_popdown;
      |   ^~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:34,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/glib-2.0/gobject/gbinding.h:30:
/usr/include/glib-2.0/glib/gtypes.h:580:8: note: declared here
  580 | struct _GTimeVal
      |        ^~~~~~~~~
audio_util.c: In function ‘save_selection_as_wavfile’:
audio_util.c:532:10: warning: unused variable ‘total_bytes’ [-Wunused-variable]
  532 |     long total_bytes ;
      |          ^~~~~~~~~~~
audio_util.c:529:13: warning: unused variable ‘sfinfo_new’ [-Wunused-variable]
  529 |     SF_INFO sfinfo_new ;
      |             ^~~~~~~~~~
audio_util.c:528:14: warning: unused variable ‘sndfile_new’ [-Wunused-variable]
  528 |     SNDFILE *sndfile_new ;
      |              ^~~~~~~~~~~
audio_util.c: In function ‘read_raw_wavefile_data’:
audio_util.c:837:9: warning: unused variable ‘bufsize’ [-Wunused-variable]
  837 |     int bufsize = n * FRAMESIZE ;
      |         ^~~~~~~
audio_alsa.c: In function ‘audio_device_set_params’:
audio_alsa.c:156:48: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  156 |     fprintf(stderr, "audio_device_handle %d\n",(int)handle);
      |                                                ^
audio_alsa.c: In function ‘audio_device_write’:
audio_alsa.c:209:79: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  209 |                 fprintf(stderr, "snd_pcm_writei invalid argument: %d %d %d\n",(int)handle,(int)data,(int)count_frames);
      |                                                                               ^
audio_alsa.c:209:91: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  209 |                 fprintf(stderr, "snd_pcm_writei invalid argument: %d %d %d\n",(int)handle,(int)data,(int)count_frames);
      |                                                                                           ^
audio_alsa.c:212:65: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  212 |                 fprintf(stderr, "audio_device_write %d %d %d\n",(int)handle,(int)data,(int)count_frames);
      |                                                                 ^
audio_alsa.c:212:77: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  212 |                 fprintf(stderr, "audio_device_write %d %d %d\n",(int)handle,(int)data,(int)count_frames);
      |                                                                             ^
gwc.c: In function ‘split_audio_on_markers’:
gwc.c:1617:31: warning: comparison with string literal results in unspecified behavior [-Waddress]
 1617 |             if (file_extension=="") {
      |                               ^~
gwc.c:1640:45: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
 1640 |                 printf("Save as wavfile %s %d->%d\n", filename, first_sample, last_sample) ;
      |                                            ~^                   ~~~~~~~~~~~~
      |                                             |                   |
      |                                             int                 long int
      |                                            %ld
gwc.c:1640:49: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat=]
 1640 |                 printf("Save as wavfile %s %d->%d\n", filename, first_sample, last_sample) ;
      |                                                ~^                             ~~~~~~~~~~~
      |                                                 |                             |
      |                                                 int                           long int
      |                                                %ld
gwc.c:1590:13: warning: unused variable ‘first’ [-Wunused-variable]
 1590 |         int first = -1 ;
      |             ^~~~~
gwc.c: In function ‘open_wave_filename’:
gwc.c:2012:9: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
 2012 |     int l;
      |         ^
gwc.c: In function ‘old_open_wave_filename’:
gwc.c:2133:13: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
 2133 |         int l;
      |             ^
gwc.c: In function ‘store_selection_filename’:
gwc.c:2224:13: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
 2224 |         int l;
      |             ^
gwc.c: In function ‘store_selected_filename_as_encoded’:
gwc.c:2371:22: error: initialization of ‘int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
 2371 |     int enc_format = NULL ;
      |                      ^~~~
gwc.c:2372:9: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
 2372 |     int l;
      |         ^
gwc.c: At top level:
gwc.c:2550:39: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2550 |         {"amplify_icon", amplify_xpm, amplify_dark_xpm },
      |                                       ^~~~~~~~~~~~~~~~
gwc.c:2550:39: note: (near initialization for ‘stock_icons[0].icon_dark_xpm’)
gwc.c:2551:39: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2551 |         {"declick_icon", declick_xpm, declick_dark_xpm },
      |                                       ^~~~~~~~~~~~~~~~
gwc.c:2551:39: note: (near initialization for ‘stock_icons[1].icon_dark_xpm’)
gwc.c:2561:45: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2561 |         {"select_all_icon", select_all_xpm, select_all_dark_xpm },
      |                                             ^~~~~~~~~~~~~~~~~~~
gwc.c:2561:45: note: (near initialization for ‘stock_icons[11].icon_dark_xpm’)
gwc.c:2563:27: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2563 |         {"spectral_icon", spectral_xpm, spectral_dark_xpm },
      |                           ^~~~~~~~~~~~
gwc.c:2563:27: note: (near initialization for ‘stock_icons[13].icon_xpm’)
gwc.c:2563:41: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2563 |         {"spectral_icon", spectral_xpm, spectral_dark_xpm },
      |                                         ^~~~~~~~~~~~~~~~~
gwc.c:2563:41: note: (near initialization for ‘stock_icons[13].icon_dark_xpm’)
gwc.c:2567:26: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2567 |         {"zoom_in_icon", zoom_in_xpm, zoom_in_dark_xpm },
      |                          ^~~~~~~~~~~
gwc.c:2567:26: note: (near initialization for ‘stock_icons[17].icon_xpm’)
gwc.c:2567:39: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2567 |         {"zoom_in_icon", zoom_in_xpm, zoom_in_dark_xpm },
      |                                       ^~~~~~~~~~~~~~~~
gwc.c:2567:39: note: (near initialization for ‘stock_icons[17].icon_dark_xpm’)
gwc.c:2568:27: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2568 |         {"zoom_out_icon", zoom_out_xpm, zoom_out_dark_xpm },
      |                           ^~~~~~~~~~~~
gwc.c:2568:27: note: (near initialization for ‘stock_icons[18].icon_xpm’)
gwc.c:2568:41: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2568 |         {"zoom_out_icon", zoom_out_xpm, zoom_out_dark_xpm },
      |                                         ^~~~~~~~~~~~~~~~~
gwc.c:2568:41: note: (near initialization for ‘stock_icons[18].icon_dark_xpm’)
gwc.c:2569:27: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2569 |         {"zoom_sel_icon", zoom_sel_xpm, zoom_sel_dark_xpm }
      |                           ^~~~~~~~~~~~
gwc.c:2569:27: note: (near initialization for ‘stock_icons[19].icon_xpm’)
gwc.c:2569:41: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2569 |         {"zoom_sel_icon", zoom_sel_xpm, zoom_sel_dark_xpm }
      |                                         ^~~~~~~~~~~~~~~~~
gwc.c:2569:41: note: (near initialization for ‘stock_icons[19].icon_dark_xpm’)
make: *** [Makefile:744: gwc.o] Error 1
make: ** Esperando que outros processos terminem.
gcc -DDATADIR=\"/usr/share\" -DHELPDIR=\"/usr/share/doc\" -DLIBDIR=\"/usr/lib\" -DAPPNAME=\"gtk-wave-cleaner\"  -DHAVE_ALSA  -DHAVE_FFTW3 -DFFTWPREC=2     -D_FILE_OFFSET_BITS=64 -Wall -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -std=gnu17 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/opus -c gwc.c
In file included from /usr/include/gtk-2.0/gtk/gtkobject.h:37,
                 from /usr/include/gtk-2.0/gtk/gtkwidget.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkcontainer.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkbin.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkwindow.h:36,
                 from /usr/include/gtk-2.0/gtk/gtkdialog.h:35,
                 from /usr/include/gtk-2.0/gtk/gtkaboutdialog.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:33,
                 from gwc.h:27,
                 from gwc.c:35:
/usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: warning: ‘GTypeDebugFlags’ is deprecated [-Wdeprecated-declarations]
  236 | void            gtk_type_init   (GTypeDebugFlags    debug_flags);
      | ^~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:26,
                 from /usr/include/glib-2.0/gobject/gbinding.h:31,
                 from /usr/include/glib-2.0/glib-object.h:24,
                 from /usr/include/glib-2.0/gio/gioenums.h:30,
                 from /usr/include/glib-2.0/gio/giotypes.h:30,
                 from /usr/include/glib-2.0/gio/gio.h:28,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32:
/usr/include/glib-2.0/gobject/gtype.h:725:1: note: declared here
  725 | {
      | ^
In file included from /usr/include/gtk-2.0/gtk/gtktoolitem.h:31,
                 from /usr/include/gtk-2.0/gtk/gtktoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtkmenutoolbutton.h:30,
                 from /usr/include/gtk-2.0/gtk/gtk.h:126:
/usr/include/gtk-2.0/gtk/gtktooltips.h:73:3: warning: ‘GTimeVal’ is deprecated: Use 'GDateTime' instead [-Wdeprecated-declarations]
   73 |   GTimeVal last_popdown;
      |   ^~~~~~~~
In file included from /usr/include/glib-2.0/glib/galloca.h:34,
                 from /usr/include/glib-2.0/glib.h:32,
                 from /usr/include/glib-2.0/gobject/gbinding.h:30:
/usr/include/glib-2.0/glib/gtypes.h:580:8: note: declared here
  580 | struct _GTimeVal
      |        ^~~~~~~~~
gwc.c: In function ‘split_audio_on_markers’:
gwc.c:1617:31: warning: comparison with string literal results in unspecified behavior [-Waddress]
 1617 |             if (file_extension=="") {
      |                               ^~
gwc.c:1640:45: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
 1640 |                 printf("Save as wavfile %s %d->%d\n", filename, first_sample, last_sample) ;
      |                                            ~^                   ~~~~~~~~~~~~
      |                                             |                   |
      |                                             int                 long int
      |                                            %ld
gwc.c:1640:49: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat=]
 1640 |                 printf("Save as wavfile %s %d->%d\n", filename, first_sample, last_sample) ;
      |                                                ~^                             ~~~~~~~~~~~
      |                                                 |                             |
      |                                                 int                           long int
      |                                                %ld
gwc.c:1590:13: warning: unused variable ‘first’ [-Wunused-variable]
 1590 |         int first = -1 ;
      |             ^~~~~
gwc.c: In function ‘open_wave_filename’:
gwc.c:2012:9: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
 2012 |     int l;
      |         ^
gwc.c: In function ‘old_open_wave_filename’:
gwc.c:2133:13: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
 2133 |         int l;
      |             ^
gwc.c: In function ‘store_selection_filename’:
gwc.c:2224:13: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
 2224 |         int l;
      |             ^
gwc.c: In function ‘store_selected_filename_as_encoded’:
gwc.c:2371:22: error: initialization of ‘int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
 2371 |     int enc_format = NULL ;
      |                      ^~~~
gwc.c:2372:9: warning: variable ‘l’ set but not used [-Wunused-but-set-variable]
 2372 |     int l;
      |         ^
gwc.c: At top level:
gwc.c:2550:39: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2550 |         {"amplify_icon", amplify_xpm, amplify_dark_xpm },
      |                                       ^~~~~~~~~~~~~~~~
gwc.c:2550:39: note: (near initialization for ‘stock_icons[0].icon_dark_xpm’)
gwc.c:2551:39: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2551 |         {"declick_icon", declick_xpm, declick_dark_xpm },
      |                                       ^~~~~~~~~~~~~~~~
gwc.c:2551:39: note: (near initialization for ‘stock_icons[1].icon_dark_xpm’)
gwc.c:2561:45: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2561 |         {"select_all_icon", select_all_xpm, select_all_dark_xpm },
      |                                             ^~~~~~~~~~~~~~~~~~~
gwc.c:2561:45: note: (near initialization for ‘stock_icons[11].icon_dark_xpm’)
gwc.c:2563:27: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2563 |         {"spectral_icon", spectral_xpm, spectral_dark_xpm },
      |                           ^~~~~~~~~~~~
gwc.c:2563:27: note: (near initialization for ‘stock_icons[13].icon_xpm’)
gwc.c:2563:41: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2563 |         {"spectral_icon", spectral_xpm, spectral_dark_xpm },
      |                                         ^~~~~~~~~~~~~~~~~
gwc.c:2563:41: note: (near initialization for ‘stock_icons[13].icon_dark_xpm’)
gwc.c:2567:26: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2567 |         {"zoom_in_icon", zoom_in_xpm, zoom_in_dark_xpm },
      |                          ^~~~~~~~~~~
gwc.c:2567:26: note: (near initialization for ‘stock_icons[17].icon_xpm’)
gwc.c:2567:39: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2567 |         {"zoom_in_icon", zoom_in_xpm, zoom_in_dark_xpm },
      |                                       ^~~~~~~~~~~~~~~~
gwc.c:2567:39: note: (near initialization for ‘stock_icons[17].icon_dark_xpm’)
gwc.c:2568:27: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2568 |         {"zoom_out_icon", zoom_out_xpm, zoom_out_dark_xpm },
      |                           ^~~~~~~~~~~~
gwc.c:2568:27: note: (near initialization for ‘stock_icons[18].icon_xpm’)
gwc.c:2568:41: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2568 |         {"zoom_out_icon", zoom_out_xpm, zoom_out_dark_xpm },
      |                                         ^~~~~~~~~~~~~~~~~
gwc.c:2568:41: note: (near initialization for ‘stock_icons[18].icon_dark_xpm’)
gwc.c:2569:27: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2569 |         {"zoom_sel_icon", zoom_sel_xpm, zoom_sel_dark_xpm }
      |                           ^~~~~~~~~~~~
gwc.c:2569:27: note: (near initialization for ‘stock_icons[19].icon_xpm’)
gwc.c:2569:41: warning: initialization of ‘const char **’ from incompatible pointer type ‘char **’ [-Wincompatible-pointer-types]
 2569 |         {"zoom_sel_icon", zoom_sel_xpm, zoom_sel_dark_xpm }
      |                                         ^~~~~~~~~~~~~~~~~
gwc.c:2569:41: note: (near initialization for ‘stock_icons[19].icon_dark_xpm’)
make: *** [Makefile:744: gwc.o] Error 1

joao-lsf avatar Jun 05 '25 16:06 joao-lsf

Looks like it also needs -Wno-int-conversion

AlisterH avatar Jun 05 '25 20:06 AlisterH