[petsc-dev] Mac OS X El Capitan does not propagate DYLD_LIBRARY_PATH from parent process
Satish Balay
balay at mcs.anl.gov
Mon Oct 5 11:31:58 CDT 2015
On Mon, 5 Oct 2015, Andrs, David wrote:
> On Mon, Oct 5, 2015 at 9:20 AM, Satish Balay <balay at mcs.anl.gov> wrote:
>
> > Thanks for the note.
> >
> > This sounds more like a 'broken compiler' issue.
> >
>
> It looks like it when the compiler is invoked from an interpreter (like
> bash or python). If we run clang from the command line directly, it works
> fine.
ok. as you mentioned - DYLD_LIBRAY_PATH is not in configure python's env variable list
>
>
> >
> > PETSc buildsystem attempts to not rely on DYLD_LIBRARY_PATH.
> >
> > i.e whenever possible - it converts all '-L/foo to '-L/foo
> > -Wl,-rpath,/foo' in the link line.
> >
> > However if 'mpicc/cc' is provided - it assumes it works - and doesn't
> > try to detect its internal libs - so it won't add -Wl-rpath to such
> > internal paths - so its likely to fail with mpicc that relies on
> > DYLD_LIBRARY_PATH
> >
> > [Workarround is to add 'LIBS=-Wl,/foo' option to configure]
This workarround should work..
Satish
> >
> > I had recently run --download-mpich build [with default compilers] on
> > 'El Capitan' - and that ran fine.
> >
> > BTW: is libiomp5.dylib a clang library? [normally I see this with intel
> > compiler]
> >
>
> Sorry for confusion, the lib name is libomp.dylib. We had to build this
> library ourselves to enable openmp and then clang version 3.5.x was able to
> use it (I think we had to use some special branch with older versions of
> clang). Obviously, we need to change the way we build clang, so it does not
> rely on DYLD_LIBRAY_PATH and all will be fine.
>
>
> > Also - could you send us the configure.log for a build that breaks with it?
> >
> [so that we can see what exactly breaks on El..]
> >
>
> It is the typical:
>
> Library not loaded:
> ...
> Reason: image not found
>
> Log attached.
> --
> David
>
>
>
> >
> > Satish
> >
> > On Mon, 5 Oct 2015, Andrs, David wrote:
> >
> > > Hi guys!
> > >
> > > If you are not aware of this yet, DYLD_LIBRARY_PATH does not get
> > propagated
> > > into the child processes on El Capitan. See
> > > https://forums.developer.apple.com/message/31148
> > >
> > > I am not sure if that has some implications for your build system, but we
> > > were not able to build PETSc because one of our libraries
> > (libiomp5.dylib)
> > > relied on it and the build system failed detecting the compiler (we ship
> > > our version of clang with MOOSE).
> > >
> > > I know, it is not a build system issue, it is how we build some
> > underlying
> > > piece. I just wanted to make you are aware of this.
> > >
> > > --
> > > David
> > >
> >
> >
>
More information about the petsc-dev
mailing list