From 45e30087fdf10d1ca4440c89a3791362e8dc03e4 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Wed, 21 Jan 2026 19:33:17 -0500 Subject: [PATCH] Fix NPB test images arm64 cross-build failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The NPB (NAS Parallel Benchmarks) test images were failing to build for arm64 architecture due to missing shebangs in NPB shell scripts. The sys/print_header and sys/print_instructions scripts in NPB lack default /bin/sh), they fail with "Error 127" (command not found) during QEMU-emulated cross-builds. Fix by adding shebangs to these scripts during the Docker build. Changes: - npb-ep: Add shebang fix, bump version 1.5 → 1.6.0 - npb-is: Add shebang fix, bump version 1.4 → 1.5.0 Signed-off-by: Davanum Srinivas --- test/images/node-perf/npb-ep/Dockerfile | 5 +++++ test/images/node-perf/npb-ep/VERSION | 2 +- test/images/node-perf/npb-is/Dockerfile | 4 ++++ test/images/node-perf/npb-is/VERSION | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test/images/node-perf/npb-ep/Dockerfile b/test/images/node-perf/npb-ep/Dockerfile index b808f6742ef..f0566fd490d 100644 --- a/test/images/node-perf/npb-ep/Dockerfile +++ b/test/images/node-perf/npb-ep/Dockerfile @@ -24,6 +24,11 @@ ADD http://www.nas.nasa.gov/assets/npb/NPB3.4.3.tar.gz . RUN tar xzf NPB3.4.3.tar.gz && chmod -R a+rX NPB3.4.3 WORKDIR ./NPB3.4.3/NPB3.4-OMP + +# Add missing shebangs to shell scripts - required for cross-build with QEMU emulation +# Without shebangs, dash (default /bin/sh on Debian) fails to execute these scripts via make +RUN sed -i '1i#!/bin/sh' sys/print_header sys/print_instructions + RUN if [ $(arch) != "x86_64" ]; then \ sed s/-mcmodel=medium//g config/NAS.samples/make.def_gcc > config/make.def; \ else \ diff --git a/test/images/node-perf/npb-ep/VERSION b/test/images/node-perf/npb-ep/VERSION index c239c60cba2..dc1e644a101 100644 --- a/test/images/node-perf/npb-ep/VERSION +++ b/test/images/node-perf/npb-ep/VERSION @@ -1 +1 @@ -1.5 +1.6.0 diff --git a/test/images/node-perf/npb-is/Dockerfile b/test/images/node-perf/npb-is/Dockerfile index 9f85deae60e..cffd827469c 100644 --- a/test/images/node-perf/npb-is/Dockerfile +++ b/test/images/node-perf/npb-is/Dockerfile @@ -25,6 +25,10 @@ RUN tar xzf NPB3.3.1.tar.gz && chmod -R a+rX NPB3.3.1 WORKDIR ./NPB3.3.1/NPB3.3-OMP +# Add missing shebangs to shell scripts - required for cross-build with QEMU emulation +# Without shebangs, dash (default /bin/sh on Debian) fails to execute these scripts via make +RUN sed -i '1i#!/bin/sh' sys/print_header sys/print_instructions + # Create build config based on the architecture and build the workload. RUN if [ $(arch) != "x86_64" ]; then \ sed s/-mcmodel=medium//g config/NAS.samples/make.def.gcc_x86 > config/make.def; \ diff --git a/test/images/node-perf/npb-is/VERSION b/test/images/node-perf/npb-is/VERSION index c068b2447cc..bc80560fad6 100644 --- a/test/images/node-perf/npb-is/VERSION +++ b/test/images/node-perf/npb-is/VERSION @@ -1 +1 @@ -1.4 +1.5.0