[mpich-discuss] Building with Clang

Anthony Chan chan at mcs.anl.gov
Mon Aug 22 14:05:40 CDT 2011


Jed,

try adding pac_c_check_compiler_option_prototest=no to your configure line
to see configure goes further.

A.Chan

----- Original Message -----
> On Aug 20, 2011, at 10:00 PM CDT, Jed Brown wrote:
> 
> > On Mon, Aug 15, 2011 at 15:46, Dave Goodell <goodell at mcs.anl.gov>
> > wrote:
> > Can you send us the c.txt and config.log files indicated in the
> > README? Perhaps there's something that you missed that one of us
> > will spot. Also, be sure to let us know exactly which version of the
> > code that those logs are coming from.
> >
> > Just updated to r8940, c.txt and config.log attached.
> > <c.txt><config.log>
> 
> The immediate cause of the configure failure can be seen in the
> config.log. For some reason the configure test is generating a C
> program that looks like this:
> 
> ----8<----
> void main(){ return 0; }
> ----8<----
> 
> Which clang reasonably complains about:
> 
> ----8<----
> conftest.c:11:9: error: 'main' must return 'int'
> void main(){ return 0; }
> ^
> conftest.c:11:22: error: void function 'main' should not return a
> value [-Wreturn-type]
> void main(){ return 0; }
> ^ ~
> ----8<----
> 
> However, it's not obvious to me why that code is getting generated by
> configure. When I use autoconf 2.68 (as you do) and try a few simple
> autoconf macros that imitate what MPICH2 is doing, I get a well-formed
> conftest.c:
> 
> ----8<----
> int
> main ()
> {
> 
> ;
> return 0;
> }
> ----8<----
> 
> I'll do a bit more testing here with actual MPICH2 to see if I can
> reproduce what you're seeing. MPICH2 is definitely using
> AC_LINK_IFELSE here in an unconventional way, so it would not be
> surprising to see that autoconf-2.68 somehow breaks the shared library
> support.
> 
> In the meantime can you send me your actual raw configure script as
> well? That might shed some light on what's happening here.
> 
> -Dave
> 
> 
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss


More information about the mpich-discuss mailing list