Subject: Re: OS X Bootstrap fails in ftp.c
To: Louis Guillaume <lguillaume@berklee.edu>
From: grant beattie <grant@NetBSD.org>
List: tech-pkg
Date: 10/16/2003 19:11:17
On Thu, Oct 16, 2003 at 12:39:35AM -0400, Louis  Guillaume wrote:

> Hi everyone.
> 
> I haven't tried to bootstrap pkgsrc on OS X for a while. Here's what I 
> get with the latest cvs checkout (earlier tonight)...
> 
> gcc -I. -I./.. -I. -I..  -I./../libnetbsd -g -O2   -c -o ftp.o ftp.c
> ftp.c: In function `empty':
> ftp.c:557: storage size of `pfd' isn't known
> ftp.c:561: `POLLIN' undeclared (first use in this function)
> ftp.c:561: (Each undeclared identifier is reported only once
> ftp.c:561: for each function it appears in.)
> make[1]: *** [ftp.o] Error 1
> make: *** [ftp] Error 2
> ===> exited with status 2
> aborted.
> 
> 
> ... Unfortunately, I don' t know how to add "libnbcompat/poll.h" to the 
> library path in this scheme. How or where should that be done?

try this patch (untested):

Index: bootstrap
===================================================================
RCS file: /work/netbsd/cvsroot/othersrc/bootstrap-pkgsrc/bootstrap,v
retrieving revision 1.78
diff -u -r1.78 bootstrap
--- bootstrap	4 Oct 2003 18:58:51 -0000	1.78
+++ bootstrap	16 Oct 2003 09:08:55 -0000
@@ -406,7 +406,7 @@
 	;;
 esac
 echo_msg "Installing tnftp"
-run_cmd "(cd tnftp; $shprog ./configure --prefix=$prefix && make && (cd src && make install))"
+run_cmd "(cd tnftp; env CPPFLAGS='-I../libnbcompat -I../../libnbcompat' LDFLAGS='-L../libnbcompat -L../../libnbcompat' LIBS='-lnbcompat' $shprog ./configure --prefix=$prefix && make && (cd src && make install))"
 pkg_install_args="$pkg_install_args --with-ftp=$prefix/bin/ftp"
 
 FETCH_CMD=$prefix/bin/ftp


has anyone else had nbftp build failures on Darwin? I haven't seen it
not build, but I did come across Darwin's lack of poll() when working
on pkg_install.

grant.