pkgsrc-Bugs archive

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

pkg/43618: chat/ircservices build failure on i386-5.99.36



>Number:         43618
>Category:       pkg
>Synopsis:       chat/ircservices build failure on i386-5.99.36
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 14 20:20:00 +0000 2010
>Originator:     John D. Baker
>Release:        5.99.36, pkgsrc-2010Q2
>Organization:
>Environment:
NetBSD shadow.bozonet.ntc 5.99.36 NetBSD 5.99.36 (SHADOW) #12: Wed Jul 14 
12:55:54 CDT 2010  
sysop%shadow.bozonet.ntc@localhost:/d0/nbsd/current/obj/i386/sys/arch/i386/compile/SHADOW
 i386

>Description:
Building chat/ircservices on i386-current (5.99.36) (probably all
arches) fails as follows:

[...]
gmake[1]: Entering directory 
`/d0/build/pkgsrc/chat/ircservices/work/ircservices-5.0.63/lang'
gcc -fPIC -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes 
-fno-builtin-log langcomp.c -o langcomp
langcomp.c:119: error: conflicting types for 'getline'
/usr/include/stdio.h:245: error: previous declaration of 'getline' was here
gmake[1]: *** [langcomp] Error 1
gmake[1]: Leaving directory 
`/d0/build/pkgsrc/chat/ircservices/work/ircservices-5.0.63/lang'
gmake: *** [languages] Error 2
*** Error code 2

Stop.
make: stopped in /d0/nbsd/pkgsrc/chat/ircservices
*** Error code 1

Stop.
make: stopped in /d0/nbsd/pkgsrc/chat/ircservices


The source file:

  ${WRKOJBDIR}/chat/ircservices/work/ircservices-5.0.63/lang/langcomp.c

defines a local function "getline" with a conflicting definition from
that in <stdio.h>

>How-To-Repeat:
Attempt to build chat/ircservices on -current (5.99.36).

(5.1_RC3 does not exhibit this problem)


>Fix:
Since the local "getline" function is defined and used ONLY within:

  ${WRKOJBDIR}/chat/ircservices/work/ircservices-5.0.63/lang/langcomp.c

changing it to a non-conflicting name allows it to compile.

The following patch makes this change:

--- lang/langcomp.c.orig        2007-11-20 21:55:13.000000000 -0600
+++ lang/langcomp.c     2010-07-14 14:56:20.000000000 -0500
@@ -115,7 +115,7 @@
 /* Read a non-comment, non-blank line from the input file.  Return NULL at
  * end of file. */
 
-static char *getline(FILE *f)
+static char *irc_getline(FILE *f)
 {
     static char buf[1024];
     char *s;
@@ -196,7 +196,7 @@
        return 1;
     }
 
-    while (maxerr > 0 && (line = getline(in)) != NULL) {
+    while (maxerr > 0 && (line = irc_getline(in)) != NULL) {
        if (*line == '\t') {
            if (curstring == -2) {
                fprintf(stderr, "%s:%d: Junk at beginning of file\n",



Home | Main Index | Thread Index | Old Index