Subject: pkg/14110: cannot build poptop
To: None <gnats-bugs@gnats.netbsd.org>
From: None <igy@arhc.org>
List: netbsd-bugs
Date: 09/30/2001 18:33:13
>Number:         14110
>Category:       pkg
>Synopsis:       cannot build poptop
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 30 18:34:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Naoto Shimazaki
>Release:        NetBSD-current
>Organization:
PRUG
>Environment:
NetBSD caolila 1.5Y NetBSD 1.5Y (CAOLILA) #6: Sat Sep 29 19:24:18 JST 2001     root@caolila:/net/src/sys/arch/i386/compile/CAOLILA i386

>Description:
poptop-1.0.0 cannot build on netbsd-current
it has some bug in configure.in

cc  -O2 -fno-builtin -Wall -ansi -DSBINDIR='"/usr/pkg/sbin"' -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o pptpd  pptpd.o configfile.o  pptpmanager.o compat.o getopt.o  getopt1.o -lwrap 
getopt.o: In function `_getopt_internal':
getopt.o(.text+0x46f): undefined reference to `gettext'
getopt.o(.text+0x501): undefined reference to `gettext'
getopt.o(.text+0x536): undefined reference to `gettext'
getopt.o(.text+0x5af): undefined reference to `gettext'
getopt.o(.text+0x69e): undefined reference to `gettext'
getopt.o(.text+0x6cf): more undefined references to `gettext' follow
collect2: ld returned 1 exit status
*** Error code 1

Stop.
make: stopped in /net/pkgsrc/net/poptop/work.i386/pptpd-1.0.0
*** Error code 1

>How-To-Repeat:
cd pkgsrc/net/poptop
make
>Fix:
here is the patch against pkg/net/poptop.
1. fix bugs in configure.in. e.g. PPPD_IP_ALLOC = yes  --> PPPD_IP_ALLOC=yes
2. use poptop-1.0.1 instead of 1.0.0

diff -uNr poptop.orig/Makefile poptop/Makefile
--- poptop.orig/Makefile	Sun Feb 18 03:19:27 2001
+++ poptop/Makefile	Mon Sep 24 18:11:06 2001
@@ -1,13 +1,12 @@
 # $NetBSD: Makefile,v 1.3 2001/02/17 18:19:27 wiz Exp $
 
-DISTNAME=	pptpd-1.0.0
-PKGNAME=	poptop-1.0.0
+DISTNAME=	pptpd-1.0.1
+PKGNAME=	poptop-1.0.1
 CATEGORIES=	net
-MASTER_SITES=	http://www.moretonbay.com/vpn/releases/
-EXTRACT_SUFX=   .tgz
+MASTER_SITES=	http://poptop.lineo.com/releases/
 
 MAINTAINER=	dbj@netbsd.org
-HOMEPAGE=	http://www.moretonbay.com/vpn/pptp.html
+HOMEPAGE=	http://poptop.lineo.com/
 COMMENT=	PPTP server which can support Microsoft VPN clients
 
 GNU_CONFIGURE=	yes
diff -uNr poptop.orig/distinfo poptop/distinfo
--- poptop.orig/distinfo	Sat Apr 21 20:23:30 2001
+++ poptop/distinfo	Mon Oct  1 10:31:27 2001
@@ -1,7 +1,7 @@
 $NetBSD: distinfo,v 1.2 2001/04/21 11:23:30 wiz Exp $
 
-SHA1 (pptpd-1.0.0.tgz) = 0b181520e46f152a638a75b5f745f318461eb3b3
-Size (pptpd-1.0.0.tgz) = 110188 bytes
-SHA1 (patch-aa) = e5856706083f87227cbd88a975ec53badeec8d89
-SHA1 (patch-ab) = ccc0e7d5f4b84ed6d80ef7eee067f017d6ca418a
+SHA1 (pptpd-1.0.1.tar.gz) = a7f4d29b3aca12ac4f6e70761c73b7139d1b9992
+Size (pptpd-1.0.1.tar.gz) = 111179 bytes
+SHA1 (patch-aa) = 3def9ef29fe48ab4ee83e57b4aa55e2db49e571d
+SHA1 (patch-ab) = b13bb91406c196e72bc57316da23e14a7884d21a
 SHA1 (patch-ac) = 9414c9d086913d8a322629d87f3ed79ecbd4059f
diff -uNr poptop.orig/patches/patch-aa poptop/patches/patch-aa
--- poptop.orig/patches/patch-aa	Fri Oct  8 13:32:23 1999
+++ poptop/patches/patch-aa	Mon Oct  1 10:27:29 2001
@@ -1,7 +1,16 @@
-$NetBSD: patch-aa,v 1.1.1.1 1999/10/08 04:32:23 dbj Exp $
+$NetBSD$
 
---- configure.in.orig	Sat Sep 25 20:13:57 1999
-+++ configure.in	Sat Sep 25 20:46:27 1999
+--- configure.in.orig	Mon Sep 25 10:29:23 2000
++++ configure.in	Mon Sep 24 18:13:39 2001
+@@ -112,7 +112,7 @@
+ if test "$ac_cv_header_libintl_h" = yes; then
+   if test "$ac_cv_lib_c_gettext" = no; then
+     if test "$ac_cv_lib_intl_gettext" = yes; then
+-      XTRALIBS_MGR = "$XTRALIBS_MGR -lintl"
++      XTRALIBS_MGR="$XTRALIBS_MGR -lintl"
+     else
+       echo "Have libintl.h but no usable gettext!" 1>&2
+       exit 1
 @@ -144,15 +144,18 @@
  	[ AC_DEFINE(PNS_MODE)
  	  PNS_MODE = yes ])
@@ -30,3 +39,30 @@
  
  if test "$SLIRP" = "yes"; then
    if test "$PPPD_IP_ALLOC" = "yes"; then
+@@ -160,7 +163,7 @@
+   else
+     echo "SLIRP mode selected - disabling PoPToP internal IP allocation." 1>&2
+     AC_DEFINE(PPPD_IP_ALLOC)
+-    PPPD_IP_ALLOC = yes
++    PPPD_IP_ALLOC=yes
+   fi
+ fi
+ 
+@@ -170,7 +173,7 @@
+   else
+     echo "BSD user-space ppp selected - disabling PoPToP internal IP allocation." 1>&2
+     AC_DEFINE(PPPD_IP_ALLOC)
+-    PPPD_IP_ALLOC = yes
++    PPPD_IP_ALLOC=yes
+   fi
+ fi
+ 
+@@ -180,7 +183,7 @@
+   else
+     echo "PNS mode selected - disabling PoPToP internal IP allocation." 1>&2
+     AC_DEFINE(PPPD_IP_ALLOC)
+-    PPPD_IP_ALLOC = yes
++    PPPD_IP_ALLOC=yes
+   fi
+ fi
+ 
diff -uNr poptop.orig/patches/patch-ab poptop/patches/patch-ab
--- poptop.orig/patches/patch-ab	Fri Oct  8 13:32:23 1999
+++ poptop/patches/patch-ab	Mon Oct  1 10:27:38 2001
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.1.1.1 1999/10/08 04:32:23 dbj Exp $
+$NetBSD$
 
---- configure.orig	Sat Sep 25 20:10:12 1999
-+++ configure	Sat Sep 25 20:46:41 1999
+--- configure.orig	Mon Sep 24 18:14:26 2001
++++ configure	Mon Sep 24 18:14:30 2001
 @@ -21,6 +21,8 @@
    --with-pppd-ip-alloc    Let pppd allocate IP (and IPX) addresses "
  ac_help="$ac_help
@@ -203,7 +203,7 @@
  set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
-@@ -1153,12 +1155,12 @@
+@@ -1153,18 +1155,18 @@
  
  
  echo $ac_n "checking for working const""... $ac_c" 1>&6
@@ -218,6 +218,13 @@
  #include "confdefs.h"
  
  int main() {
+ 
+ /* Ultrix mips cc rejects this.  */
+-typedef int charset[2]; const charset x = {0,0};
++typedef int charset[2]; const charset x;
+ /* SunOS 4.1.1 cc rejects this.  */
+ char const *const *ccp;
+ char **p;
 @@ -1207,7 +1209,7 @@
  
  ; return 0; }
@@ -244,7 +251,8 @@
  #include "confdefs.h"
  
  int main() {
- } $ac_kw foo() {
+-} int $ac_kw foo() {
++} $ac_kw foo() {
  ; return 0; }
  EOF
 -if { (eval echo configure:1246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
@@ -936,7 +944,16 @@
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
  else
-@@ -2590,24 +2592,34 @@
+@@ -2534,7 +2536,7 @@
+ if test "$ac_cv_header_libintl_h" = yes; then
+   if test "$ac_cv_lib_c_gettext" = no; then
+     if test "$ac_cv_lib_intl_gettext" = yes; then
+-      XTRALIBS_MGR = "$XTRALIBS_MGR -lintl"
++      XTRALIBS_MGR="$XTRALIBS_MGR -lintl"
+     else
+       echo "Have libintl.h but no usable gettext!" 1>&2
+       exit 1
+@@ -2590,25 +2592,35 @@
  fi
  
  
@@ -975,7 +992,35 @@
 +	    fi
 +	  fi
  fi
-+
  
++
  if test "$SLIRP" = "yes"; then
    if test "$PPPD_IP_ALLOC" = "yes"; then
+     true
+@@ -2618,7 +2630,7 @@
+ #define PPPD_IP_ALLOC 1
+ EOF
+ 
+-    PPPD_IP_ALLOC = yes
++    PPPD_IP_ALLOC=yes
+   fi
+ fi
+ 
+@@ -2631,7 +2643,7 @@
+ #define PPPD_IP_ALLOC 1
+ EOF
+ 
+-    PPPD_IP_ALLOC = yes
++    PPPD_IP_ALLOC=yes
+   fi
+ fi
+ 
+@@ -2644,7 +2656,7 @@
+ #define PPPD_IP_ALLOC 1
+ EOF
+ 
+-    PPPD_IP_ALLOC = yes
++    PPPD_IP_ALLOC=yes
+   fi
+ fi
+ 

>Release-Note:
>Audit-Trail:
>Unformatted: