Thanks Paul, I tried applying your patch, and it looks like I got a bit further along, but `make check` still crashes with:
CC test-stddef.o PGC-S-0045-Illegal field size (/blues/gpfs/home/software/spack-0.10.0/var/spack/stage/m4-1.4.18-zwtcbe4z66lx36aq7iuwsqbmz35a76jp/m4-1.4.18/tests/test-stddef.c: 45) PGC-S-0045-Illegal field size (/blues/gpfs/home/software/spack-0.10.0/var/spack/stage/m4-1.4.18-zwtcbe4z66lx36aq7iuwsqbmz35a76jp/m4-1.4.18/tests/test-stddef.c: 46) PGC/x86-64 Linux 16.5-0: compilation completed with severe errors make[5]: *** [test-stddef.o] Error 2 Lines 45 and 46 of test-stddef.c look like: /* Solaris 10 has a bug where offsetof is under-parenthesized, and cannot be used as an arbitrary expression. However, since it is unlikely to bite real code, we ignore that short-coming. */ /* verify (sizeof offsetof (struct d, e) == sizeof (size_t)); */ 45 verify (sizeof (offsetof (struct d, e)) == sizeof (size_t)); 46 verify (offsetof (struct d, e) < -1); /* Must be unsigned. */ verify (offsetof (struct d, f) == 1); Is this expected? P.S. I submitted a ticket to PGI regarding the bogus warning messages you mentioned: http://www.pgroup.com/userforum/viewtopic.php?p=21440#21440 Adam J. Stewart Assistant Systems Administrator Laboratory Computing Resource Center Computing, Environment and Life Sciences Argonne National Laboratory ________________________________________ From: Paul Eggert [egg...@cs.ucla.edu] Sent: Tuesday, January 31, 2017 4:49 PM To: Stewart, Adam James Cc: Eric Blake; bug...@gnu.org; Bug-gnulib Subject: Re: M4 tests fail when built with PGI compilers On 01/31/2017 07:46 AM, Stewart, Adam James wrote: > Yes, the warnings are annoying, but more importantly, `make check` doesn't > pass for me. In fact, I'm not sure if it even gets to the testing phase. I > think it crashes when trying to build the test suite. Your log file says all the M4 tests passed; see the line "All checks successful". The tests that failed are all Gnulib tests that do not suggest any problems in M4 proper, only problems in the Gnulib test harness (plus one portability bug in Gnulib that M4 should not trigger). So you should be OK. The Gnulib 'make check' failures are fixed by the patch I mentioned earlier, which should appear in the next version of GNU M4. Here it is again: http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=16f6a8d8d81cc93745a24c0fb89caab2c383ae3c