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

Fix compilation of buildpack on ARM64 #359

Merged
merged 1 commit into from
Sep 27, 2022
Merged

Conversation

edmorley
Copy link
Member

Previously it wasn't possible to compile the Rust parts of the buildpack on ARM64 (such as when using an M1 Macbook), since the compile failed with:

error[E0425]: cannot find value `ARCH` in this scope
  --> common/nodejs-utils/src/inv.rs:45:45
   |
45 |         let platform = format!("{}-{}", OS, ARCH);
   |                                             ^^^^ not found in this scope
   |
help: consider importing this constant
   |
1  | use std::env::consts::ARCH;
   |

This makes contributing to the buildpack from an M1 machine frustrating, since one has to comment out the architecture conditional every time, then remember not to include it in the commit with the other changes.

At such time as the Node.js buildpack fully supports ARM64 Docker images, conditionals can be added back with the appropriate platform values.

Fixes #310.
GUS-W-11817789.

Previously it wasn't possible to compile the Rust parts of the
buildpack on ARM64 (such as when using an M1 Macbook),
since the compile failed with:

```
error[E0425]: cannot find value `ARCH` in this scope
  --> common/nodejs-utils/src/inv.rs:45:45
   |
45 |         let platform = format!("{}-{}", OS, ARCH);
   |                                             ^^^^ not found in this scope
   |
help: consider importing this constant
   |
1  | use std::env::consts::ARCH;
   |
```

This makes contributing to the buildpack from an M1 machine
frustrating, since one has to comment out the architecture
conditional every time, then remember not to include it in
the commit with the other changes.

At such time as the Node.js buildpack fully supports ARM64
Docker images, conditionals can be added back with the
appropriate platform values.

GUS-W-11817789.
@edmorley edmorley self-assigned this Sep 27, 2022
@edmorley edmorley marked this pull request as ready for review September 27, 2022 18:15
@edmorley edmorley requested a review from a team as a code owner September 27, 2022 18:15
@edmorley edmorley enabled auto-merge (squash) September 27, 2022 18:15
@edmorley edmorley merged commit 7863181 into main Sep 27, 2022
@edmorley edmorley deleted the edmorley/fix-compile-arm64 branch September 27, 2022 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Project fails to compile on ARM64
2 participants