lgcc_s not found error
Satish Balay
balay at mcs.anl.gov
Tue May 8 00:37:37 CDT 2007
> i wonder what can be done.
Don't use -static. Lots of system libraries can't be used in -static
mode - as you've discovered. So you should:
- make sure the remote machine has all the basic system libraries [as
.so available].
- built PETSc without sharedlibrary options.
- Now compile an example
- copy it over to the remote machine.
- run 'ldd executable' on the remote machine to see if all the required
shared libraries get resolved.
If they don't - then figure out a workarround. Something that will
work for non-system files is to copy the .so files on to the remote
machine aswell. [say into /home/foo/lib, and then add this path to
LD_LIBRARY_PATH env variable]. Keep trying a workarround until 'ldd
executable' is able to resolve all .so files.
Satish
On Tue, 8 May 2007, Ben Tay wrote:
> Hi,
>
> I've built static PETSc library with mpi/hypre w/o problems. The test e.g.
> also worked.
>
> When I tried to built my own a.out, using -static (fortran), the error is
> lgcc_s not found. removing it in the make file resulted in a lot of error
> for mpich2.
>
> btw, i do not have root access. the problem is that there's some servers in
> my sch's requires the use of static library to run the a.out, therefore I
> need to use the "-static" option
>
> btw, the error msg are
>
> /lsftmp/g0306332/petsc-2.3.2-p8/lib/atlas3-noshared/libpetsc.a(ghome.o)(.text+0x16):
> In function `PetscGetHomeDirectory':
> : warning: Using 'getpwuid' in statically linked applications requires at
> runtime the shared libraries from the glibc version used for linking
> /lsftmp/g0306332/petsc-2.3.2-p8/lib/atlas3-noshared/libpetsc.a(send.o)(.text+0xafc):
> In function `SOCKCall_Private':
> : warning: Using 'gethostbyname' in statically linked applications requires
> at runtime the shared libraries from the glibc version used for linking
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/libstdc++.a(eh_alloc.o)(.text.__cxa_allocate_exception+0xc8):
> In function `__cxa_allocate_exception':
> : undefined reference to `pthread_mutex_unlock'
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/libstdc++.a(eh_alloc.o)(.text.__cxa_allocate_exception+0xd6):
> In function `__cxa_allocate_exception':
> : undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/libstdc++.a(eh_alloc.o)(.text.__cxa_free_exception+0x90):
> In function `__cxa_free_exception':
> : undefined reference to `pthread_mutex_lock'
> /usr/lib/gcc/x86_64-redhat-linux/3.4.6/libstdc++.a(eh_alloc.o)(.text.__cxa_free_exception+0x6c):
> In function `__cxa_free_exception':
> : undefined reference to `pthread_mutex_unlock'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_delete.o)(.text+0x41):
> In function `MPI_Attr_delete':
> : undefined reference to `pthread_getspecific'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_delete.o)(.text+0x67):
> In function `MPI_Attr_delete':
> : undefined reference to `pthread_mutex_lock'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_delete.o)(.text+0x199):
> In function `MPI_Attr_delete':
> : undefined reference to `pthread_getspecific'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_delete.o)(.text+0x257):
> In function `MPI_Attr_delete':
> : undefined reference to `pthread_getspecific'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_delete.o)(.text+0x27d):
> In function `MPI_Attr_delete':
> : undefined reference to `pthread_mutex_unlock'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_delete.o)(.text+0x2b0):
> In function `MPI_Attr_delete':
> : undefined reference to `pthread_setspecific'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_delete.o)(.text+0x30e):
> In function `MPI_Attr_delete':
> : undefined reference to `pthread_setspecific'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_delete.o)(.text+0x337):
> In function `MPI_Attr_delete':
> : undefined reference to `pthread_setspecific'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_get.o)(.text+0x51):
> In function `MPI_Attr_get':
> : undefined reference to `pthread_getspecific'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_get.o)(.text+0x7b):
> In function `MPI_Attr_get':
> : undefined reference to `pthread_mutex_lock'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_get.o)(.text+0x1d3):
> In function `MPI_Attr_get':
> : undefined reference to `pthread_getspecific'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_get.o)(.text+0x2a6):
> In function `MPI_Attr_get':
> : undefined reference to `pthread_getspecific'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_get.o)(.text+0x2d3):
> In function `MPI_Attr_get':
> : undefined reference to `pthread_mutex_unlock'
> /nfs/lsftmp/g0306332/petsc-2.3.2-p8/externalpackages/mpich2-1.0.4p1/atlas3-noshared/lib/libmpich.a(attr_get.o)(.text+0x31a):
> In function `MPI_Attr_get':
>
> i wonder what can be done.
>
> Thanks
>
More information about the petsc-users
mailing list