Skip to content

Commit

Permalink
Downgrade patchelf to 0.16.1 when building linux packages.
Browse files Browse the repository at this point in the history
There is a bug that is being triggered by recent updates, causing `iree-tracy-capture` to be corrupted during auditwheel. Pinning to the old version of patchelf, which it depends on clears the issue.

Here is the patchelf issue where others have gotten stung: NixOS/patchelf#446
  • Loading branch information
stellaraccident authored and nhasabni committed Aug 24, 2023
1 parent af51a0c commit 19b8a49
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build_tools/python_deploy/build_linux_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ function run_in_docker() {
fi
export PATH="${python_dir}/bin:${orig_path}"
echo ":::: Python version $(python --version)"
prepare_python
# replace dashes with underscores
package_suffix="${package_suffix//-/_}"
case "${package}" in
Expand Down Expand Up @@ -172,6 +173,16 @@ function clean_wheels() {
rm -f -v "${output_dir}/${wheel_basename}-"*"-${python_version}-"*".whl"
}

function prepare_python() {
# The 0.17 series of patchelf can randomly corrupt executables. Fixes
# have landed but not yet been released. Consider removing this pin
# once 0.19 is released. We just override the system version with
# a pip side load.
pip install patchelf==0.16.1.0
hash -r
echo "patchelf version: $(patchelf --version) (0.17 is bad: https://github.com/NixOS/patchelf/issues/446)"
}

function install_deps() {
local wheel_basename="$1"
local python_version="$2"
Expand Down

0 comments on commit 19b8a49

Please sign in to comment.