pkgsrc-Bugs archive

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

pkg/39003: GLIBC >= 2.8 no longer defines ARG_MAX; components of pkgsrc's bootstrap need patching



>Number:         39003
>Category:       pkg
>Synopsis:       GLIBC >= 2.8 no longer defines ARG_MAX; components of pkgsrc's 
>bootstrap need patching
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 21 03:35:00 +0000 2008
>Originator:     Michel Salim
>Release:        None: Linux (Fedora 9)
>Organization:
>Environment:
Linux berlin.local 2.6.25.6-55.fc9.x86_64 #1 SMP Tue Jun 10 16:05:21 EDT 2008 
x86_64 x86_64 x86_64 GNU/Linux
>Description:
GLIBC >= 2.8 no longer defines ARG_MAX in unistd.h (oh joy. Whatever happens to 
the POSIX dream?), which means pkgsrc does not bootstrap properly on newer 
Linux distributions any longer.

The attached patch fixes the ARG_MAX problems for libnbcompat and tnftp (though 
my bootstrapping is now failing in an attempt to build 'fetch'; but that's a 
separate problem)
>How-To-Repeat:
In Fedora 9 (or the latest OpenSUSE), attempt to bootstrap pkgsrc
>Fix:
--- pkgsrc/pkgtools/libnbcompat/files/nbcompat/unistd.h.glibc28 2008-04-29 
21:16:06.000000000 -0400
+++ pkgsrc/pkgtools/libnbcompat/files/nbcompat/unistd.h 2008-06-20 
22:46:45.000000000 -0400
@@ -81,4 +81,12 @@
 void   strmode(mode_t, char *);
 #endif
 
+/* GLIBC >= 2.8 have ARG_MAX replaced by _SC_ARG_MAX */ 
+#ifdef _SC_ARG_MAX
+#ifdef ARG_MAX
+#undef ARG_MAX
+#endif
+#define ARG_MAX sysconf(_SC_ARG_MAX)
+#endif
+
 #endif /* !_NBCOMPAT_UNISTD_H_ */
--- pkgsrc/net/tnftp/files/tnftp.h.glibc28      2007-08-07 21:37:03.000000000 
-0400
+++ pkgsrc/net/tnftp/files/tnftp.h      2008-06-20 23:08:14.000000000 -0400
@@ -499,3 +499,11 @@
 #define getaddrinfo    Rgetaddrinfo
 #define getipnodebyname        Rgetipnodebyname
 #endif /* defined(USE_SOCKS) */
+
+/* GLIBC >= 2.8 have ARG_MAX replaced by _SC_ARG_MAX */ 
+#ifdef _SC_ARG_MAX
+#ifdef ARG_MAX
+#undef ARG_MAX
+#endif
+#define ARG_MAX sysconf(_SC_ARG_MAX)
+#endif



Home | Main Index | Thread Index | Old Index