<div>Hi,</div>
<div>&nbsp;</div>
<div>I&#39;ve built static PETSc library with mpi/hypre w/o problems. The test e.g. also worked. </div>
<div>&nbsp;</div>
<div>When I tried to built my own a.out, using -static (fortran), &nbsp;the error is lgcc_s not found. removing it in the make file resulted in a lot of error for mpich2.</div>
<div>&nbsp;</div>
<div>btw, i do not have root access. the problem is that there&#39;s some servers in my sch&#39;s requires the use of static library to run&nbsp;the a.out, therefore I need to use the &quot;-static&quot; option</div>
<div>&nbsp;</div>
<div>btw, the error msg are</div>
<div>&nbsp;</div>
<div>/lsftmp/g0306332/petsc-2.3.2-p8/lib/atlas3-noshared/libpetsc.a(ghome.o)(.text+0x16): In function `PetscGetHomeDirectory&#39;:<br>: warning: Using &#39;getpwuid&#39; 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&#39;:<br>: warning: Using &#39;gethostbyname&#39; 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&#39;:<br>: undefined reference to `pthread_mutex_unlock&#39;<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&#39;:
<br>: undefined reference to `pthread_mutex_lock&#39;<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&#39;:<br>: undefined reference to `pthread_mutex_lock&#39;
<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&#39;:<br>: undefined reference to `pthread_mutex_unlock&#39;<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&#39;:<br>: undefined reference to `pthread_getspecific&#39;<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&#39;:<br>: undefined reference to `pthread_mutex_lock&#39;<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&#39;:<br>: undefined reference to `pthread_getspecific&#39;<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&#39;:<br>: undefined reference to `pthread_getspecific&#39;<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&#39;:
<br>: undefined reference to `pthread_mutex_unlock&#39;<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&#39;:
<br>: undefined reference to `pthread_setspecific&#39;<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&#39;:<br>
: undefined reference to `pthread_setspecific&#39;<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&#39;:<br>: undefined reference to `pthread_setspecific&#39;
<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&#39;:<br>: undefined reference to `pthread_getspecific&#39;<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&#39;:<br>: undefined reference to `pthread_mutex_lock&#39;<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&#39;:<br>: undefined reference to `pthread_getspecific&#39;<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&#39;:<br>: undefined reference to `pthread_getspecific&#39;<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&#39;:
<br>: undefined reference to `pthread_mutex_unlock&#39;<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&#39;:<br>&nbsp;</div>

<div>i wonder what can be done. </div>
<div>&nbsp;</div>
<div>Thanks</div>