[petsc-users] soname seems to be absent in OS-X

Mohammad Mirzadeh mirzadeh at gmail.com
Tue Oct 27 14:00:09 CDT 2015


Denis,

I use Homebrew to manage petsc and all related dependencies on OSX which
uses .dylib for shared libs instead of .so. However, I have not had any
issues linking against them just the usual way by passing -L/path/to/lib
-lwhatever (you need to pass -Wl,-rpath,/path/to/lib as well if lib is not
in run-time search path).

Hope this helps.


On Tue, Oct 27, 2015 at 12:28 PM, Denis Davydov <davydden at gmail.com> wrote:

> Dear developers,
>
> It seems that the compiled PETSc library does not have a soname
> (-Wl,-install_name=xyz.dylib in OS-X).
> I compile PETSc/SLEPc using Homebrew both on OS-X and Linux and judging
> from ldd/otool there is indeed a difference:
>
> Linux (soname is there):
>
> $ ldd .linuxbrew_openblas/opt/slepc/lib/libslepc.so | grep "petsc"
>     libpetsc.so.3.6 => /home/woody/iwtm/iwtm108/.linuxbrew_openblas/Cellar/petsc/3.6.2/real/lib/libpetsc.so.3.6 (0x00007fac7822f000)
>
> OS-X (no soname):
>
> $ otool -L /usr/local/opt/slepc/lib/libslepc.dylib | grep "petsc"
>     /usr/local/opt/petsc/real/lib/libpetsc.3.6.2.dylib (compatibility version 3.6.0, current version 3.6.2)
>
>
> I do not see `-Wl,-soname=xyz` in linking flags and nothing like
> `-Wl,-install_name=xyz` is there on OS-X either.
> Any mac users can comment on this?
>
> p.s. as Macports web is down i can’t check what folks are doing there.
>
> Kind regards,
> Denis
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20151027/ac09f253/attachment.html>


More information about the petsc-users mailing list