OK, more details.
Since I don't know all the workings of building LAM just yet, you'll have
to bear with me.
After running configure, one of the things it appears to generate are a
few 'libtool' scripts scattered around the source tree.
After running into a few problems where the compiler is telling me I need
to compile with -fPIC, (but PGI uses both -fpic and -fPIC; so whatever).
I looked at the actual 'pgcc' invocation. libtool isn't invoking pgcc
with -fPIC.
I've spent a few spare minutes trying to find where the root cause of the
problem is, but this patch will have to suffice for now.
This patch applies to the 'libtool' scripts generated by ./configure.
(although a similar entry is in the ./configure scripts). Applying this
patch to the myriad 'libtool' scripts allows me to build LAM.
------------------------------------------------------
--- libtool.patch 2005-05-05 08:27:45.913700348 -0600
+++ libtool 2005-05-04 17:03:14.000000000 -0600
@@ -208,11 +208,11 @@
old_archive_from_expsyms_cmds=""
# Commands used to build and install a shared archive.
-archive_cmds="\$CC -shared -fpic \$libobjs \$deplibs \$compiler_flags
\${wl}-soname \$wl\$soname -o \$lib"
+archive_cmds="\$CC -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~
- \$CC -shared -fpic \$libobjs \$deplibs \$compiler_flags
\${wl}-soname \$wl\$soname \${wl}-version-script
\${wl}\$output_objdir/\$libname.ver -o \$lib"
+ \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname
\$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o
\$lib"
postinstall_cmds=""
postuninstall_cmds=""
@@ -6973,8 +6973,8 @@
old_archive_from_expsyms_cmds=""
# Commands used to build and install a shared archive.
-archive_cmds="\$CC -shared -fpic \$predep_objects \$libobjs \$deplibs
\$postdep_objects \$compiler_flags \${wl}-soname \${wl}\$soname -o \$lib"
-archive_expsym_cmds="\$CC -shared -fpic \$predep_objects \$libobjs
\$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \${wl}\$soname
\${wl}-retain-symbols-file \${wl}\$export_symbols -o \$lib"
+archive_cmds="\$CC -shared \$predep_objects \$libobjs \$deplibs
\$postdep_objects \$compiler_flags \${wl}-soname \${wl}\$soname -o \$lib"
+archive_expsym_cmds="\$CC -shared \$predep_objects \$libobjs \$deplibs
\$postdep_objects \$compiler_flags \${wl}-soname \${wl}\$soname
\${wl}-retain-symbols-file \${wl}\$export_symbols -o \$lib"
postinstall_cmds=""
postuninstall_cmds=""
------------------------------------------------------
And, lastly, the ./configure options:
export CC=pgcc
export FC=pgf77
export F77=pgf77
export CXX=pgCC
export CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Msignextend
-fast -fPIC"
export CXXFLAGS="-fast"
export FFLAGS="-fast"
export LDFLAGS="-L%{_libdir}"
export CFLAGS=$CFLAGS" -I/usr/include/ib"
./configure \
--enable-shared=yes \
--with-modules \
--with-rpi=usysv \
--with-rpi-gm=%{_prefix} \
--with-rpi-ib=%{_prefix} \
--with-rpi-gm-lib=%{_libdir} \
--without-mpi2cpp \
--with-rsh="ssh"
|