<div>Hi everyone,</div><div><br></div><div>I has some issue when I try to compile our own code that uses PETSc. Here is the error message. After some googling, it looks like a linking problem to PETSc. The PETSc compiled and tested without problem. In the makefile, the PETSc linker flags was obtained from PETSC_DIR:</div>

<div><br></div><div><div>include ${PETSC_DIR}/conf/variables</div><div>PETSC_INCLUDE_FLAGS=${PETSC_CC_INCLUDES} -I$(PETSC_DIR)</div><div>PETSC_LINKER_FLAGS=${PETSC_LIB}</div></div><div><br></div><div>I am using OSX 10.7.4 with gcc(4.8) and PETSc-3.2-p2. The same code was compiled on Linux with both intel and gfortran compilers without problem.</div>

<div>I am not 100% sure the issue is due to PETSc... Any suggestions are welcomed. Thanks in advance.</div><div><br></div><div>Peter</div><div><br></div><div>Error message:</div><div><br></div><div>mpif90 SUmb.o SUmb_fortran.o -L../../externals/SU_MPI/lib -L../../externals/ADT/lib -L../../lib -lsumb -lsumb_pyfort  -ladt -lsu_mpi   -L/usr/X11R6/lib -lX11 -L/usr/local/lib/gcc/x86_64-apple-darwin11.4.0/4.8.0 -L/usr/local/lib -ldl -lmpi_f90 -lmpi_f77 -lgfortran -lgfortran -lquadmath -lm -lm -lmpi_cxx -lstdc++ -lmpi -lopen-rte -lopen-pal -lutil -lSystem -lgcc_ext.10.5 -ldl -L/Users/lvzhoujie/Work/cgns/lib -lcgns -L/Users/lvzhoujie/Work/petsc-3.3-p2/linux-ifort-opt/lib -lpetsc -lmpi -lsuperlu_dist_3.0 -lflapack -lfblas -lmca_common_sm -o ../../bin/SUmb_mac_gfortran_openmpi</div>

<div><br></div><div>Undefined symbols for architecture x86_64:</div><div>  "_matcreatempidense_", referenced from:</div><div>      _createextrapetscvars_ in libsumb.a(createExtraPETScVars.o)</div><div>  "_matcreatempiaij_", referenced from:</div>

<div>      _createstatepetscvars_ in libsumb.a(createStatePETScVars.o)</div><div>      _createspatialpetscvars_ in libsumb.a(createSpatialPETScVars.o)</div><div>      _createcouplingpetscvars_ in libsumb.a(createCouplingPETScVars.o)</div>

<div>  "_matcreatempibaij_", referenced from:</div><div>      _createstatepetscvars_ in libsumb.a(createStatePETScVars.o)</div><div>      _setupnksolver_ in libsumb.a(setupNKSolver.o)</div><div>ld: symbol(s) not found for architecture x86_64</div>

<div>collect2: error: ld returned 1 exit status</div>