Open MPI logo

Open MPI User's Mailing List Archives

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

From: Justin Bronder (jsbronder_at_[hidden])
Date: 2006-05-31 14:41:52


On 5/31/06, Brian W. Barrett <brbarret_at_[hidden]> wrote:
>
> A quick workaround is to edit opal/include/opal_config.h and change the
> #defines for OMPI_CXX_GCC_INLINE_ASSEMBLY and OMPI_CC_GCC_INLINE_ASSEMBLY
> from 1 to 0. That should allow you to build Open MPI with those XL
> compilers. Hopefully IBM will fix this in a future version ;).
>

Well I actually edited include/ompi_config.h and set both
OMPI_C_GCC_INLINE_ASSEMBLY
and OMPI_CXX_GCC_INLINE_ASSEMBLY to 0. This worked until libtool tried to
create
a shared library:

/bin/sh ../libtool --tag=CC --mode=link gxlc_64 -O -DNDEBUG
-qnokeyword=asm -export-dynamic -o libopal.la -rpath
/usr/local/ompi-xl/lib libltdl/libltdlc.la asm/libasm.la class/libclass.la
event/libevent.la mca/base/libmca_base.la memoryhooks/libopalmemory.la
runtime/libruntime.la threads/libthreads.la util/libopalutil.la
mca/maffinity/base/libmca_maffinity_base.la
mca/memory/base/libmca_memory_base.la
mca/memory/malloc_hooks/libmca_memory_malloc_hooks.la
mca/paffinity/base/libmca_paffinity_base.la
mca/timer/base/libmca_timer_base.la mca/timer/linux/libmca_timer_linux.la
-lm -lutil -lnsl
mkdir .libs
gxlc_64 -shared --whole-archive libltdl/.libs/libltdlc.a asm/.libs/libasm.a
class/.libs/libclass.a event/.libs/libevent.a mca/base/.libs/libmca_base.a
memoryhooks/.libs/libopalmemory.a runtime/.libs/libruntime.a
threads/.libs/libthreads.a util/.libs/libopalutil.a
mca/maffinity/base/.libs/libmca_maffinity_base.a
mca/memory/base/.libs/libmca_memory_base.a
mca/memory/malloc_hooks/.libs/libmca_memory_malloc_hooks.a
mca/paffinity/base/.libs/libmca_paffinity_base.a
mca/timer/base/.libs/libmca_timer_base.a
mca/timer/linux/.libs/libmca_timer_linux.a --no-whole-archive -ldl -lm
-lutil -lnsl -lc -qnokeyword=asm -soname libopal.so.0 -o
.libs/libopal.so.0.0.0
gxlc: 1501-257 Option --whole-archive is not recognized. Option will be
ignored.
gxlc: 1501-257 Option --no-whole-archive is not recognized. Option will be
ignored.
gxlc: 1501-257 Option -qnokeyword=asm is not recognized. Option will be
ignored.
gxlc: 1501-257 Option -soname is not recognized. Option will be ignored.
xlc: 1501-218 file libopal.so.0 contains an incorrect file suffix
xlc: 1501-228 input file libopal.so.0 not found
xlc -q64 -qthreaded -D_REENTRANT -lpthread -qmkshrobj
libltdl/.libs/libltdlc.a asm/.libs/libasm.a class/.libs/libclass.a
event/.libs/libevent.a mca/base/.libs/libmca_base.a
memoryhooks/.libs/libopalmemory.a runtime/.libs/libruntime.a
threads/.libs/libthreads.a util/.libs/libopalutil.a
mca/maffinity/base/.libs/libmca_maffinity_base.

I was able to fix this by editing libtool and replacing $CC with $LD in the
following:

# Commands used to build and install a shared archive.
archive_cmds="\$LD -shared \$libobjs \$deplibs \$compiler_flags
\${wl}-soname \$wl\$soname -o \$lib"
archive_expsym_cmds="\$echo \\\"{ global:\\\" >
\$output_objdir/\$libname.ver~
  cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >>
\$output_objdir/\$libname.ver~
  \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
    \$LD -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname
\$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o
\$lib"

We then fail later on at:

make[3]: Entering directory `/usr/src/openmpi-1.0.3a1r10133
/orte/tools/orted'
/bin/sh ../../../libtool --tag=CC --mode=link gxlc_64 -O -DNDEBUG
-export-dynamic -o orted orted.o ../../../orte/liborte.la
../../../opal/libopal.la -lm -lutil -lnsl
gxlc_64 -O -DNDEBUG -o .libs/orted orted.o --export-dynamic
../../../orte/.libs/liborte.so
/usr/src/openmpi-1.0.3a1r10133/opal/.libs/libopal.so
../../../opal/.libs/libopal.so -ldl -lm -lutil -lnsl --rpath
/usr/local/ompi-xl/lib
gxlc: 1501-257 Option --export-dynamic is not recognized. Option will be
ignored.
gxlc: 1501-257 Option --rpath is not recognized. Option will be ignored.
xlc: 1501-274 An incompatible level of gcc has been specified.
xlc: 1501-228 input file /usr/local/ompi-xl/lib not found
xlc -q64 -qthreaded -D_REENTRANT -lpthread -O -DNDEBUG -o .libs/orted
orted.o ../../../orte/.libs/liborte.so
/usr/src/openmpi-1.0.3a1r10133/opal/.libs/libopal.so
../../../opal/.libs/libopal.so -ldl -lm -lutil -lnsl /usr/local/ompi-xl/lib

Simply replacing ld for gxlc_64 here obviously won't work.
node42 orted # ld -O -DNDEBUG -o .libs/orted orted.o --export-dynamic
../../../orte/.libs/liborte.so
/usr/src/openmpi-1.0.3a1r10133/opal/.libs/libopal.so
../../../opal/.libs/libopal.so -ldl -lm -lutil -lnsl --rpath
/usr/local/ompi-xl/lib -lpthread
ld: warning: cannot find entry symbol _start; defaulting to 0000000010013ed8

Of course, I've been told that directly linking with ld isn't such a great
idea in the first
place. Ideas?

Thanks,

Justin.