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) (jsquyres_at_[hidden])
Date: 2010-10-14 18:38:33


Huh. Can you make V=1 to build libmpi and use the same kind of options to build your sample library?

Sent from my PDA. No type good.

On Oct 14, 2010, at 6:01 PM, "Jed Brown" <jed_at_[hidden]> wrote:

> On Thu, Oct 14, 2010 at 23:53, Jeff Squyres <jsquyres_at_[hidden]> wrote:
> 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.
>
> They exit 0 and
>
> $ nm conftest |g 'real|fake'
> 00000000004004a0 W fake
> 00000000004004a0 T real
>
> so it looks like that is working fine. It also works fine when I stuff it into a shared library:
>
> $ clang -c -fPIC conftest_weak.c
> $ clang -shared -fPIC conftest.c conftest_weak.o -o conftest.so
> $ nm conftest.so |g 'real|fake'
> 00000000000005a0 W fake
> 00000000000005a0 T real
>
> Jed
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users