[petsc-users] funny link error
Matthew Knepley
knepley at gmail.com
Mon Mar 22 12:19:42 CDT 2021
On Mon, Mar 22, 2021 at 12:16 PM Scott Kruger <kruger at txcorp.com> wrote:
>
> The short answer is $PETSC_INSTALL_DIR/lib/pkgconfig/PETSc.pc
>
> Attached is a PETSc CMake snippet that should show you how to use
> pkg-config.
>
> It also shows how to set the compilers to the same as PETSc's for build
> consistency, but this part is not strictly necessary (but perhaps a good
> idea).
>
> FYI, Barry has been pushing to get a CMake build example as part of the
> test harness with the help of Jed and myself, but the Windows issues
> have been a real hold-up.
>
Also, letting people go over a cliff is one thing, but pointing them over
is another ;)
Matt
> Scott
>
>
> On 2021-03-22 11:03, Mark Adams did write:
> > Thanks Scott,
> >
> > Can you please tell us where this pkg-config file is?
> >
> > Thank again,
> > Mark
> >
> > On Mon, Mar 22, 2021 at 10:45 AM Scott Kruger <kruger at txcorp.com> wrote:
> >
> > >
> > > From you make.log, it looks like petsc found it here:
> > > /opt/cray/wlm_detect/1.3.3-7.0.1.1_4.19__g7109084.ari/lib64
> > >
> > > PETSc has it and found it because BuildSystem did the query of what
> > > it takes to get C/C++/Fortran to work together. Why is it needed?
> > > That's up to Cray.
> > >
> > > But the question is:
> > >
> > > How is your CMake build getting PETSc info?
> > >
> > > If
> > > a) it using pkg-config and CMake's ability to parse it, then it looks
> like
> > > our pkg-config export might need work.
> > > We'd need to see the pkg-config file to be sure though.
> > >
> > > and if
> > > b) it is not using pkg-config, then the answer is it should.
> > >
> > > Scott
> > >
> > >
> > > On 2021-03-21 08:25, Mark Adams did write:
> > > > We are having problems with linking and use static linking.
> > > > We get this error and have seen others like it (eg, lpetsc_lib_gcc_s)
> > > >
> > > > /usr/bin/ld: cannot find -lpetsc_lib_wlm_detect-NOTFOUND
> > > >
> > > > wlm_detect is some sort of system library, but I have no idea where
> this
> > > > petsc string comes from.
> > > > This is on Cori and the application uses cmake.
> > > > I can run PETSc tests fine.
> > > >
> > > > Any ideas?
> > > >
> > > > Thanks,
> > > > Mark
> > >
> > >
> > >
> > >
> > > --
> > > Scott Kruger
> > > Tech-X Corporation kruger at txcorp.com
> > > 5621 Arapahoe Ave, Suite A Phone: (720) 466-3196
> > > Boulder, CO 80303 Fax: (303) 448-7756
> > >
>
> --
> Scott Kruger
> Tech-X Corporation kruger at txcorp.com
> 5621 Arapahoe Ave, Suite A Phone: (720) 466-3196
> Boulder, CO 80303 Fax: (303) 448-7756
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210322/812d9d64/attachment.html>
More information about the petsc-users
mailing list