On Wed, Jul 29, 2009 at 9:19 AM, Ted Kord<[email protected]> wrote:
> Hi
>
> I realise that this is probably trivial to most of you but I'd appreciate it

> if you could help me out.
>
> My systems Ubuntu 9.04. Installed libmesh, petsc, etc from the repository.
> Tried to compile the examples and this is what I get:
>
> /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/libmesh.so: undefined
> reference to `MPI::Win::Set_errhandler(MPI::Errhandler const&)'
> /usr/lib/gcc/i486-linux-gnu/4.3.3/../../../../lib/libmesh.so: undefined
> reference to `MPI::Comm::Set_errhandler(MPI::Errhandler const&)'
> collect2: ld returned 1 exit status

I can confirm this behaviour on my Ubuntu jaunty x86_64 machine.  I
have the libmesh0.6.3 and libmesh-dev packages from the Ubuntu jaunty
universe repository.  Then:

$ cp -r /usr/share/doc/libmesh-dev/examples/ex2/ .
$ cd ex2
$ make

and I get essentially the same error:

%<---
gunzip -c ex2.C.gz > ex2.C
g++ ex2.C -I/usr/include/mpi -I/usr/include/petsc
-I/usr/include/libmesh -c -o ex2.o
g++ ex2.o -lmesh -o ex2
ex2.o: In function `main':
ex2.C:(.text+0x85): undefined reference to
`LibMeshInit::LibMeshInit(int&, char**&, int)'
/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/libmesh.so:
undefined reference to `MPI::Win::Set_errhandler(MPI::Errhandler
const&)'
/usr/lib/gcc/x86_64-linux-gnu/4.3.3/../../../../lib/libmesh.so:
undefined reference to `MPI::Comm::Set_errhandler(MPI::Errhandler
const&)'
collect2: ld returned 1 exit status
make: *** [ex2] Error 1
%<---

so this package doesn't work out of the box.  I suppose there should
be more put in the LIBS Make variable than `-lmesh', but I'm not quite
sure just what yet.  Also perhaps the Make rules should use $(CXX)
rather than g++?  I attach
/usr/share/doc/libmesh-dev/examples/ex2/Makefile.
   I've been trying to fix this myself for a few days now, but haven't
made much progress.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to