Hi Jeff and others,
Well, I've gotten a bit further with finding out about my weird error
message. Here is a bit of a summary.
Somewhere in the AC/AM/LT process, libtool is called:
/bin/sh ../../libtool --mode=link mpiCC -g -O2 -DWITH_MPI -O2
-DREAL=double -o libmcbase.la -rpath /usr/local/lib mccrosssec.lo
mcscattering.lo < snip ... more .lo files >
This calls mpiCC in the following way:
mpiCC -shared -nostdlib
/usr/lib/gcc-lib/i486-suse-linux/3.2/../../../crti.o
/usr/lib/gcc-lib/i486-suse-linux/3.2/crtbeginS.o .libs/mccrosssec.o
.libs/mcscattering.o < snip ... more .libs/*.0 > -Wl,--whole-archive
/usr/local/lib/liblammpi++.a /usr/local/lib/libmpi.a
/usr/local/lib/liblam.a -Wl,--no-whole-archive -L/usr/lib
-L/usr/local/lib -L/usr/lib/gcc-lib/i486-suse-linux/3.2
-L/usr/lib/gcc-lib/i486-suse-linux/3.2/../../../../i486-suse-linux/lib
-L/usr/lib/gcc-lib/i486-suse-linux/3.2/../../.. -llammpio -lutil
/usr/lib/libstdc++.so -lm -lc -lgcc_s
/usr/lib/gcc-lib/i486-suse-linux/3.2/crtendS.o
/usr/lib/gcc-lib/i486-suse-linux/3.2/../../../crtn.o -Wl,-soname
-Wl,libmcbase.so.0 -o .libs/libmcbase.so.0.0.0
Resulting in the error:
/usr/local/lib/liblam.a(mpietc.o): In function `lam_pt2coll':
mpietc.o(.text+0x0): multiple definition of `lam_pt2coll'
/usr/local/lib/libmpi.a(mpietc.o)(.text+0x0): first defined here
/usr/local/lib/liblam.a(mpietc.o): In function `lam_coll2pt':
mpietc.o(.text+0x10): multiple definition of `lam_coll2pt'
/usr/local/lib/libmpi.a(mpietc.o)(.text+0x10): first defined here
/usr/local/lib/liblam.a(mpietc.o): In function `lam_mkcoll':
mpietc.o(.text+0x30): multiple definition of `lam_mkcoll'
/usr/local/lib/libmpi.a(mpietc.o)(.text+0x30): first defined here
/usr/local/lib/liblam.a(mpietc.o): In function `lam_mkpt':
mpietc.o(.text+0x50): multiple definition of `lam_mkpt'
/usr/local/lib/libmpi.a(mpietc.o)(.text+0x50): first defined here
/usr/local/lib/liblam.a(mpietc.o): In function `lam_unsyncsql':
mpietc.o(.text+0x80): multiple definition of `lam_unsyncsql'
/usr/local/lib/libmpi.a(mpietc.o)(.text+0x80): first defined here
/usr/local/lib/liblam.a(mpietc.o): In function `lam_rank_in_group':
mpietc.o(.text+0x130): multiple definition of `lam_rank_in_group'
/usr/local/lib/libmpi.a(mpietc.o)(.text+0x130): first defined here
collect2: ld returned 1 exit status
Which leads me (via share/mpi/mpietc.c where these functions are
defined) to /src/lam-7.0/share/Makefile.am:
# Note that mpi/liblamextra.la gets built into both liblam.la and
# in both libraries, and avoids a dependency from liblam -> libmpi
# (dependencies the other way are ok).
Apperantly libtool 1.5.0:
wjmb_at_dyn-113136:~ $ libtool --version
ltmain.sh (GNU libtool) 1.5.0a (1.1220.2.26 2003/08/05 16:29:47)
has problems with multiple definintions, while on another machine
wjmb_at_pchela:~ $ libtool --version
ltmain.sh (GNU libtool) 1.4.1 (1.922.2.34 2001/09/03 01:22:13)
This is no problem at all. Removing the `-Wl,--whole-archive' part of
the mpiCC arguments seems to `solve' the problem.
Well, not really a satisfactory result, but at least I have the problem
seems to be more localized now.
Does anybody have suggestions or more thoughts on this?
Wouter.
|