#3061: BUG: xterm fails to compile on Tiger -------------------------+--------------------- Reporter: cobleigh@… | Owner: pesco@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.0 Resolution: fixed | Keywords: Port: xterm | -------------------------+--------------------- Changes (by ryandesign@…): * port: => xterm Old description:
I tried to compile (and install) the xterm package on Tiger (OS X 10.4). During compilation, I get the following error: gcc -I. -I. -DHAVE_CONFIG_H -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include -I. -I/usr/X11R6/include -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I./exports/include/X11 -I/usr/X11R6/include -D__DARWIN__ -DNO_ALLOCA -DCSRG_BASED -DXFREE86_FT2 -DUTMP -DOSMAJORVERSION=8 -DOSMINORVERSION=0 -I/usr/X11R6/include -U_XOPEN_SOURCE -D_XOPEN_SOURCE=500 -DPROJECTROOT='"/usr/X11R6"' -D__vendorversion__='"Version 4.4.0 XFree86"' -g -O2 -c ./main.c ./main.c: In function 'spawn': ./main.c:3760: error: too many arguments to function 'setpgrp' ./main.c:3762: error: too many arguments to function 'setpgrp' make: *** [main.o] Error 1
Line 3760 is: setpgrp(0, 0); Line 3762 is: setpgrp(0, pgrp);
Looking at what the preprocessor generated, it looks like this function is getting defined in /usr/include/unistd.h in an ifdef:
#if __DARWIN_UNIX03 pid_t setpgrp(void) __DARWIN_ALIAS(setpgrp); #else /* !__DARWIN_UNIX03 */ int setpgrp(pid_t pid, pid_t pgrp); /* obsoleted by setpgid() */ #endif /* __DARWIN_UNIX03 */
I am not a C expert, but it seems that depending on the value of __DARWIN_UNIX03, setpgrp can either take one argument or two arguments. However, I am not sure what is setting __DARWIN_UNIX03 and I don't know enough about gcc to get it to tell me this information.
New description: I tried to compile (and install) the xterm package on Tiger (OS X 10.4). During compilation, I get the following error: {{{ gcc -I. -I. -DHAVE_CONFIG_H -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include -I/usr/X11R6/include -I. -I/usr/X11R6/include -I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I./exports/include/X11 -I/usr/X11R6/include -D__DARWIN__ -DNO_ALLOCA -DCSRG_BASED -DXFREE86_FT2 -DUTMP -DOSMAJORVERSION=8 -DOSMINORVERSION=0 -I/usr/X11R6/include -U_XOPEN_SOURCE -D_XOPEN_SOURCE=500 -DPROJECTROOT='"/usr/X11R6"' -D__vendorversion__='"Version 4.4.0 XFree86"' -g -O2 -c ./main.c ./main.c: In function 'spawn': ./main.c:3760: error: too many arguments to function 'setpgrp' ./main.c:3762: error: too many arguments to function 'setpgrp' make: *** [main.o] Error 1 }}} Line 3760 is: `setpgrp(0, 0);`\\ Line 3762 is: `setpgrp(0, pgrp);` Looking at what the preprocessor generated, it looks like this function is getting defined in /usr/include/unistd.h in an ifdef: {{{ #if __DARWIN_UNIX03 pid_t setpgrp(void) __DARWIN_ALIAS(setpgrp); #else /* !__DARWIN_UNIX03 */ int setpgrp(pid_t pid, pid_t pgrp); /* obsoleted by setpgid() */ #endif /* __DARWIN_UNIX03 */ }}} I am not a C expert, but it seems that depending on the value of `__DARWIN_UNIX03`, setpgrp can either take one argument or two arguments. However, I am not sure what is setting `__DARWIN_UNIX03` and I don't know enough about gcc to get it to tell me this information. -- -- Ticket URL: <https://trac.macports.org/ticket/3061#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X