[CIG-LONG] Compile error of gale
Walter Landry
walter at geodynamics.org
Fri Apr 13 11:33:36 PDT 2012
John Yu <johnyu at usc.edu> wrote:
> Hi Walter,
>
> The problem is configuring gale. I've attached the config log after I
> did a clean installation of bothe petsc 3.2 and gale using the
> instructions from INSTALL.STATIC (which has some outdated instructions
> for petsc 3.0.0).
>
> I think the error is in the following section of the log. I've also
> attached the output of
>
> nm /share/apps/petsc/3.2-p7/lib/libpetsc.a > petsc.nm
>
> Failed to find static or shared libraries for 'PETSc'.
> Static missing: ['petscsnes', 'petscksp', 'petscdm', 'petscmat',
> 'petscvec']
> Shared missing: ['petscsnes', 'petscksp', 'petscdm', 'petscmat',
> 'petscvec', 'petsc']
> Looked in: ['/share/apps/petsc/3.2-p7/lib']
The problem shows up in these lines
/usr/bin/ld: /share/apps/petsc/3.2-p7/lib/libpetsc.a(dlimpl.c.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/usr/bin/ld: note: 'dlclose@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line
/lib64/libdl.so.2: could not read symbols: Invalid operation
Is there something wrong with /lib64/libdl.so.2? Are you using the
same compiler to build Gale and Petsc? Can you create simple Petsc
programs manually? There is a simple example in config.log
#include "mpi.h"
#include "petsc.h"
#include "petscvec.h"
#include "petscmat.h"
#include "petscksp.h"
#include "petscsnes.h"
int
main() {
PetscInitialize(NULL, NULL, NULL, NULL);
PetscFinalize();
return 0;
}
Put it in "temp.cxx" and compile it with
mpicxx -o .sconf_temp/conftest_5.o -c .sconf_temp/conftest_5.cpp
mpicxx -o temp -O3 -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -O -DNDEBUG -DHAVE_LIBXML2 -DHAVE_MPI -DHAVE_HDF5 -I/usr/include/libxml2 -I/share/apps/petsc/3.2-p7/include -I/usr/include/mpich2-x86_64 -Wl,-rpath=/share/apps/petsc/3.2-p7/lib temp.cxx -L/share/apps/petsc/3.2-p7/lib -lpetsc -lhdf5 -lxml2
Cheers,
Walter Landry
More information about the CIG-LONG
mailing list