Skip to content

Commit 1c3bdf6

Browse files
committed
COMP: Fix manylinux scripts using portable "uname -m" command
The use of "uname -p" returns "unknown" when used within the 2_24 image.
1 parent 274f73e commit 1c3bdf6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

scripts/internal/manylinux-build-common.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ else
2828
fi
2929

3030
# i686 or x86_64 ?
31-
case $(uname -p) in
31+
case $(uname -m) in
3232
i686)
3333
ARCH=x86
3434
;;
@@ -39,13 +39,13 @@ case $(uname -p) in
3939
ARCH=aarch64
4040
;;
4141
*)
42-
die "Unknown architecture $(uname -p)"
42+
die "Unknown architecture $(uname -m)"
4343
;;
4444
esac
4545

4646
# Install prerequirements
4747
export PATH=/work/tools/doxygen-1.8.11/bin:$PATH
48-
case $(uname -p) in
48+
case $(uname -m) in
4949
i686)
5050
ARCH=x86
5151
;;
@@ -69,7 +69,7 @@ case $(uname -p) in
6969
fi
7070
;;
7171
*)
72-
die "Unknown architecture $(uname -p)"
72+
die "Unknown architecture $(uname -m)"
7373
;;
7474
esac
7575
if ! type ninja > /dev/null 2>&1; then

scripts/internal/manylinux-build-module-wheels.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ for PYBIN in "${PYBINARIES[@]}"; do
9595
-DITK_USE_SYSTEM_SWIG:BOOL=ON \
9696
-DWRAP_ITK_INSTALL_COMPONENT_IDENTIFIER:STRING=PythonWheel \
9797
-DSWIG_EXECUTABLE:FILEPATH=${itk_build_dir}/Wrapping/Generators/SwigInterface/swig/bin/swig \
98-
-DCMAKE_CXX_COMPILER_TARGET:STRING=$(uname -p)-linux-gnu \
98+
-DCMAKE_CXX_COMPILER_TARGET:STRING=$(uname -m)-linux-gnu \
9999
-DBUILD_TESTING:BOOL=OFF \
100100
-DPython3_EXECUTABLE:FILEPATH=${Python3_EXECUTABLE} \
101101
-DPython3_INCLUDE_DIR:PATH=${Python3_INCLUDE_DIR} \
@@ -108,7 +108,7 @@ if test "${ARCH}" == "x64"; then
108108
# Make sure auditwheel is installed for this python exe before importing
109109
# it in auditwheel_whitelist_monkeypatch.py
110110
sudo ${Python3_EXECUTABLE} -m pip install auditwheel
111-
for whl in dist/*linux_$(uname -p).whl; do
111+
for whl in dist/*linux_$(uname -m).whl; do
112112
# Repair wheel using monkey patch to exclude shared libraries provided in whitelist
113113
${Python3_EXECUTABLE} "${script_dir}/auditwheel_whitelist_monkeypatch.py" \
114114
repair ${whl} -w /work/dist/ --whitelist "${EXCLUDE_LIBS}"

0 commit comments

Comments
 (0)