[Trilinos-Users] Linking problems with LOCA and Anasazi

Jonas Thies J.Thies at rug.nl
Tue Aug 26 01:47:19 MDT 2008


Hi all,

I encounter a problem when trying to use loca and anasazi independently 
in the same program. More specifically, the loca headers are included in 
the .C file with the main() routine. In another .C file, which I want to 
link to later, I recently added the line

#include "AnasaziBlockKrylovSchurSolMgr.hpp"

whereupon the linker produced the error at the end of this message.
It looks like some templates are instantiated twice, what can I do to 
avoid this?
Thanks,
Jonas



libloca.a(libloca_a-LOCA_Eigensolver_AnasaziStrategy.o): In function 
`Anasazi::sortRitzValues(std::vector<double, std::allocator<double> > 
const&, std::vector<double, std::allocator<double> > const&, 
std::vector<Anasazi::Value<std::complex<double> >, 
std::allocator<Anasazi::Value<std::complex<double> > > >*, 
std::vector<int, std::allocator<int> >*, std::vector<int, 
std::allocator<int> >*)':
./LOCA_Eigensolver_AnasaziStrategy.C:(.opd+0x48): multiple definition of 
`Anasazi::sortRitzValues(std::vector<double, std::allocator<double> > 
const&, std::vector<double, std::allocator<double> > const&, 
std::vector<Anasazi::Value<std::complex<double> >, 
std::allocator<Anasazi::Value<std::complex<double> > > >*, 
std::vector<int, std::allocator<int> >*, std::vector<int, 
std::allocator<int> >*)'
/usr/bin/ld: Dwarf Error: mangled line number section (bad file number).
/usr/bin/ld: Dwarf Error: mangled line number section (bad file number).
/usr/bin/ld: Dwarf Error: mangled line number section (bad file number).
/usr/bin/ld: Dwarf Error: mangled line number section (bad file number).
/usr/bin/ld: Dwarf Error: mangled line number section (bad file number).
...
...
/usr/bin/ld: Dwarf Error: mangled line number section (bad file number).
/usr/bin/ld: Dwarf Error: mangled line number section (bad file number).
./libtrilinos_thcm.a(SolverFactory.o):/home/djansen/jonas/Trilinos/8.0.5/include/Teuchos_RCP.hpp:76: 
first defined here
/usr/bin/ld: Warning: size of symbol 
`_ZN7Anasazi14sortRitzValuesERKSt6vectorIdSaIdEES4_PS0_INS_5ValueISt7complexIdEEESaIS8_EEPS0_IiSaIiEESE_' 
changed from 396 in ./libtrilinos_thcm.a(SolverFactory.o) to 452 in 
/home/djansen/jonas/Trilinos/8.0.5/lib/libloca.a(libloca_a-LOCA_Eigensolver_AnasaziStrategy.o)
/home/djansen/jonas/Trilinos/8.0.5/lib/libloca.a(libloca_a-LOCA_Eigensolver_AnasaziStrategy.o): 
In function `Anasazi::scaleRitzVectors(std::vector<double, 
std::allocator<double> > const&, Teuchos::SerialDenseMatrix<int, 
std::complex<double> >*)':
./LOCA_Eigensolver_AnasaziStrategy.C:(.opd+0x90): multiple definition of 
`Anasazi::scaleRitzVectors(std::vector<double, std::allocator<double> > 
const&, Teuchos::SerialDenseMatrix<int, std::complex<double> >*)'
./libtrilinos_thcm.a(SolverFactory.o):/usr/include/c++/4.1.2/bits/allocator.h:105: 
first defined here
/usr/bin/ld: Warning: size of symbol 
`_ZN7Anasazi16scaleRitzVectorsERKSt6vectorIdSaIdEEPN7Teuchos17SerialDenseMatrixIiSt7complexIdEEE' 
changed from 564 in ./libtrilinos_thcm.a(SolverFactory.o) to 376 in 
/home/djansen/jonas/Trilinos/8.0.5/lib/libloca.a(libloca_a-LOCA_Eigensolver_AnasaziStrategy.o)
/home/djansen/jonas/Trilinos/8.0.5/lib/libloca.a(libloca_a-LOCA_Eigensolver_AnasaziStrategy.o): 
In function `Anasazi::computeRitzResiduals(std::vector<double, 
std::allocator<double> > const&, Teuchos::SerialDenseMatrix<int, 
std::complex<double> > const&, std::vector<double, 
std::allocator<double> >*)':
./LOCA_Eigensolver_AnasaziStrategy.C:(.opd+0xf0): multiple definition of 
`Anasazi::computeRitzResiduals(std::vector<double, 
std::allocator<double> > const&, Teuchos::SerialDenseMatrix<int, 
std::complex<double> > const&, std::vector<double, 
std::allocator<double> >*)'
./libtrilinos_thcm.a(SolverFactory.o):/usr/include/c++/4.1.2/bits/allocator.h:105: 
first defined here
/usr/bin/ld: Warning: size of symbol 
`_ZN7Anasazi20computeRitzResidualsERKSt6vectorIdSaIdEERKN7Teuchos17SerialDenseMatrixIiSt7complexIdEEEPS2_' 
changed from 488 in ./libtrilinos_thcm.a(SolverFactory.o) to 352 in 
/home/djansen/jonas/Trilinos/8.0.5/lib/libloca.a(libloca_a-LOCA_Eigensolver_AnasaziStrategy.o)




More information about the Trilinos-Users mailing list