Subject: pkg/25264: bootstrap failure on FreeBSD 5.2.1
To: None <>
From: None <>
List: pkgsrc-bugs
Date: 04/20/2004 21:04:38
>Number:         25264
>Category:       pkg
>Synopsis:       bootstrap failure on FreeBSD 5.2.1
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 20 21:05:00 UTC 2004
>Originator:     Michal Pasternak
>Release:        N/A
FreeBSD 5.2.1-RC FreeBSD 5.2.1-RC #0: Sat Jan 31 05:36:22 GMT 2004  i386

While building bootstrap (pkg_install):
gcc -DHAVE_CONFIG_H -DDEF_LOG_DIR=\"/var/db/pkg\" -DTAR_CMD=\"/usr/pkg/bin/tar\"
 -DFTP_CMD=\"/usr/pkg/bin/ftp\" -I../libnbcompat -I../../libnbcompat -I. -I. -g 
-O2 -c ftpio.c
In file included from ftpio.c:87:
/usr/include/sys/poll.h:45: error: redefinition of `struct pollfd'
*** Error code 1

bmake: stopped in /usr/pkgsrc/bootstrap/work/pkg_install/lib
*** Error code 1

bmake: stopped in /usr/pkgsrc/bootstrap/work/pkg_install
===> exited with status 1
I have no idea where the 2nd definition of poll is coming from - 
libnbcompat perhaps?

I have played a bit with libnbcompat, but I have no idea, how does
it really detect poll functionality and wraps it in defines (or, 
perhaps it makes use of OS-internal poll.h if available) ?

There is full build log:

libnbcompat configure doesn't show anything unusual.

If you can give me hints how does libnbcompat does the stuff, I can
perhaps prepare a fix for this. If you can't, I'll perhaps hack
it myself, reviewing CVS logs and doing similar stuff, which will
take me much more time, which I don't have. So, if you can help 
me, please do so.