Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Build failure with OMPI-1.5 (clang-2.8, gcc-4.5.1 with debug options)
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-10-14 17:53:11


On Oct 14, 2010, at 5:38 PM, Jed Brown wrote:

> $ nm -D /home/jed/src/openmpi-1.5/bclang/ompi/contrib/vt/vt/../../../.libs/libmpi.so |grep MPI_Abort
> 0000000000074380 T PMPI_Abort
>
> In contrast, with gcc:
>
> $ nm -D /home/jed/src/openmpi-1.5/bgcc/ompi/contrib/vt/vt/../../../.libs/libmpi.so |grep MPI_Abort
> 00000000000712d0 W MPI_Abort
> 00000000000712d0 T PMPI_Abort
>
> Weak symbol issue, I don't know how clang is different in this regard.

Ah ha -- maybe this is the root problem and the VT guys are not to blame. :-)

config.log determined that weak symbol support was there, but I wonder if that was somehow a lie...?

configure:14417: checking for weak symbol support
configure:14448: clang -O3 -DNDEBUG -Werror -ansi -c conftest_weak.c
configure:14455: $? = 0
configure:14465: clang -O3 -DNDEBUG -Werror -ansi conftest.c conftest_weak.o -o conftest
configure:14472: $? = 0
configure:14498: result: yes

The configure test essentially looks like this -- could you try this manually and see what happens?

cat > conftest_weak.h <<EOF
int real(int i);
int fake(int i);
EOF

cat > conftest_weak.c <<EOF
#include "conftest_weak.h"
#pragma weak fake = real
int real(int i) { return i; }
EOF

cat > conftest.c <<EOF
#include "conftest_weak.h"
int main() { return fake(3); }
EOF

# Try the compile
clang $CFLAGS -c conftest_weak.c
clang $CFLAGS conftest.c conftest_weak.o -o conftest $LDFLAGS $LIBS

The configure test rules that weak symbol support is there if both compiler invocations return an exit status of 0.

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/