Skip to content

Commit 006a9e5

Browse files
committed
fix(bin/install.sh): try to modify copied 'libomp' with 'sudo' after first failure
1 parent 5ce2682 commit 006a9e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/install.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,10 @@ function _install {
630630

631631
echo "# modifying the install name of the copied 'libomp.dylib'"
632632
quiet install_name_tool -id "@rpath/$(basename "$libomp_path")" "$SOCKET_HOME/lib/$arch-desktop/codesign/$(basename "$libomp")"
633-
die $? "not ok - failed to modify the install name of copied 'libomp.dylib'"
633+
if (( $? != 0 )); then
634+
sudo install_name_tool -id "@rpath/$(basename "$libomp_path")" "$SOCKET_HOME/lib/$arch-desktop/codesign/$(basename "$libomp")"
635+
die $? "not ok - failed to modify the install name of copied 'libomp.dylib'"
636+
fi
634637
else
635638
if (( do_link == 1 )); then
636639
ln -sf "$BUILD_DIR/$arch-$platform"/lib/*.metallib "$SOCKET_HOME/lib/$arch-$platform"

0 commit comments

Comments
 (0)