Opened 16 months ago

#72299 new defect

scalapack @2.2.1_0+gfortran+mpich+openblas: linking the dylib crashes with: duplicate LC_PATH in libscalapack.2.2.1.dylib

Reported by: kamischi (Karl-Michael Schindler) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: scalapack

Description

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

Change History (0)

Note: See TracTickets for help on using tickets.