<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>De: </b>"Matthew Knepley" <knepley@gmail.com><br><b>À: </b>"Franck Houssen" <franck.houssen@inria.fr><br><b>Cc: </b>"Jed Brown" <jed@jedbrown.org>, "For users of the development version of PETSc" <petsc-dev@mcs.anl.gov><br><b>Envoyé: </b>Mardi 2 Janvier 2018 15:18:08<br><b>Objet: </b>Re: [petsc-dev] PETSc.pc: missing rpath ?<br><div><br></div><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" target="_blank">jed@jedbrown.org</a>><br>
> À: "Franck Houssen" <<a href="mailto:franck.houssen@inria.fr" target="_blank">franck.houssen@inria.fr</a>>, "For users of the development version of PETSc"<br>
> <<a href="mailto:petsc-dev@mcs.anl.gov" target="_blank">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/CAEymZafiQtwKDxh0myQ1LD_uByGKv5JyQ9PGzK3ZTmFPcOR=Kw@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></div></div></blockquote><div><br></div><div>Like everything in computer science, "stuffs" are supposed to ease your life most of the time... And sometimes not ! :D Another example would be CI : upgrading from ubuntu12 (TravisCI/CircleCI) is an everyday problem... Where cmake can help a lot !<br></div><div><br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>   Matt</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)/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" target="_blank">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/PETSc.pc<br>
> >>> slepc/local/lib/pkgconfig/SLEPc.pc<br>
> > petsc/local/lib/pkgconfig/PETSc.pc:16:Libs: -L${libdir} -lpetsc<br>
> > slepc/local/lib/pkgconfig/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"><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></blockquote><div><br></div></div></body></html>