[petsc-users] Doubt about distribution of PETSc in a CMake project

Satish Balay balay at mcs.anl.gov
Thu Jul 21 08:41:17 CDT 2022


Another alternative: you can install PETSc with:

--with-shared-libraries=0

[but some of the dependent libraries might still be shared - if so - you'll need to figure out static build for them. If they are installed with --download-pkg option of configure - likely it will be static]

Satish

On Thu, 21 Jul 2022, Satish Balay via petsc-users wrote:

> You can try:
> 
> ldd your-executable
> 
> And copy over all the .so files listed by it [ignoring the system libraries - that might be present on the remote machine
> 
> 
> Try setting LD_LIBRARY_PATH to this location [n the new machine]
> 
> and retry 'ldd your-executable' on the new machine - and make sure there are no 'not found' libraries in that list
> 
> then your-executable is likely to work.
> 
> Note: this might not work parallely - as you would need mpiexec for a parallel run
> 
> Satish
> 
> On Thu, 21 Jul 2022, Sebastian Gutierrez wrote:
> 
> > 
> >  
> > 
> > Good afternoon PETSc Development Team,
> > 
> >  
> > 
> > I have been trying to distribute your program as third party library in my CMake Project. Because I do not want to my Linux users to have to install petsc by their own. I just want them to use my final
> > product that uses petsc dependencies. When I execute make install  of my Project in my own machine, it works perfectly but the problem appears when I move the executable to another machine that does not have
> > installed petsc.
> > 
> >  
> > 
> > I honestly have no idea to solve this. I wrote this email in hopes that you kindly help me out with this.
> > 
> > I am looking forward to your answer.
> > 
> >  
> > 
> > Best regards,
> > 
> >  
> > 
> > Sebastian Gutierrez
> > 
> > 
> > 
> 


More information about the petsc-users mailing list