Skip to content

Fail if there's a bad library link #286

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 5 commits into from
Jun 12, 2023
Merged
Changes from 1 commit
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
14 changes: 14 additions & 0 deletions utils/build-universal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,17 @@ MKTGZ_SCRIPT=`dirname "$0"`/macosx-make-tgz.sh
. $INST_SCRIPT

$MKTGZ_SCRIPT "$R_LIBS/$pkgname"

# Fail if there are links to the builder's gfortran
so_path="$R_LIBS/$pkgname/libs"
if [ -d "$so_path" ]; then
for arch in $TARGET_ARCHS; do
arch_so_path="${so_path}${arch}"
for so_file in $arch_so_path/*.so; do
bad_shared_libraries=`otool -L "$so_file" | grep /opt/gfortran`
if [ ! -z "$bad_shared_libraries" ]; then
exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be useful to print a warning/error mentioning the problematic .so file before exiting here ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The errors are displayed at 6e5bcac.

fi
done
done
fi