Skip to content

use install_name_tool to fix dylib's install_name #154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions patches/0001-do-not-add-LIBNAMESUFFIX-to-dylib.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From cb3d41f8c1b0dce4c954937b32eb76f7154c33ee Mon Sep 17 00:00:00 2001
From: Matti Picus <matti.picus@gmail.com>
Date: Wed, 17 Apr 2024 09:24:51 +1000
Subject: [PATCH] do not add LIBNAMESUFFIX to dylib

---
exports/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exports/Makefile b/exports/Makefile
index 33c47d477..457e59b2c 100644
--- a/exports/Makefile
+++ b/exports/Makefile
@@ -137,7 +137,7 @@ libgoto_hpl.def : $(GENSYM)

ifeq ($(OSNAME), Darwin)
ifeq ($(FIXED_LIBNAME),1)
-INTERNALNAME = $(LIBPREFIX)$(LIBNAMESUFFIX).dylib
+INTERNALNAME = $(LIBPREFIX).dylib
else
INTERNALNAME = $(LIBPREFIX).$(MAJOR_VERSION).dylib
endif
--
2.39.3 (Apple Git-146)

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "scipy-openblas64"
version = "0.3.27.44.0"
version = "0.3.27.44.1"
requires-python = ">=3.7"
description = "Provides OpenBLAS for python packaging"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion tools/build_steps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function do_build_lib {
CFLAGS="$CFLAGS -fvisibility=protected -Wno-uninitialized" \
make BUFFERSIZE=20 DYNAMIC_ARCH=1 \
USE_OPENMP=0 NUM_THREADS=64 \
BINARY=$bitness $interface_flags $target_flags > /dev/null
BINARY=$bitness $interface_flags $target_flags
make PREFIX=$BUILD_PREFIX $interface_flags install
popd
stop_spinner
Expand Down
8 changes: 8 additions & 0 deletions tools/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ if [[ $py_version != $pkg_version* ]]; then
exit 1
fi

if [ $(uname) == "Darwin" ]; then
soname=$(cd local/scipy_openblas64/lib; ls libscipy_openblas*.dylib)
echo otool -D local/scipy_openblas64/lib/$soname
otool -D local/scipy_openblas64/lib/$soname
# issue 153: there is a ".0" in the install_name. Remove it
install_name_tool -id $soname local/scipy_openblas64/lib/$soname
fi

rm -rf local/scipy_openblas64/lib/pkgconfig
echo "" >> LICENSE.txt
echo "----" >> LICENSE.txt
Expand Down