Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[buildpacks] cannot build node on macOS-arm64 #2525

Open
weikanglim opened this issue Sep 18, 2024 · 4 comments
Open

[buildpacks] cannot build node on macOS-arm64 #2525

weikanglim opened this issue Sep 18, 2024 · 4 comments

Comments

@weikanglim
Copy link

On a macOS ARM64 machine, in any node project with package.json, run pack build myapp --builder mcr.microsoft.com/oryx/builder:debian-bullseye-20240424.1 --path .

The following error is observed:

[builder] Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
[builder]    at CallSite.Target(Closure, CallSite, Object)
[builder] /cnb/buildpacks/oryx_node-build/0.0.1/bin/build: line 47:    73 Aborted                 oryx build ${PWD} --platform "${NODE_ORYX_BUILD_NAME}" --platform-version "${BP_PLATFORM_VERSION}" --output ./oryx-output

Full output below:

pack build myapp --builder mcr.microsoft.com/oryx/builder:debian-bullseye-20240424.1 --path .   
debian-bullseye-20240424.1: Pulling from oryx/builder
Digest: sha256:b4960e88f70c9e39a0e51df060a1b51b4f7405323ab24c83e428dc80a43b130a
Status: Image is up to date for mcr.microsoft.com/oryx/builder:debian-bullseye-20240424.1
stack-run-debian-bullseye-20230926.1: Pulling from oryx/builder
Digest: sha256:b4e65a33543997bab33856cb8cad948aa5b12dd152c34b1f1d6db9ec190e73dc
Status: Image is up to date for mcr.microsoft.com/oryx/builder:stack-run-debian-bullseye-20230926.1
0.17.0: Pulling from buildpacksio/lifecycle
Digest: sha256:bc0d791f89bda0e8fbf9bf3e47c2faf1ac4eca4b16f0b01c6cb606883759766a
Status: Image is up to date for buildpacksio/lifecycle:0.17.0
===> ANALYZING
[analyzer] Timer: Analyzer started at 2024-09-18T15:10:19Z
[analyzer] Image with name "myapp" not found
[analyzer] Timer: Analyzer ran for 1.234709ms and ended at 2024-09-18T15:10:19Z
===> DETECTING
[detector] Warning: Platform requested experimental feature 'Dockerfiles'
[detector] Timer: Detector started at 2024-09-18T15:10:43Z
[detector] oryx/node-runtime 0.0.1
[detector] oryx/node-install 0.0.1
[detector] fagiani/apt       0.2.5
[detector] oryx/node-build   0.0.1
[detector] Timer: Detector ran for 3.590343794s and ended at 2024-09-18T15:10:47Z
[detector] Timer: Generator started at 2024-09-18T15:10:47Z
[detector] Loading environment variables from existing 'oryx.env' file.
[detector] Warning: new runtime base image 'mcr.microsoft.com/oryx/node:18.19.1-debian-bullseye' not found in run metadata
[detector] Timer: Generator ran for 83.31075ms and ended at 2024-09-18T15:10:47Z
18.19.1-debian-bullseye: Pulling from oryx/node
Digest: sha256:406c9a8e30e96d0027d84191ad4af6b1047c37210ec85d7d620dc178e44968b2
Status: Image is up to date for mcr.microsoft.com/oryx/node:18.19.1-debian-bullseye
===> RESTORING
[restorer] Timer: Restorer started at 2024-09-18T15:10:48Z
[restorer] Timer: Restorer ran for 1.2775ms and ended at 2024-09-18T15:10:48Z
===> BUILDING
[builder] Timer: Builder started at 2024-09-18T15:10:49Z
[builder] Loading environment variables from existing 'oryx.env' file.
[builder] Preparing environment for nodejs=18
[builder] Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
[builder] You can report issues at https://github.com/Microsoft/Oryx/issues
[builder] 
[builder] Oryx Version: 0.2.0.0, Commit: 367e0ec93195de6a8503ff5fe7a1fe41fc772c35, ReleaseTagName: 
[builder] 
[builder] Skipping platform detection since '--skip-detection' switch was used...
[builder] Version '18.20.4' of platform 'nodejs' is not installed. Generating script to install it...
[builder] 
[builder] Setting up environment...
[builder] 
[builder] 
[builder] Downloading and extracting 'nodejs' version '18.20.4' to '/layers/opt/nodejs/18.20.4'...
[builder] Detected image debian flavor: bullseye.
[builder] Downloaded in 1 sec(s).
[builder] Verifying checksum...
[builder] Extracting contents...
[builder] performing sha512 checksum for: nodejs...
[builder] Done in 3 sec(s).
[builder] 
[builder] 
[builder] Done setting up environment.
[builder] 
[builder] Loading environment variables from existing 'oryx.env' file.
[builder] Building application with platform nodejs=18
[builder] Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
[builder] You can report issues at https://github.com/Microsoft/Oryx/issues
[builder] 
[builder] Oryx Version: 0.2.0.0, Commit: 367e0ec93195de6a8503ff5fe7a1fe41fc772c35, ReleaseTagName: 
[builder] 
[builder] Build Operation ID: 89ed1a791ed8f4ab
[builder] OS Type           : bullseye
[builder] Image Type        : cli
[builder] 
[builder] Detecting platforms...
[builder] Detected following platforms:
[builder]   nodejs: 18.20.4
[builder]   python: 3.8.19
[builder]   php: 8.0.30
[builder] Version '3.8.19' of platform 'python' is not installed. Generating script to install it...
[builder] Version '8.0.30' of platform 'php' is not installed. Generating script to install it...
[builder] Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
[builder]    at CallSite.Target(Closure, CallSite, Object)
[builder] /cnb/buildpacks/oryx_node-build/0.0.1/bin/build: line 47:    73 Aborted                 oryx build ${PWD} --platform "${NODE_ORYX_BUILD_NAME}" --platform-version "${BP_PLATFORM_VERSION}" --output ./oryx-output
[builder] Timer: Builder ran for 12.642915131s and ended at 2024-09-18T15:11:01Z
[builder] ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51
@viennguyendeveloper
Copy link

did you resolve this issue ?

@kpantos
Copy link

kpantos commented Oct 28, 2024

Same here
[builder] ERROR: failed to build: exit status 1
, stderr: [builder] Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
[builder] at InvokeStub_TemplateFunctions.IsNotBlank(Object, Object, IntPtr*)
[builder] at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
[builder] /cnb/buildpacks/oryx_dotnet-build/0.0.1/bin/build: line 47: 561 Aborted oryx build ${PWD} --platform "${DOTNET_ORYX_BUILD_NAME}" --platform-version "${BP_PLATFORM_VERSION}" --output ./oryx-output
ERROR: failed to build: executing lifecycle: failed with status code: 51

@gowizzard
Copy link

Unfortunately, I have the same problem.

@cedricvidal
Copy link

Also getting this error:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
You can report issues at https://github.com/Microsoft/Oryx/issues

Oryx Version: 0.2.20240520.1, Commit: c261287ed35c6c62b5ecf3174cda270495abb127, ReleaseTagName: 20240520.1

Build Operation ID: 124c1674907640eb
OS Type           : stretch
Image Type        : full

Detecting platforms...
Detected following platforms:
  python: 3.8.18
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at InvokeStub_TemplateFunctions.IsNotBlank(Object, Object, IntPtr*)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants