Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: [OMPI users] compilation error with pgcc Unknown switch
From: Abhinav Sarje (asarje_at_[hidden])
Date: 2012-02-07 15:11:02

I am trying to build open-mpi 1.4.4 (latest stable from
using PGI compilers on a cray platform. PGI compilers' version is
11.9.0. I get the following error while building:
Making all in tools/wrappers
make[2]: Entering directory `{my_installation_directory}/opal/tools/wrappers'
source='opal_wrapper.c' object='opal_wrapper.o' libtool=no \
        DEPDIR=.deps depmode=none /bin/sh ../../../config/depcomp \
        cc "-DEXEEXT=\"\"" -I. -I../../../opal/include
-I../../../orte/include -I../../../ompi/include
-I../../../opal/mca/paffinity/linux/plpa/src/libplpa -I../../..
-D_REENTRANT -O -DNDEBUG -fPIC -c -o opal_wrapper.o opal_wrapper.c
/bin/sh ../../../libtool --tag=CC --mode=link cc -O -DNDEBUG -fPIC
 -export-dynamic -o opal_wrapper opal_wrapper.o
../../../opal/ -lnsl -lutil
libtool: link: cc -O -DNDEBUG -fPIC -o .libs/opal_wrapper
opal_wrapper.o --export-dynamic ../../../opal/.libs/
-ldl -lnsl -lutil -rpath {my_installation_directory}/lib
pgcc-Error-Unknown switch: --export-dynamic
make[2]: *** [opal_wrapper] Error 1
make[2]: Leaving directory `{my_installation_directory}/opal/tools/wrappers'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `{my_installation_directory}/opal'
make: *** [all-recursive] Error 1

I see that the libtool packaged with open-mpi is 2.2.6b
When I try to compile this particular part with libtool versions 2.2.6
or 2.4, I get the following error:
$ libtool --tag=CC --mode=link cc -O -DNDEBUG -fPIC
-export-dynamic -o opal_wrapper opal_wrapper.o
../../../opal/ -lnsl -lutil
libtool: link: cc -O -DNDEBUG -fPIC -o .libs/opal_wrapper
opal_wrapper.o -Wl,--export-dynamic
../../../opal/.libs/ -ldl -lnsl -lutil -Wl,-rpath
/usr/bin/ld: attempted static link of dynamic object

Looking at earlier posts, apparently there was a bug with libtool a
couple of years ago because of which the above error occurred. This
was fixed in newer releases, but I am getting similar errors.

Does anyone have any information on how to fix this, or if I am doing
something wrong here?