On Wed, Apr 28, 2010 at 12:11, andy thomas <[email protected]> wrote: > > I am trying to build maui-3.2.6p21 on a 64-bit AMD K8 system running > FreeBSD 7.1. After first installing the GNU version of sed in > /usr/local/bin to get around a limitation of FreeBSD sed (see > http://www.clusterresources.com/pipermail/mauiusers/2006-February/002037.html), > I've managed to successfully run the configure script to create the > makefiles although there is one warning message: > > configure: WARNING: Unsupported OS: FreeBSD, attempting build with > OPSYS=__LINUX > > But when I try to build it with gmake, I get the following error: > > gmake[1]: Entering directory `/export/home/andy/maui-3.2.6p21/src/server' > gcc -I../../include -I../../include -I/usr/local/include -D__LINUX > -D__MPBS -g -O2 -D__M64 -c Server.c > In file included from Server.c:84: > OServer.c: In function 'ServerDemonize': > OServer.c:182: error: too few arguments to function 'setpgrp' > gmake[1]: *** [Server.o] Error 1 > gmake[1]: Leaving directory `/export/home/andy/maui-3.2.6p21/src/server' > gmake: *** [all] Error 2 > > Should I be forcing OPSYS to __FREEBSD?
Hi Andy, A bit off-topic, but there is a 64-bit issue with maui-3.2.6p21. It's fixed in 3.3. You will find the issue if you have more than a total of 31 PBS node properties (Maui calls them features). It's because 3.2.6p21 assumes an int on x86_64 is larger than it really is. A colleague and I discovered this when we found that requesting a nodes with a particular feature did not work. Back to your question, setpgrp is different for Linux (SysV'ish) and FreeBSD. Linux: http://linuxmanpages.com/man2/setpgrp.2.php int setpgrp(void); FreeBSD: http://www.freebsd.org/cgi/man.cgi?query=setpgrp&apropos=0&sektion=0&manpath=FreeBSD+8.0-RELEASE&format=html int setpgrp(pid_t pid, pid_t pgrp); On gcc-3.4.6, /usr/include/unistd has this to say: Both System V and BSD have `setpgrp' functions, but with different calling conventions. The BSD function is the same as POSIX.1 `setpgid' (above). The System V function takes no arguments and puts the calling process in its on group like `setpgid (0, 0)'. New programs should always use `setpgid' instead. The default in GNU is to provide the System V function. The BSD function is available under -D_BSD_SOURCE. Anyway, src/server/OServer.c has this: #if defined(__OSF) || defined(__FREEBSD) if (setpgrp((pid_t)0,(pid_t)0) == -1) #else /* __OSF */ if (setpgrp() == -1) #endif /* __OSF */ i.e. you do want to make OPSYS=__FREEBSD I would have thought the configure script would handle it, but looking through it, it doesn't seem to do so. Doing a recursive grep in the source directory also shows that __FREEBSD is not set anywhere else, though there are macros in the source which check for __FREEBSD and make appropriate function calls. The easy way to fix it is to edit config.stat, and then do "sh config.stat", then run make. It doesn't look like the "OS" macro is used, but can't hurt fixing it, too: s,@OPSYS@,__FREEBSD,;t t s,@OS@,FreeBSD,;t t Alternatively, you could fix the configure script to handle FreeBSD so you won't have to edit config.stat every time you rebuild. Cheers, Dave -- David Chin, Ph.D. [email protected] High Performance Computing Systems Analyst Office: 336-758-2964 Wake Forest University Mobile: 336-608-0793 Winston-Salem, NC Email-to-txt: [email protected] Google Talk: [email protected] Web: http://www.wfu.edu/~chindw/ http://www.google.com/profiles/chindw.wfu _______________________________________________ mauiusers mailing list [email protected] http://www.supercluster.org/mailman/listinfo/mauiusers
