Another probably-Fortran-merge problem. Three issues in this e-mail.
Introduction: The last two nights, Oracle MTT tests have been unable to
build the trunk (r26307) with Oracle Studio compilers. This has been
uncovered since the fix of r26302, allowing us to get further in the
build process. We configure with
--with-openib
--enable-openib-connectx-xrc
--without-udapl
--disable-openib-ibcm
--enable-btl-openib-failover
[...]
and fail in compilation with
"btl_openib_failover.c", line 237: undefined struct/union member:
port_error_failover
The member is defined in btl_openib.h, but it's inside an "#if
OPAL_HAVE_THREADS" and we're not getting threads.
#1) Isn't there supposed to be some diplomatic message about trying to
use openib without threads?
Anyhow, why aren't we getting threads? Well, configure complains:
checking if Fortran compiler and POSIX threads work as is... no
checking if Fortran compiler and POSIX threads work with -Kthread... no
checking if Fortran compiler and POSIX threads work with -kthread... no
checking if Fortran compiler and POSIX threads work with -pthread... no
checking if Fortran compiler and POSIX threads work with -pthreads... no
checking if Fortran compiler and POSIX threads work with -mt... no
checking if Fortran compiler and POSIX threads work with -mthreads... no
checking if Fortran compiler and POSIX threads work with -lpthreads... no
checking if Fortran compiler and POSIX threads work with -llthread... no
checking if Fortran compiler and POSIX threads work with -lpthread... no
Woke up on the wrong side of bed, did we? Checking config.log:
configure:58332: checking if Fortran compiler and POSIX threads work as is
configure:58417: cc -DNDEBUG -m32 -xO5 -I. -c conftest.c
"conftest.c", line 21: void function cannot return value
"conftest.c", line 24: void function cannot return value
"conftest.c", line 27: void function cannot return value
"conftest.c", line 30: void function cannot return value
[...]
void pthreadtest(void)
{ return pthreadtest_f(); }
[...]
void pthreadtest_(void)
{ return pthreadtest_f(); }
[...etc...]
#2) Okay, yes, we shouldn't be trying to return values from void functions.
Same for the other checks (-pthread, -pthreads, -mt, etc.). But,
something else strikes me as funny about those other checks. Here is
more from config.log:
configure:58698: checking if Fortran compiler and POSIX threads work
with -Kthread
configure:58768: cc -DNDEBUG -m32 -xO5 -mt -I. -c conftest.c
[...]
configure:58698: checking if Fortran compiler and POSIX threads work
with -kthread
configure:58768: cc -DNDEBUG -m32 -xO5 -mt -I. -c conftest.c
[...]
configure:58698: checking if Fortran compiler and POSIX threads work
with -pthread
configure:58768: cc -DNDEBUG -m32 -xO5 -mt -I. -c conftest.c
[...]
configure:58698: checking if Fortran compiler and POSIX threads work
with -pthreads
configure:58768: cc -DNDEBUG -m32 -xO5 -mt -I. -c conftest.c
[...]
configure:58698: checking if Fortran compiler and POSIX threads work
with -mt
configure:58768: cc -DNDEBUG -m32 -xO5 -mt -I. -c conftest.c
[...]
configure:58698: checking if Fortran compiler and POSIX threads work
with -mthreads
configure:58768: cc -DNDEBUG -m32 -xO5 -mt -I. -c conftest.c
[...]
configure:59320: checking if Fortran compiler and POSIX threads work
with -lpthreads
configure:59390: cc -DNDEBUG -m32 -xO5 -mt -I. -c conftest.c
[...]
configure:59320: checking if Fortran compiler and POSIX threads work
with -llthread
configure:59390: cc -DNDEBUG -m32 -xO5 -mt -I. -c conftest.c
[...]
configure:59320: checking if Fortran compiler and POSIX threads work
with -lpthread
configure:59390: cc -DNDEBUG -m32 -xO5 -mt -I. -c conftest.c
[...]
The purged text complains about void functions returning values, but we
already talked about that. What interests me now is this:
#3) While configure claims to be trying so many flags (-pthread, -mt,
etc.) it appears always to be checking only -mt.