[CIG-LONG] Compile error of gale
John Yu
johnyu at usc.edu
Fri Apr 13 11:57:53 PDT 2012
this is what i get:
[root at geosys hg]# 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
/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
collect2: ld returned 1 exit status
[root at geosys hg]# ll /lib64/libdl.so.2
lrwxrwxrwx. 1 root root 13 May 31 2011 /lib64/libdl.so.2 -> libdl-2.13.so
[root at geosys hg]# uname -a
Linux geosys.usc.edu 2.6.35.14-106.fc14.x86_64 #1 SMP Wed Nov 23 13:07:52
UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
glibc-2.13-1.x86_64 : The GNU libc libraries
Repo : installed
Matched from:
Other : Provides-match: /lib64/libdl.so.2
thanks,
john
.......................................
john yu
information systems director
southern california earthquake center
department of earth sciences
university of southern california
213.740.5275 | 213.740.8801 (f)
On Fri, 13 Apr 2012, Walter Landry wrote:
> 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