Dear Jean-Paul,

Thank you for your reply. I was on vacation in the past week. so I reply 
you late. I tried the method according to your suggestions. Now 
my dealii finally works. The following method I summarized for other people 
who also have those dynamic library link errors.

*installation Error type:*

dyld: Library not loaded: libXXX.dylib

  Referenced from: username/deal.ii-candi/petsc-3.7.6/lib/libXXX.dylib

  Reason: image not found

if you also encounter the above error when using candi stript to install 
dealii and other denpendent libraries, the error means when you run the 
executable file, the executable file cannot find the dynamic library. You 
can use "otool -L libXXX.dylib" command to check the link path of dependent 
libraries. If you cannot see the link path of libXXX.dylib, you may need to 
change the link path by yourself.

*Steps to solve the installation error:*

1. go the library folder and change the id of libXXX.dylib     
           install_name_tool -id "@rpath/libXXX.dylib" libXXX.dylib
2. go the executable folder (), change the link path and add path to the 
executable file (libYYY.dylib)
  install_name_tool -change libXXX.dylib @rpath/libXXX.dylib libYYY.dylib
  install_name_tool -add_rpath "@rpath/libXXX.dylib" libYYY.dylib

You may need to use otool -L command to find out which path need to change 
and need to change a lot of dynamic libraries.


Cheers,
Zhibo




在 2018年8月24日星期五 UTC-4上午2:13:09,Jean-Paul Pelteret写道:
>
> Dear Zhibo,
>
> I guess that this could be fixed in Candi (? ping Uwe, Timo). As of the El 
> Capitan release (I think), its not possible to use DYLD_LIBRARY_PATH 
> anymore if SIP (System Integrity Protection) is enabled. For an immediate 
> solution I would suggest trying to use install_name_tool to add the full 
> path of (or an @rpath to) these problematic libraries. Here’s a link to a 
> StackOverflow post <https://stackoverflow.com/a/33992190> that has more 
> details. I hope that using this tool to direct to the location of the 
> linked in library will resolve the issue.
>
> Best,
> Jean-Paul
>
> On 22 Aug 2018, at 21:30, Zhibo Luo <[email protected] <javascript:>> 
> wrote:
>
>
> Hi all,
>
> I recently update my MacOs system to latest macOS High Sierra (10.13.6) 
> and crash my dealii. so I decide to reinstall dealii through candi script. 
> The installation works fine except some warnings. The problem is that when 
> I cd to step-1, cmake and make command get passed, however, when I make 
> run, error comes:
>
> [ 66%] Built target step-1
> [100%] *Run step-1 with Debug configuration*
> dyld: Library not loaded: libsuperlu_dist.5.dylib
>   Referenced from: 
> /Users/zhiboluo/deal.ii-candi/deal.II-v9.0.0/examples/step-1/./step-1
>   Reason: image not found
> make[3]: *** [CMakeFiles/run] Abort trap: 6
> make[2]: *** [CMakeFiles/run.dir/all] Error 2
> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
>
> I found similar issue here: 
> https://groups.google.com/forum/#!searchin/dealii/dyld$3A$20Library$20not$20loaded$20%7Csort:date/dealii/fIXfMnaFdEc/zgHjkY3_CAAJ
>
> And I tried the suggested method by export 
> DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:~/deal.ii-candi/superlu_dist_5.1.2/lib, 
> but it doesn't work for me. 
>
> I used otool command to output the link libraries:
>
> zhiboluo$ otool -L step-1
> step-1:
> /Users/zhiboluo/deal.ii-candi/deal.II-v9.0.0/lib/libdeal_II.g.9.0.0.dylib 
> (compatibility version 9.0.0, current version 9.0.0)
> /Users/zhiboluo/deal.ii-candi/p4est-2.0/DEBUG/lib/libp4est-2.0.dylib 
> (compatibility version 0.0.0, current version 0.0.0)
> /Users/zhiboluo/deal.ii-candi/p4est-2.0/DEBUG/lib/libsc-2.0.dylib 
> (compatibility version 0.0.0, current version 0.0.0)
> /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
> @rpath/libmuelu-adapters.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libmuelu-interface.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libmuelu.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libteko.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libstratimikos.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libstratimikosbelos.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libstratimikosaztecoo.12.dylib (compatibility version 12.0.0, 
> current version 12.10.1)
> @rpath/libstratimikosamesos.12.dylib (compatibility version 12.0.0, 
> current version 12.10.1)
> @rpath/libstratimikosml.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libstratimikosifpack.12.dylib (compatibility version 12.0.0, 
> current version 12.10.1)
> @rpath/libifpack2-adapters.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libifpack2.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libanasazitpetra.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libModeLaplace.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libanasaziepetra.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libanasazi.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libamesos2.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libbelostpetra.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libbelosepetra.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libbelos.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libml.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libifpack.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libzoltan2.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libpamgen_extras.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libpamgen.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libamesos.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libgaleri-xpetra.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libgaleri-epetra.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libaztecoo.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libisorropia.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libxpetra-sup.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libxpetra.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libthyratpetra.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libthyraepetraext.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libthyraepetra.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libthyracore.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libepetraext.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libtpetraext.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libtpetrainout.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libtpetra.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libkokkostsqr.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libtpetrakernels.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libtpetraclassiclinalg.12.dylib (compatibility version 12.0.0, 
> current version 12.10.1)
> @rpath/libtpetraclassicnodeapi.12.dylib (compatibility version 12.0.0, 
> current version 12.10.1)
> @rpath/libtpetraclassic.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libtriutils.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libzoltan.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libepetra.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libsacado.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/librtop.12.dylib (compatibility version 12.0.0, current version 
> 12.10.1)
> @rpath/libteuchoskokkoscomm.12.dylib (compatibility version 12.0.0, 
> current version 12.10.1)
> @rpath/libteuchoskokkoscompat.12.dylib (compatibility version 12.0.0, 
> current version 12.10.1)
> @rpath/libteuchosremainder.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libteuchosnumerics.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libteuchoscomm.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libteuchosparameterlist.12.dylib (compatibility version 12.0.0, 
> current version 12.10.1)
> @rpath/libteuchoscore.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libkokkosalgorithms.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libkokkoscontainers.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> @rpath/libkokkoscore.12.dylib (compatibility version 12.0.0, current 
> version 12.10.1)
> libsuperlu_dist.5.dylib (compatibility version 5.0.0, current version 
> 5.1.0)
> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 
> 1252.50.4)
> /Users/zhiboluo/deal.ii-candi/hdf5-1.10.1/lib/libhdf5_hl.100.dylib 
> (compatibility version 101.0.0, current version 101.1.0)
> /Users/zhiboluo/deal.ii-candi/hdf5-1.10.1/lib/libhdf5.101.dylib 
> (compatibility version 102.0.0, current version 102.0.0)
> libTKBO.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKBool.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKBRep.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKernel.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKFeat.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKFillet.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKG2d.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKG3d.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKGeomAlgo.11.dylib (compatibility version 11.0.0, current version 
> 11.0.0)
> libTKGeomBase.11.dylib (compatibility version 11.0.0, current version 
> 11.0.0)
> libTKHLR.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKIGES.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKMath.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKMesh.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKOffset.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKPrim.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKShHealing.11.dylib (compatibility version 11.0.0, current version 
> 11.0.0)
> libTKSTEP.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKSTEPAttr.11.dylib (compatibility version 11.0.0, current version 
> 11.0.0)
> libTKSTEPBase.11.dylib (compatibility version 11.0.0, current version 
> 11.0.0)
> libTKSTEP209.11.dylib (compatibility version 11.0.0, current version 
> 11.0.0)
> libTKSTL.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> libTKTopAlgo.11.dylib (compatibility version 11.0.0, current version 
> 11.0.0)
> libTKXSBase.11.dylib (compatibility version 11.0.0, current version 11.0.0)
> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 
> (compatibility version 1.0.0, current version 4.0.0)
> /usr/local/opt/open-mpi/lib/libmpi_usempif08.40.dylib (compatibility 
> version 51.0.0, current version 51.1.0)
> /usr/local/opt/open-mpi/lib/libmpi_usempi_ignore_tkr.40.dylib 
> (compatibility version 51.0.0, current version 51.1.0)
> /usr/local/opt/open-mpi/lib/libmpi_mpifh.40.dylib (compatibility version 
> 51.0.0, current version 51.1.0)
> /usr/local/opt/open-mpi/lib/libmpi.40.dylib (compatibility version 51.0.0, 
> current version 51.1.0)
> /Users/zhiboluo/deal.ii-candi/slepc-3.7.3/lib/libslepc.3.7.dylib 
> (compatibility version 3.7.0, current version 3.7.3)
> /Users/zhiboluo/deal.ii-candi/petsc-3.7.6/lib/libpetsc.3.7.dylib 
> (compatibility version 3.7.0, current version 3.7.6)
> libparmetis.dylib (compatibility version 0.0.0, current version 0.0.0)
> libmetis.dylib (compatibility version 0.0.0, current version 0.0.0)
> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
>  
> (compatibility version 1.0.0, current version 1.0.0)
> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
>  
> (compatibility version 1.0.0, current version 1.0.0)
> /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (compatibility version 
> 1.0.0, current version 1.0.0)
> /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (compatibility version 
> 1.0.0, current version 1.0.0)
> /usr/local/lib/gcc/8/libgcc_s.1.dylib (compatibility version 1.0.0, 
> current version 1.0.0)
> /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 
> 400.9.0)
> @rpath/libLTO.dylib (compatibility version 1.0.0, current version 
> 3902.0.39)
>
> I found that some other libraries path (like p4est, slepc, and petsc) are 
> set correctly. However, the library path of superlu_dist, parmetis, and oce 
> are not set correctly. The generated object try to find 
> "libsuperlu_dist.5.dylib" in the current path, but actually this library is 
> installed in /Users/zhiboluo/deal.ii-candi/superlu_dist_5.1.2/lib. Then I 
> copy these libraries to current folder, "make run" works! But I don't want 
> to copy these libraries everytime I go to compile another project. 
>
> *Any suggestions to solve this dynamic library link problems?*
>
> *Thanks~*
>
>
>
>
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to