[petsc-users] dyld[19098]: Library not loaded: @rpath/libHYPRE-2.32.0.dylib

Pierre Jolivet pierre at joliv.et
Fri May 9 10:34:14 CDT 2025


Did you install Open MPI via Homebrew?
I don’t think this will work (at least, I have yet to see a single person make it work with the recent changes with Apple linker).
I would:
1) remove all this unnecessary stuff
CXX_LINKER_FLAGS=-Wl,-rpath,/opt/homebrew/lib CFLAGS="-g -O2 -fPIC" CXXFLAGS="-g -O2 -fPIC" FCFLAGS="-g -O2" FFLAGS="-g -O2" LDFLAGS="-Wl,-ld_classic -Wl,-commons,use_dylibs" MAKEFLAGS=w
These are either: default parameters or low-level parameters that are likely to break stuff if not set appropriately.
2) add something like --download-mpich or --download-openmpi to your configure options
3) start fresh by removing your previous PETSC_ARCH directory

Thanks,
Pierre

> On 9 May 2025, at 12:22 AM, Juan Salazar via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> Thank you for the feedback Matthew,
> 
> I should explain why there is a difference in the path variables. I am compiling PETSc on case-sensitive Apple File System as a volume mounted at /Volume/OpenFOAM. This is because I compile OpenFOAM natively (it is developed for Linux, but with some tweaks it can be compiled on macOS). I use the PETSc library within custom OpenFOAM  applications (solvers). Therefore I install PETSc in the same volume. 
> 
> Depending on how I reach the installation folder, the PWD variable will be set differently.
> 
> Last login: Thu May  8 19:05:51 on ttys004
> √ ~ % cd /Volumes/OpenFOAM/jsalazar-9/ThirdParty/petsc-3.23.1
> √ petsc-3.23.1 % pwd
> /Volumes/OpenFOAM/jsalazar-9/ThirdParty/petsc-3.23.1
> 
> Last login: Thu May  8 19:07:38 on ttys004
> √ ~ % cd ~/openfoam/jsalazar-9/ThirdParty/petsc-3.23.1
> √ petsc-3.23.1 % pwd
> /Users/jsalazar/openfoam/jsalazar-9/ThirdParty/petsc-3.23.1
> 
> I noticed that within the python configure script the path is obtained invariably through the command os.getcwd().
> 
> √ petsc-3.23.1 % python
> Python 3.12.10 (main, Apr  8 2025, 11:35:47) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import os
>>>> os.getcwd()
> '/Volumes/OpenFOAM/jsalazar-9/ThirdParty/petsc-3.23.1'
> 
> This result is the same independent of how I got to the folder. 
> 
> So I ran ./configure again making sure that PWD  is the same as os.getcwd(). Unfortunately this did not solve the problem. I believe the paths are consistent now.
> 
> Thanks again,
> Juan S.
> 
> 
> 
> 
> 
> 
> <make.log><check.log><configure.log>



More information about the petsc-users mailing list