[torquedev] torquedev Digest, Vol 71, Issue 7

Michael Jennings mej at lbl.gov
Mon Oct 31 12:35:45 MDT 2011

On Monday, 31 October 2011, at 08:38:41 (-0500),
Alan Wild wrote:

> Disappoointed to see that TORQUE 2.5.9 is still behaving like 2.5.8...
> aparantley my (totally trivial) patch hasn't been looked at yet.
> Here's an updated one against torque-2.5.9-snap.201110240923
> --- configure.ac.old    2011-10-31 07:43:38.868344000 -0500
> +++ configure.ac        2011-10-31 07:44:03.099929000 -0500
> @@ -1069,6 +1069,7 @@
>    #include <sys/ucred.h>
>    #endif
>    #ifdef HAVE_SYS_SOCKET_H
> +  #define _GNU_SOURCE 1
>    #include <sys/socket.h>
>    #endif
>    #ifdef HAVE_SYS_UN_H
> Since this is patching configure.ac.... someone would also need to re-run
> autoconf  before building a release.
> Not clear if this is the "right" fix or not.  The problem I'm trying to
> solve is the configure script tests for CMSG_SPACE which, in turn, affects
> whether UNIX Domain Socket support is turned on by default.  On older
> versions of Glibc this test works just fine... howevert, because of changes
> in glibc, the current tests fails with a compile error... which
> disables Unix Domain Socket support by default. (whereas previously it was
> enabled by default).
> The "-D_GNU_SOURCE" fix that went into 2.5.8 allows Torque to build cleanly
> when you explicitly request Unix Domain Socket support, but the patch
> failed to take into account the test that is performed by configure.  The
> itself isn't using the flag so the test always fails.  I'll include an
> excerpt from an unpactched config.log below.  You'll clearly see where the
> test is failing on a build error... and it's because the ucred struct is
> #ifdef'd out before a _GNU_SOURCE flag.
> Passing -D_GNU_SOURCE also must be used by the configure tests.  My patch
> does this for the one place where I know this is relevant.

Use of _GNU_SOURCE is the correct solution and is required since glibc
2.8 according to the unix(7) man page under "Ancillary Messages:"


So _GNU_SOURCE must be defined *any* time sys/socket.h is expected to
yield the definition for "struct ucred," including during configure.


Michael Jennings <mej at lbl.gov>
Linux Systems and Cluster Engineer
High-Performance Computing Services
Bldg 50B-3209E      W: 510-495-2687
MS 050C-3396        F: 510-486-8615

More information about the torquedev mailing list