<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""> Bruce,</div><div class=""><br class=""></div> Can you please send the PkgConfig calls that you make to get the PETSc values? And then exactly what PETSc PkgConfig returns.<div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""></div><div class=""> Barry</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 22, 2022, at 11:03 AM, Palmer, Bruce J via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 18px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hi,<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">We recently switched the CMake configuration on our GridPACK application to use the PkgConfig utility instead of Jeb Brown’s FindPETSc.cmake module. This seems to work on a number of platforms but it is failing to link on others. It appears that the build cannot find the LAPACK and BLAS libraries. The PETSc library I’m linking to (v3.16.3) was configured with -download-f2cblaslapack so it should have these libraries, but when I try and link one of the test applications in GridPACK I get the errors<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 8.5pt; font-family: Menlo;" class=""><span class="s1">/share/apps/gcc/6.1.0/bin/g++ -pthread -g -rdynamic CMakeFiles/greetings.dir/test/greetings.cpp.o -o greetings</span><span class="apple-converted-space"> <span class="Apple-converted-space"> </span></span><span class="s1">-Wl,-rpath,/qfs/projects/ops/rh6/openmpi/3.0.1/gcc/6.1.0/lib ../math/libgridpack_math.a libgridpack_parallel.a ../timer/libgridpack_timer.a ../environment/libgridpack_environment.a ../math/libgridpack_math.a /pic/projects/gridpack/software/boost_1_65_0/lib/libboost_mpi.a /pic/projects/gridpack/software/boost_1_65_0/lib/libboost_serialization.a /pic/projects/gridpack/software/boost_1_65_0/lib/libboost_random.a /pic/projects/gridpack/software/boost_1_65_0/lib/libboost_filesystem.a /pic/projects/gridpack/software/boost_1_65_0/lib/libboost_system.a /pic/projects/gridpack/software/ga-5.7/build_pr/lib/libga++.a /pic/projects/gridpack/software/ga-5.7/build_pr/lib/libga.a /pic/projects/gridpack/software/ga-5.7/build_pr/lib/libarmci.a -lrt /usr/lib64/librt.so /usr/lib64/libdl.so /qfs/projects/ops/rh6/openmpi/3.0.1/gcc/6.1.0/lib/libmpi.so ../timer/libgridpack_timer.a libgridpack_parallel.a ../configuration/libgridpack_configuration.a /pic/projects/gridpack/software/petsc-3.16.3/linux-openmpi-gnu-cxx-complex-opt/lib/libpetsc.a</span><span class="apple-converted-space"> </span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 8.5pt; font-family: Menlo;" class=""><span class="s1">/pic/projects/gridpack/software/petsc-3.16.3/linux-openmpi-gnu-cxx-complex-opt/lib/libpetsc.a(zstart.o): In function `petscinitializef_':</span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 8.5pt; font-family: Menlo;" class=""><span class="s1">/pic/projects/gridpack/software/petsc-3.16.3/src/sys/objects/ftn-custom/zstart.c:280: undefined reference to `mpi_init_'</span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 8.5pt; font-family: Menlo;" class=""><span class="s1">/pic/projects/gridpack/software/petsc-3.16.3/linux-openmpi-gnu-cxx-complex-opt/lib/libpetsc.a(baijfact.o): In function `MatSolve_SeqBAIJ_N':</span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 8.5pt; font-family: Menlo;" class=""><span class="s1">/pic/projects/gridpack/software/petsc-3.16.3/src/mat/impls/baij/seq/baijfact.c:1462: undefined reference to `zgemv_'</span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 8.5pt; font-family: Menlo;" class=""><span class="s1">/pic/projects/gridpack/software/petsc-3.16.3/src/mat/impls/baij/seq/baijfact.c:1475: undefined reference to `zgemv_'</span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 8.5pt; font-family: Menlo;" class=""><span class="s1">/pic/projects/gridpack/software/petsc-3.16.3/src/mat/impls/baij/seq/baijfact.c:1478: undefined reference to `zgemv_'</span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 8.5pt; font-family: Menlo;" class=""><span class="s1">/pic/projects/gridpack/software/petsc-3.16.3/linux-openmpi-gnu-cxx-complex-opt/lib/libpetsc.a(baijfact.o): In function `MatSolve_SeqBAIJ_N_NaturalOrdering':</span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 8.5pt; font-family: Menlo;" class=""><span class="s1">/pic/projects/gridpack/software/petsc-3.16.3/src/mat/impls/baij/seq/baijfact.c:1407: undefined reference to `zgemv_'</span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 8.5pt; font-family: Menlo;" class=""><span class="s1">/pic/projects/gridpack/software/petsc-3.16.3/src/mat/impls/baij/seq/baijfact.c:1420: undefined reference to `zgemv_'</span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 8.5pt; font-family: Menlo;" class=""><span class="s1">/pic/projects/gridpack/software/petsc-3.16.3/linux-openmpi-gnu-cxx-complex-opt/lib/libpetsc.a(baijfact.o):/pic/projects/gridpack/software/petsc-3.16.3/sr</span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I suspect that the reason it worked for others and not for me is that they had viable blas and lapack libraries in their path and I don’t. Is there anything special you need to do to make sure that the build is pointed at the libraries that get created with the -download-f2cblaslapack option?<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Bruce Palmer</div></div></div></blockquote></div><br class=""></div></body></html>