Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 225411

Summary: net-misc/netkit-rsh-0.17-r9 build error after glibc-2.8_p20080602 update: 'ARG_MAX' undeclared
Product: Gentoo Linux Reporter: Jose daLuz <jdaluz>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: 2007.0   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jose daLuz 2008-06-08 18:16:24 UTC
+++ This bug was initially created as a clone of Bug #225409 +++

Rebuilding netkit-rsh 0.17-r9 (as part of system rebuild) after updating glibc from 2.7-r2 to 2.8_p20080602, I get the following error:

make[1]: Entering directory `/var/tmp/paludis/net-misc-netkit-rsh-0.17-r9/work/netkit-rsh-0.17/rshd'
x86_64-pc-linux-gnu-gcc -march=k8 -O2 -pipe -ggdb -msse3 -O2 -Wall -W  -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline  -DUSE_PAM rshd.c -c
rexecd.c: In function 'PAM_conv':
rexecd.c:197: warning: ignoring return value of 'realloc', declared with attribute warn_unused_result
rexecd.c:186: warning: unused parameter 'appdata_ptr'
rexecd.c: In function 'doit':
rexecd.c:236: error: 'ARG_MAX' undeclared (first use in this function)
rexecd.c:236: error: (Each undeclared identifier is reported only once
rexecd.c:236: error: for each function it appears in.)
rexecd.c:442: warning: missing sentinel in function call
rexecd.c:236: warning: unused variable 'cmdbuf'
make[1]: *** [rexecd.o] Error 1
make[1]: Leaving directory `/var/tmp/paludis/net-misc-netkit-rsh-0.17-r9/work/netkit-rsh-0.17/rexecd'
make: *** [rexecd.build] Error 2
x86_64-pc-linux-gnu-gcc -march=k8 -O2 -pipe -ggdb -msse3 -O2 -Wall -W  -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline  -DUSE_PAM network.c -c
make: *** Waiting for unfinished jobs....
x86_64-pc-linux-gnu-gcc -march=k8 -O2 -pipe -ggdb -msse3 -O2 -Wall -W  -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline  -DUSE_PAM auth.c -c
rsh.c: In function 'main':
rsh.c:192: warning: 'sigblock' is deprecated (declared at /usr/include/signal.h:181)
rsh.c: In function 'talk':
rsh.c:269: warning: 'sigsetmask' is deprecated (declared at /usr/include/signal.h:184)
x86_64-pc-linux-gnu-gcc  rsh.o -lcrypt -lutil -lutil -o rsh
x86_64-pc-linux-gnu-gcc -march=k8 -O2 -pipe -ggdb -msse3 -O2 -Wall -W  -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline  -DUSE_PAM sockconv.c -c
rshd.c: In function 'doit':
rshd.c:340: error: 'ARG_MAX' undeclared (first use in this function)
rshd.c:340: error: (Each undeclared identifier is reported only once
rshd.c:340: error: for each function it appears in.)
rshd.c:498: warning: missing sentinel in function call
rshd.c:340: warning: unused variable 'cmdbuf'
make[1]: *** [rshd.o] Error 1
make[1]: Leaving directory `/var/tmp/paludis/net-misc-netkit-rsh-0.17-r9/work/netkit-rsh-0.17/rshd'
make: *** [rshd.build] Error 2
make[1]: Leaving directory `/var/tmp/paludis/net-misc-netkit-rsh-0.17-r9/work/netkit-rsh-0.17/rsh'
auth.c: In function 'auth_checkauth':
auth.c:139: warning: passing argument 3 of 'pam_get_item' from incompatible pointer type
x86_64-pc-linux-gnu-gcc  rlogind.o network.o auth.o sockconv.o -lcrypt -lutil -lutil -ldl -lpam -lpam_misc -o rlogind
make[1]: Leaving directory `/var/tmp/paludis/net-misc-netkit-rsh-0.17-r9/work/netkit-rsh-0.17/rlogind'

!!! ERROR in net-misc/netkit-rsh-0.17-r9:

This is the same error as bug 225409.
Comment 1 Jose daLuz 2008-06-08 18:22:57 UTC
See
http://www.nabble.com/FYI:--glibc-2.8-may-break-some-of-your-packages-td16625128.html

"glibc 2.8 no longer defines ARG_MAX constant in linux, so you may see:


foobar.c:N: error: 'ARG_MAX' undeclared (first use in this function)

To fix this problem you can use something like this

#include <unistd.h> /* only if not already there !! */

#if defined(_SC_ARG_MAX)
# if defined(ARG_MAX)
#    undef ARG_MAX
# endif
# define ARG_MAX sysconf (_SC_ARG_MAX)
#endif"
Comment 2 Peter Alfredsen (RETIRED) gentoo-dev 2008-06-08 19:13:30 UTC

*** This bug has been marked as a duplicate of bug 225341 ***