<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jan 2, 2018 at 9:15 AM, Franck Houssen <span dir="ltr"><<a href="mailto:franck.houssen@inria.fr" target="_blank">franck.houssen@inria.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">----- Mail original -----<br>
> De: "Jed Brown" <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>><br>
> À: "Franck Houssen" <<a href="mailto:franck.houssen@inria.fr">franck.houssen@inria.fr</a>>, "For users of the development version of PETSc"<br>
> <<a href="mailto:petsc-dev@mcs.anl.gov">petsc-dev@mcs.anl.gov</a>><br>
> Envoyé: Mardi 2 Janvier 2018 15:02:17<br>
> Objet: Re: [petsc-dev] PETSc.pc: missing rpath ?<br>
<span class="">><br>
> Some people don't want RPATH.  It was discussed here.<br>
><br>
<br>
</span>OK<br>
<span class=""><br>
> <a href="https://mid.mail-archive.com/CAEymZafiQtwKDxh0myQ1LD_uByGKv5JyQ9PGzK3ZTmFPcOR=Kw@mail.gmail.com" rel="noreferrer" target="_blank">https://mid.mail-archive.com/<wbr>CAEymZafiQtwKDxh0myQ1LD_<wbr>uByGKv5JyQ9PGzK3ZTmFPcOR=Kw@<wbr>mail.gmail.com</a><br>
><br>
> The RPATH flag is stored in a variable ldflag_rpath in PETSc.pc so you<br>
> can add it to PETSc paths, as done in this sample makefile.<br>
<br>
</span>Reading PETSC.pc from cmake, ldflag_rpath is ignored.</blockquote><div><br></div><div>That is hard to believe from the world's best build system CMake ;)</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
> PETSc.pc := $(PETSC_DIR)/$(PETSC_ARCH)/<wbr>lib/pkgconfig/PETSc.pc<br>
><br>
> CC := $(shell pkg-config --variable=ccompiler $(PETSc.pc))<br>
> CXX := $(shell pkg-config --variable=cxxcompiler $(PETSc.pc))<br>
> FC := $(shell pkg-config --variable=fcompiler $(PETSc.pc))<br>
> CFLAGS := $(shell pkg-config --variable=cflags_extra $(PETSc.pc)) $(shell<br>
> pkg-config --cflags-only-other $(PETSc.pc))<br>
> FFLAGS := $(shell pkg-config --variable=fflags_extra $(PETSc.pc))<br>
> CPPFLAGS := $(shell pkg-config --cflags-only-I $(PETSc.pc))<br>
> LDFLAGS := $(shell pkg-config --libs-only-L --libs-only-other $(PETSc.pc))<br>
> LDFLAGS += $(patsubst -L%, $(shell pkg-config --variable=ldflag_rpath<br>
> $(PETSc.pc))%, $(shell pkg-config --libs-only-L $(PETSc.pc)))<br>
> LDLIBS := $(shell pkg-config --libs-only-l $(PETSc.pc)) -lm<br>
><br>
> print:<br>
>       @echo CC=$(CC)<br>
>       @echo CFLAGS=$(CFLAGS)<br>
>       @echo CPPFLAGS=$(CPPFLAGS)<br>
>       @echo LDFLAGS=$(LDFLAGS)<br>
>       @echo LDLIBS=$(LDLIBS)<br>
><br>
> Franck Houssen <<a href="mailto:franck.houssen@inria.fr">franck.houssen@inria.fr</a>> writes:<br>
><br>
> > I believe -rpath is missing in PETSc.pc: is this intented ? Or forgotten ?<br>
> > If so, can someone add this to the PETSc.pc and push that in master/maint<br>
> > ?<br>
> > As PETSc is a lib to be used from user-defined applications, rpath is<br>
> > really critical !..<br>
> ><br>
> > Franck<br>
> ><br>
> >>> grep "Libs:" petsc/local/lib/pkgconfig/<wbr>PETSc.pc<br>
> >>> slepc/local/lib/pkgconfig/<wbr>SLEPc.pc<br>
> > petsc/local/lib/pkgconfig/<wbr>PETSc.pc:16:Libs: -L${libdir} -lpetsc<br>
> > slepc/local/lib/pkgconfig/<wbr>SLEPc.pc:11:Libs: -Wl,-rpath,${libdir}<br>
> > -L${libdir} -lslepc<br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div>
</div></div>