Skip to content
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

Fix macosx runpath dynamic library issue freetype lib #216

Merged
Changes from 11 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
21 changes: 21 additions & 0 deletions sbin/common-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,27 @@ checkingAndDownloadingFreeType()
else
# shellcheck disable=SC2154
echo "${good}Successfully configured OpenJDK with the FreeType library (libfreetype)!"

if [[ ${OS_KERNEL_NAME} == "darwin" ]] ; then
TARGET_DYNAMIC_LIB_DIR="${WORKING_DIR}"/"${OPENJDK_REPO_NAME}"/installedfreetype/lib/
TARGET_DYNAMIC_LIB="${TARGET_DYNAMIC_LIB_DIR}"/libfreetype.6.dylib
echo ""
echo "Listing the contents of ${TARGET_DYNAMIC_LIB_DIR} to see if the dynamic library 'libfreetype.6.dylib' has been created..."
ls "${TARGET_DYNAMIC_LIB_DIR}"

echo ""
echo "Releasing the runpath dependency of the dynamic library ${TARGET_DYNAMIC_LIB}"
set -x
install_name_tool -id @rpath/libfreetype.6.dylib "${TARGET_DYNAMIC_LIB}"
Copy link
Contributor Author

@neomatrix369 neomatrix369 Feb 5, 2018

Choose a reason for hiding this comment

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

@mbvreddy After all the conversations on issue #202, here's our current solution, I have reverted the change to include @rpath in the parameter.

You mentioned it worked for you, could you please share your command history with us, so I can apply them here.

I have seen @smlambert's workaround, unsure if I can include them in the build script.

set +x

# shellcheck disable=SC2181
if [[ $? == 0 ]]; then
echo "Successfully released the runpath dependency of the dynamic library ${TARGET_DYNAMIC_LIB}"
else
echo "Failed to release the runpath dependency of the dynamic library ${TARGET_DYNAMIC_LIB}"
fi
fi
fi
# shellcheck disable=SC2154
echo "${normal}"
Expand Down