Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.15.0, 1.15.1, 1.16.0, 1.17.0, 1.15.2, 1.15.3, 1.16.1, 1.15.4, 1.16.2, 1.18.0, 1.17.1, 1.15.5, 1.16.3, 1.17.2
-
Apple Silicon architecture (M2 Pro)
macOS Ventura (Version 13.3.1)
Description
Attempting to build the Flink project on Apple Silicon architecture results in an error related to the execution of the frontend-maven-plugin.
The error message indicates that the plugin fails to run "flink/flink-runtime-web/web-dashboard/node/node" program due to a "Bad CPU type in executable" error.
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.11.0:npm (npm install) on project flink-runtime-web: Failed to run task: 'npm ci --cache-max=0 --no-save ${npm.proxy}' failed. java.io.IOException: Cannot run program "flink/flink-runtime-web/web-dashboard/node/node" (in directory "flink/flink-runtime-web/web-dashboard"): error=86, Bad CPU type in executable
Steps to Reproduce:
- Clone the Flink project repository.
- Attempt to build the project on an Apple Silicon device.
- Observe the error message mentioned above.
git clone https://github.com/apache/flink.git cd flink ./mvnw clean package -DskipTests
Proposed Solution
Upgrade frontend-maven-plugin from version 1.11.0 to the latest version, 1.12.1.
frontend-maven-plugin version 1.11.0 downloads x64 binaries node-v16.13.2-darwin-x64.tar.gz instead of the arm64 binaries.
Support for arm64 has been available for frontend-maven-plugin since version 2. https://github.com/eirslett/frontend-maven-plugin/pull/970
[DEBUG] Executing command line [/Users/elphas/src/flink/flink-runtime-web/web-dashboard/node/node, --version] [INFO] Installing node version v16.13.2 [DEBUG] Creating temporary directory /flink/flink-runtime-web/web-dashboard/node/tmp [INFO] Unpacking ~/.m2/repository/com/github/eirslett/node/16.13.2/node-16.13.2-darwin-x64.tar.gz into flink/flink-runtime-web/web-dashboard/node/tmp
Attachments
Issue Links
- links to