pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/43904: pbulk's read_child.c compilation fails with GCC 4.4.3 under Ubuntu GNU/Linux



>Number:         43904
>Category:       pkg
>Synopsis:       pbulk's read_child.c compilation fails with GCC 4.4.3 under 
>Ubuntu GNU/Linux
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 24 14:30:00 +0000 2010
>Originator:     Silas Silva
>Release:        
>Organization:
>Environment:
Linux bsoares 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 
i686 GNU/Linux

>Description:
When compiling bulk build environment under Ubuntu 10.04 GNU/Linux (cd 
pkgtools/pbulk; bmake install), I get this error:

gcc -Wno-error -Wno-error  -Wall -Wstrict-prototypes -Wmissing-prototypes 
-Wpointer-arith -Wno-uninitialized -Wreturn-type -Wcast-qual -Wpointer-arith 
-Wwrite-strings -Wswitch -Wshadow -Werror  -D_GNU_SOURCE -DHAVE_NBCOMPAT_H=1 
-I/usr/pkgsrc/pkgtools/pbulk-base/work/libnbcompat -c read_child.c
cc1: warnings being treated as errors
read_child.c: In function 'read_from_child':
read_child.c:73: error: format not a string literal and no format arguments
*** Error code 1

This is related to more strict checks newer versions of gcc do...
>How-To-Repeat:
Under Ubuntu 10.04 GNU/Linux, with GCC 4.4.3 , after bootstrapping pkgsrc:

    # cd /usr/pkgsrc/pkgtools/pbulk
    # bmake install
>Fix:
Apply this patch against pkgtools/pbulk/files/pbulk/lib/read_child.c

--- read_child.c.orig   2010-09-22 18:30:18.000000000 -0300
+++ read_child.c        2010-09-22 18:30:47.000000000 -0300
@@ -70,7 +70,7 @@
                (void)close(fd);
                (void)kill(child, SIGTERM);
                (void)waitpid(child, &status, 0);
-               err(1, error);
+               err(1, "%s", error);
        }
 
        (void)close(fd);



Home | Main Index | Thread Index | Old Index