[Trilinos-Users] undefined references

Jack Chessa jfchessa at utep.edu
Mon Sep 15 21:04:51 MDT 2008


I suspect this is a simple oversight on my part, but I have been  
scratching my head.

I have installed Trilinos on a few serial machines and am doing so on  
a Beowulf cluster, but to start I am simply doing an installation  
without mpi.

The trilinos configure make seems to go fine, but when I run a simple  
code that works on my other machines I get an undefined reference to  
Epetra_SerialComm()

The make command is basically as follows

g++  -I/home/jfchessa/trilinos-8.0.8/LINUX_SERIAL/include -L/home/ 
jfchessa/trilinos-8.0.8/LINUX_SERIAL/lib -L/usr/lib64 -c epetra_ex.cpp
g++  -I/home/jfchessa/trilinos-8.0.8/LINUX_SERIAL/include -L/home/ 
jfchessa/trilinos-8.0.8/LINUX_SERIAL/lib -L/usr/lib64 -lamesos - 
laztecoo -lteuchos -lepetraext -lepetra -ltriutils -lml  -llapack - 
lblas -lgfortran  -o epetra_ex epetra_ex.o
epetra_ex.o: In function `main':
epetra_ex.cpp:(.text+0x81): undefined reference to  
`Epetra_SerialComm::Epetra_SerialComm()'
epetra_ex.cpp:(.text+0x9e): undefined reference to  
`Epetra_SerialComm::~Epetra_SerialComm()'
epetra_ex.cpp:(.text+0xb4): undefined reference to  
`Epetra_SerialComm::~Epetra_SerialComm()'
collect2: ld returned 1 exit status
make[1]: *** [epetra_ex] Error 1
make[1]: Leaving directory `/home/jfchessa/example_trilinos'
make: *** [all] Error 2


The code really only insatiates a Epetra_SerialComm object

When I nm on the libepetra.a I get the following

[jfchessa at virgo2 example_trilinos]$ nm -guC /home/jfchessa/ 
trilinos-8.0.8/LINUX_SERIAL/lib/libepetra.a | grep Epetra_SerialComm
Epetra_SerialComm.o:
                  U Epetra_SerialCommData::Epetra_SerialCommData()
                  U  
Epetra_SerialDistributor::Epetra_SerialDistributor(Epetra_SerialComm  
const&)
Epetra_SerialCommData.o:

Which seems to match what I get on my other installations where this  
code does compile

[jack at delgado ~]$ nm -guC trilinos-8.0.8/LINUX64_SERIAL/lib/ 
libepetra.a | grep Epetra_SerialComm
Epetra_SerialComm.o:
                  U Epetra_SerialCommData::Epetra_SerialCommData()
                  U  
Epetra_SerialDistributor::Epetra_SerialDistributor(Epetra_SerialComm  
const&)
Epetra_SerialCommData.o:

Any ideas what is going on?

The system that works is a Fedora 64 bit distro and the problematic  
system is a Rocks 64 bit distro

Thanks for any suggestions
Jack

Jack Chessa
Associate Professor
Department of Mechanical Engineering
University of Texas at El Paso
Email:	jfchessa at utep.edu
Office:	A309
Voice:	(915) 747-6900
Fax:		(915) 747-5019
Web:	http://utminers.utep.edu/jfchessa/index.html



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://software.sandia.gov/mailman/private/trilinos-users/attachments/20080915/84881295/attachment.html 


More information about the Trilinos-Users mailing list