Skip to content

Commit

Permalink
Force siphash24 hash algorithm when cross-compiling
Browse files Browse the repository at this point in the history
When cross-compiling, the hash function is forced to be FNV because the
configure script defines `HAVE_ALIGNED_REQUIRED` which is then used by
pyhash.h to change the default to FNV (see conda-forge#718)

This commit fixes the issue by specifying siphash24 to the configure
script when cross-compiling.
  • Loading branch information
gmarkall committed Sep 24, 2024
1 parent 2b30276 commit 3cd716d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions recipe/build_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ _common_configure_args+=(--with-tcltk-includes="-I${PREFIX}/include")
_common_configure_args+=("--with-tcltk-libs=-L${PREFIX}/lib -ltcl8.6 -ltk8.6")
_common_configure_args+=(--with-platlibdir=lib)

if [[ "${CONDA_BUILD_CROSS_COMPILATION}" == "1" ]]; then
_common_configure_args+=(--with-hash-algorithm=siphash24)
fi

# Add more optimization flags for the static Python interpreter:
declare -a PROFILE_TASK=()
if [[ ${_OPTIMIZED} == yes ]]; then
Expand Down
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% set ver2 = '.'.join(version.split('.')[0:2]) %}
{% set ver2nd = ''.join(version.split('.')[0:2]) %}
{% set ver3nd = ''.join(version.split('.')[0:3]) %}
{% set build_number = 0 %}
{% set build_number = 1 %}

# this makes the linter happy
{% set channel_targets = channel_targets or 'conda-forge main' %}
Expand Down

0 comments on commit 3cd716d

Please sign in to comment.