LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2004-11-13 22:57:21


Yikes, I think I see exactly what is happening here. [sigh] (notice,
too, that /usr/lib64 is also listed, which probably also Shouldn't Be)
I can fix these in the next 7.1.2 beta.

We are simply extracting flags from libtool -- I'm wondering if libtool
isn't supplying the --rpath somehow. Can you do the following (this is
what our configure test does):

- make foo.c:

int foo(void) { return 0; }

- run (replacing $CC and $CFLAGS as appropriate):

libtool --mode=compile $CC $CFLAGS -c foo.c -o foo.o

- run (replacing $vars as approrpiate):

libtool --mode=link $CC $CFLAGS foo.lo $LDFLAGS $LIBS -o libfoo.la

- finally, run:

$libtool --dry-run --mode=link $CC bar.lo libfoo.la -o bar

Check the flags that it outputs. Does it include --rpath?

On Nov 12, 2004, at 5:24 PM, Greg M. Kurtzer wrote:

> I am using LAM-7.1 on Centos-3.3.x86_64 with Myrinet and the PGI
> compilers.
>
> Lam builds fine, but I am having a linking problem with mpicc:
>
>
> $ mpicc --show mpi-hello.c
> /usr/pgi/linux86-64/5.2/bin/pgcc -D_REENTRANT mpi-hello.c -lpthread
> --rpath /usr/local/lib -L/usr/lib64 -lmpi -llam -lutil -lpthread -lgm
> -lpthread -ldl
> $ mpicc mpi-hello.c
> pgcc-Warning-Unknown switch: --rpath
> mpi-hello.c:
> PGC-W-0095-Type cast required for this conversion (mpi-hello.c: 42)
> PGC-W-0095-Type cast required for this conversion (mpi-hello.c: 45)
> PGC-W-0095-Type cast required for this conversion (mpi-hello.c: 48)
> PGC/x86-64 Linux/x86-64 5.2-4: compilation completed with warnings
> File with unknown suffix passed to linker: /usr/local/lib
> /usr/local/lib: file not recognized: Is a directory
>
> PGI doesn't seem to deal with --rpath without the -Wl, prefix, but
> with it it
> works:
>
> # /usr/pgi/linux86-64/5.2/bin/pgcc -D_REENTRANT mpi-hello.c -lpthread
> -Wl,--rpath,/usr/local/lib -L/usr/lib64 -lmpi -llam -lutil -lpthread
> -lgm
> -lpthread -ldl
> PGC-W-0095-Type cast required for this conversion (mpi-hello.c: 42)
> PGC-W-0095-Type cast required for this conversion (mpi-hello.c: 45)
> PGC-W-0095-Type cast required for this conversion (mpi-hello.c: 48)
> PGC/x86-64 Linux/x86-64 5.2-4: compilation completed with warnings
> $ ldd ./a.out
> libpthread.so.0 => /lib64/tls/libpthread.so.0
> (0x0000002a9566c000)
> libutil.so.1 => /lib64/libutil.so.1 (0x0000002a95781000)
> libgm.so.0 => /usr/local/lib/libgm.so.0 (0x0000002a95884000)
> libdl.so.2 => /lib64/libdl.so.2 (0x0000002a959a0000)
> libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95aa4000)
> libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a95ce8000)
> /lib64/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2
> (0x0000002a95556000)
>
> (notice /usr/local/lib was included :)
>
> I will need mpicc to work on this cluster properly. Are there any work
> arounds
> or patches that I can try?
>
> Thanks!
> --
> Greg Kurtzer
> Berkeley Lab, Linux guy
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/