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 dependencies (add patch for zmq and boost) #372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,17 @@ initialize_icu_packages()
fi
}

# ZeroMQ - replace strncopy with memcopy to fix error
patch_zmq_bug()
{
sed -i "s/strncpy (u.base.group, group_, length_)/memcpy (u.base.group, group_, length_)/" src/msg.cpp
}
# Boost - add cast
patch_boost_bug()
{
sed -i "s/= 1u /= static_cast<limb_type>(1u) /g" boost/multiprecision/cpp_int.hpp
}

# Because ZLIB doesn't actually parse its --disable-shared option.
# Because ZLIB doesn't follow GNU recommentation for unknown arguments.
patch_zlib_configuration()
Expand Down Expand Up @@ -483,6 +494,12 @@ build_from_tarball()
# Extract the source locally.
wget --output-document $ARCHIVE $URL
tar --extract --file $ARCHIVE --$COMPRESSION --strip-components=1

# If it's ZMQ, fix bugs (during cmake)
if [[ $ARCHIVE == $ZMQ_ARCHIVE ]]; then
patch_zmq_bug
fi

push_directory "$PUSH_DIR"

# Enable static only zlib build.
Expand Down Expand Up @@ -611,6 +628,9 @@ build_from_tarball_boost()
wget --output-document $ARCHIVE $URL
tar --extract --file $ARCHIVE --$COMPRESSION --strip-components=1

# Patch bug in boost
patch_boost_bug

initialize_boost_configuration
initialize_boost_icu_configuration

Expand Down