pkgsrc-Bugs archive

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

pkg/30205: pkg_select build fails on darwin



>Number:         30205
>Category:       pkg
>Synopsis:       pkg_select build fails on darwin
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 11 21:22:00 +0000 2005
>Originator:     Brian Ginsbach
>Release:        N.A.
>Organization:
>Environment:
Darwin restive 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30 20:11:17 PST 2005; 
root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC  Power Macintosh powerpc
>Description:
Building pkgtools/pkg_select (pkg_select-20050403) fails on Darwin (MacOS X 
10.3),
below is the failing step and error:

gcc -pipe -O2 -I/usr/include -g -I. -DPKGSRCBASE=\"/Volumes/ufs1/pkgsrc\" 
-DPKGDB=\"/var/db/pkg\" -DMAKE=\"/usr/pkg/bin/bmake\" 
-DCONFPATH=\"/usr/pkg/etc/pkg_select.conf\" 
-DMIRRORS=\"/usr/pkg/share/pkg_select\"  -no-cpp-precomp -I/usr/include -c 
install_many.c
install_many.c:45: error: invalid initializer
*** Error code 1

Stop.

>How-To-Repeat:
Attempt to build pkg_select on MacOS X 10.3 (darwin).
>Fix:
The pkg_select code assumes that since Darwin has <sys/queue.h> it will
also have the SLIST_HEAD_INITIALIZER macro.  This is not the case.  The fix
is to either prevent the package from building for Darwin or adding something
like the following to pkg_select/tools.h.

--- tools.h.orig        Wed May 11 11:36:08 2005
+++ tools.h     Wed May 11 11:36:21 2005
@@ -135,6 +135,11 @@
                }                                                       \
        } while (/* CONSTCOND */ 0)
 
+#ifndef SLIST_HEAD_INITIALIZER
+#define SLIST_HEAD_INITIALIZER(head)                                   \
+       { NULL }
+#endif
+
 typedef uint8_t T_Bool;
 
 extern int trimcr(char *);

Note this was added to tools.h because it is a common include, via 
pkg_select.h, and
the macro in question is also used in live.c.




Home | Main Index | Thread Index | Old Index