<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 31, 2013 at 8:00 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":1xt">Jed,  I made this change but it makes everything useless because<br>

pkg-config PETSc --libs<br>
-L/Users/barrysmith/Src/petsc-dev/arch-opt/lib -lpetsc<br>
<br>
how are people suppose to know what libraries to link against? Note that<br>
<br>
pkg-config PETSc --variable=Libs.private<br>
returns nothing so how the hey does one get this information?</div></blockquote></div><br>Add --static to the args.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">$ pkg-config --libs cairo</div>
<div class="gmail_extra">-lcairo </div><div><div>$ pkg-config --static --libs cairo</div><div>-lcairo -lz -lgobject-2.0 -lffi -lglib-2.0 -pthread -lrt -lpcre -lpixman-1 -lfontconfig -lexpat -lfreetype -lz -lbz2 -lpng15 -lm -lz -lm -lxcb-shm -lxcb-render -lXrender -lXext -lX11 -lpthread -lxcb -lXau -lXdmcp</div>
</div><div><br></div><div><br></div><div style>This is intentional. It allows rebuilding PETSc (e.g., adding new --download args) without needing to relink all the layers above PETSc. Libraries and applications that call PETSc and link only with -lpetsc should not acquire direct dependencies on everything that PETSc depends on. (Static libraries just don't have a way to manage transitive dependencies, so it all bubbles up to the top level, but you always have to relink everything there anyway, so there's no binary stability to gain.)</div>
</div></div>