<div>Hi,</div>
<div> </div>
<div>I've built static PETSc library with mpi/hypre w/o problems. The test e.g. also worked. </div>
<div> </div>
<div>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.</div>
<div> </div>
<div>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</div>
<div> </div>
<div>btw, the error msg are</div>
<div> </div>
<div>/lsftmp/g0306332/petsc-2.3.2-p8/lib/atlas3-noshared/libpetsc.a(ghome.o)(.text+0x16): In function `PetscGetHomeDirectory':<br>: warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
<br>/lsftmp/g0306332/petsc-2.3.2-p8/lib/atlas3-noshared/libpetsc.a(send.o)(.text+0xafc): In function `SOCKCall_Private':<br>: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
<br>/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':<br>: undefined reference to `pthread_mutex_unlock'<br>/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':
<br>: undefined reference to `pthread_mutex_lock'<br>/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':<br>: undefined reference to `pthread_mutex_lock'
<br>/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':<br>: undefined reference to `pthread_mutex_unlock'<br>/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':<br>: undefined reference to `pthread_getspecific'<br>/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':<br>: undefined reference to `pthread_mutex_lock'<br>/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':<br>: undefined reference to `pthread_getspecific'<br>/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':<br>: undefined reference to `pthread_getspecific'<br>/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':
<br>: undefined reference to `pthread_mutex_unlock'<br>/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':
<br>: undefined reference to `pthread_setspecific'<br>/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':<br>
: undefined reference to `pthread_setspecific'<br>/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':<br>: undefined reference to `pthread_setspecific'
<br>/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':<br>: undefined reference to `pthread_getspecific'<br>/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':<br>: undefined reference to `pthread_mutex_lock'<br>/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':<br>: undefined reference to `pthread_getspecific'<br>/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':<br>: undefined reference to `pthread_getspecific'<br>/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':
<br>: undefined reference to `pthread_mutex_unlock'<br>/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':<br> </div>
<div>i wonder what can be done. </div>
<div> </div>
<div>Thanks</div>