When trying to install OpenMPI the .configure filed failed in the section checking for ISO C99 ability of the selected compiler.
Puzzled as gcc of course has both the std=gnu99 and std=c99 option, I pruning the 20,000 lines configure file to isolate the offending section. In the end I traced it back to gcc 5 not compiling variable argument functions.
The below code generates the "suffix or operands invalid for `movq'" error, which is the root cause of the .configure file failing.
(The step-by-step installation for OpenMPI I followed is here https://wiki.helsinki.fi/display/HUGG/Installing+Open+MPI+on+Mac+OS+X)
Anyone has seen this and knows how to fix it?
//-----------------------------------------------------------------------------
// This fails to compile with gcc 5.3
//
// Command: gcc test4.c
//
// Error is:
// /var/folders/4s/gkkpz000gn/T//ccAraq59.s:47:suffix or operands invalid for `movq'
// /var/folders/4s/gkg0r000gn/T//ccAraq59.s:52:suffix or operands invalid for `movq'
//
// gcc version is 5.3.0:
//
// $ gcc --version
// gcc (GCC) 5.3.0
// Copyright (C) 2015 Free Software Foundation, Inc.
// This is free software; see the source for copying conditions. There is NO
// warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
//-----------------------------------------------------------------------------
// Check varargs
static void
test_varargs (const char *format, ...)
{
}
//--------------------------------------------------------------
// MAIN {}
//--------------------------------------------------------------
int
main ()
{
//====================================================
// Check varargs.
// test_varargs ("s", "string"); //WORKS
// test_varargs ("d' ", 65); //WORKS
// test_varargs ("s, d' ", "string", 65); //WORKS
test_varargs ("f .", 34.234); // FAILS!!!
test_varargs ("s, d' f .", "string", 65, 34.234); //ALSO FAILS
//====================================================
return 0;
}