Bug#646457: sundials: FTBFS: ./cvode.c:4131:5: error: format not a string literal and no format arguments [-Werror=format-security]

2011-11-12 Thread peter green

tags 646457 +patch
thanks


 cc -I./../../include -I../../include -g -O2 -fstack-protector 
--param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security 
-Wall -c ./cvode.c  -fPIC -DPIC -o .libs/cvode.o
./cvode.c: In function 'CVProcessError':
./cvode.c:4131:5: error: format not a string literal and no format arguments 
[-Werror=format-security]
cc1: some warnings being treated as errors

make[2]: *** [cvode.lo] Error 1


There seems to be a distinct lack of proper error handling in the build 
process. After the failure the build process continues for ages before 
finally erroring out much later in the build with a missing file.


Still i've made a patch that fixes the format security errors and that 
seems to make the package build successfully. Just add it to the quilt 
series.
Index: sundials-2.4.0/src/cvode/cvode.c
===
--- sundials-2.4.0.orig/src/cvode/cvode.c	2009-05-10 00:22:28.0 +
+++ sundials-2.4.0/src/cvode/cvode.c	2011-11-12 13:23:18.0 +
@@ -4128,7 +4128,7 @@
 
 #ifndef NO_FPRINTF_OUTPUT
 fprintf(stderr, \n[%s ERROR]  %s\n  , module, fname);
-fprintf(stderr, msgfmt);
+vfprintf(stderr, msgfmt, ap);
 fprintf(stderr, \n\n);
 #endif
 
Index: sundials-2.4.0/src/cvodes/cvodes.c
===
--- sundials-2.4.0.orig/src/cvodes/cvodes.c	2009-05-10 00:22:35.0 +
+++ sundials-2.4.0/src/cvodes/cvodes.c	2011-11-12 13:26:19.0 +
@@ -8942,7 +8942,7 @@
 
 #ifndef NO_FPRINTF_OUTPUT
 fprintf(stderr, \n[%s ERROR]  %s\n  , module, fname);
-fprintf(stderr, msg);
+fprintf(stderr, %s,msg);
 fprintf(stderr, \n\n);
 #endif
 
Index: sundials-2.4.0/src/ida/ida.c
===
--- sundials-2.4.0.orig/src/ida/ida.c	2009-05-10 00:22:51.0 +
+++ sundials-2.4.0/src/ida/ida.c	2011-11-12 13:28:56.0 +
@@ -3248,7 +3248,7 @@
 
 #ifndef NO_FPRINTF_OUTPUT
 fprintf(stderr, \n[%s ERROR]  %s\n  , module, fname);
-fprintf(stderr, msgfmt);
+vfprintf(stderr, msgfmt,ap);
 fprintf(stderr, \n\n);
 #endif
 
Index: sundials-2.4.0/src/idas/idas.c
===
--- sundials-2.4.0.orig/src/idas/idas.c	2009-05-10 00:22:58.0 +
+++ sundials-2.4.0/src/idas/idas.c	2011-11-12 13:30:16.0 +
@@ -7170,7 +7170,7 @@
 
 #ifndef NO_FPRINTF_OUTPUT
 fprintf(stderr, \n[%s ERROR]  %s\n  , module, fname);
-fprintf(stderr, msgfmt);
+vfprintf(stderr, msgfmt,ap);
 fprintf(stderr, \n\n);
 #endif
 
Index: sundials-2.4.0/src/kinsol/kinsol.c
===
--- sundials-2.4.0.orig/src/kinsol/kinsol.c	2009-05-10 00:23:08.0 +
+++ sundials-2.4.0/src/kinsol/kinsol.c	2011-11-12 13:31:25.0 +
@@ -1864,7 +1864,7 @@
 
 #ifndef NO_FPRINTF_OUTPUT
 fprintf(stderr, \n[%s ERROR]  %s\n  , module, fname);
-fprintf(stderr, msgfmt);
+vfprintf(stderr, msgfmt,ap);
 fprintf(stderr, \n\n);
 #endif
 


Bug#646457: sundials: FTBFS: ./cvode.c:4131:5: error: format not a string literal and no format arguments [-Werror=format-security]

2011-10-24 Thread Mònica Ramírez Arceda
Source: sundials
Version: 2.4.0-3
Severity: serious
Tags: wheezy sid
User: debian...@lists.debian.org
Usertags: qa-ftbfs-20111022 qa-ftbfs
Justification: FTBFS on amd64

Hi,

During a rebuild of all packages in sid, your package failed to build on
amd64.

Relevant part:
  cc -I./../../include -I../../include -g -O2 -fstack-protector 
 --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security 
 -Wall -c ./cvode.c  -fPIC -DPIC -o .libs/cvode.o
 ./cvode.c: In function 'CVProcessError':
 ./cvode.c:4131:5: error: format not a string literal and no format arguments 
 [-Werror=format-security]
 cc1: some warnings being treated as errors
 
 make[2]: *** [cvode.lo] Error 1

The full build log is available from:
   
http://people.debian.org/~lucas/logs/2011/10/22/sundials_2.4.0-3_lsid64.buildlog

A list of current common problems and possible solutions is available at 
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

About the archive rebuild: The rebuild was done on about 50 AMD64 nodes
of the Grid'5000 platform, using a clean chroot.  Internet was not
accessible from the build systems.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org