[MacPorts] #72299: scalapack @2.2.1_0+gfortran+mpich+openblas: linking the dylib crashes with: duplicate LC_PATH in libscalapack.2.2.1.dylib

MacPorts noreply at macports.org
Sun Apr 6 11:21:55 UTC 2025


#72299: scalapack @2.2.1_0+gfortran+mpich+openblas: linking the dylib crashes with:
duplicate LC_PATH in libscalapack.2.2.1.dylib
----------------------+-----------------------
 Reporter:  kamischi  |      Owner:  (none)
     Type:  defect    |     Status:  new
 Priority:  Normal    |  Milestone:
Component:  ports     |    Version:
 Keywords:            |       Port:  scalapack
----------------------+-----------------------
 Platform:
 \\
 macOS 15.4 arm64
 \\
 Xcode 16.3

 Linking the library crashes with: duplicate LC_RPATH
 '/opt/local/lib/libgcc' and '/opt/local/lib/' in the same way as with esmf
 (https://trac.macports.org/ticket/68400).

 The subsequent workaround with two additions to the Portfile fixed the
 problem. The first deletes LC_RPATH '/opt/local/lib/libgcc', but not the
 LC_RPATH '/opt/local/lib'. Therefore, the second addition is need to
 remove this LC_PATH as well.

 {{{
 ⋮
 compilers.add_gcc_rpath_support no
 ⋮
 post-build {
     system -W ${workpath}/build/lib/ "install_name_tool -delete_rpath
 ${prefix}/lib lib${name}${version}.dylib"
 }
 ⋮
 }}}

 However, I am not sure, whether this fix is acceptable. Also, this problem
 seems to affect a number of packages and may point to a common underlying
 issue in the creation of these dylibs. I have no clue, where these
 duplicate LC_PATHs are generated.

 I found this command helpful for checking the dylib for duplicate LC_PATHs
 (assuming the default prefix):

 {{{
 otool -l /opt/local/lib/libscalapack.2.2.1.dylib | grep path
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/72299>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list