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

Execution failed for platform aarch64 #148

Closed
apo1967 opened this issue Feb 2, 2021 · 18 comments
Closed

Execution failed for platform aarch64 #148

apo1967 opened this issue Feb 2, 2021 · 18 comments
Assignees
Labels
DONE Issue is fixed and ready to be delivered Feature Request of a new feature or a behaviour change
Milestone

Comments

@apo1967
Copy link

apo1967 commented Feb 2, 2021

Hi everyone,

first of all thx for this great plugin.

I just tried to build my current project on my new MBP with M1 chip. It's a multi module Gradle projects containing a Spring Boot backend and Vue.js 2 frontend module. Unfortunately the build fails with the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':frontend:installNode'.
> org.siouan.frontendgradleplugin.domain.exception.UnsupportedPlatformException: This platform is not supported yet: Platform {jvmArch=aarch64, osName=Mac OS X, environment=Environment {nodeInstallDirectory=null, yarnInstallDirectory=null}, systemProxySettings=SystemProxySettings {httpProxyHost=null, httpProxyPort=80, httpsProxyHost=null, httpsProxyPort=443, nonProxyHosts=[local, *.169.254/16, *.local, 169.254/16]}}

OS Mac Os X Big Sur 11.2
Gradle Version 6.7.1
Java Version

openjdk 15.0.2 2021-01-19
OpenJDK Runtime Environment Zulu15.29+15-CA (build 15.0.2+7)
OpenJDK 64-Bit Server VM Zulu15.29+15-CA (build 15.0.2+7, mixed mode)

Is there any chance this will be gonna be fixed soon?

Cheers,
Alexander

@v1nc3n4
Copy link
Member

v1nc3n4 commented Feb 2, 2021

Hi @apo1967,

Thank you for raising this issue! It shall be possible to fix it quickly, since it is just a matter of resolving the Node.js distribution compatible with your workstation's architecture (ARMv8 / Aarch64).

I need the following pieces of information of your Gradle project:

  • Plugin version
  • Node.js version

As a workaround, you may succeed to install Node.js with the plugin with this setting:

frontend {
    nodeDistributionUrlPathPattern = 'vVERSION/node-vVERSION-linux-arm64.TYPE'
}

If you can try this, let me know the result! Have a nice day.
Regards

@v1nc3n4 v1nc3n4 self-assigned this Feb 2, 2021
@v1nc3n4 v1nc3n4 added the Bug Something is not working as expected label Feb 2, 2021
@apo1967
Copy link
Author

apo1967 commented Feb 2, 2021

Hi v1nc3n4,

thx for the quick response. The project node version is v15.4.0. The plugin version was

plugins {
    id 'org.siouan.frontend-jdk11' version '4.0.1'
}

I upgraded to 5.0.0, but it did not make a difference.

The fix above does not help unfortunately. The error is the same.

Thanks very much,
Alexander

@v1nc3n4
Copy link
Member

v1nc3n4 commented Feb 2, 2021

That's perfect, thank you.
The fact that the issue is still there when forcing the URL means there is another bug because it should work. I create another issue for this one.
It shall be fixed this week.

@v1nc3n4 v1nc3n4 added this to the 5.0.1 milestone Feb 2, 2021
@v1nc3n4 v1nc3n4 added the IN PROGRESS Design and implementation are in progress label Feb 2, 2021
@v1nc3n4
Copy link
Member

v1nc3n4 commented Feb 2, 2021

I need your help again 😞. Can you confirm you can install and run the ARMv8 distribution of Node.js on your workstation? Unfortunately I have no option to verify this distribution on an equivalent architecture.

See https://nodejs.org/en/download/

node-distro

If this one is not working, you may also try the Mac OS binary (tar.gz)

@v1nc3n4
Copy link
Member

v1nc3n4 commented Feb 2, 2021

Hmm, now I have a doubt about this architecture. I thought it was simple to deal with. It seems Node.js doesn't provide a compatible build for your system.

For reference: nodejs/build#2474
I must take a look at this problem deeper.

@apo1967
Copy link
Author

apo1967 commented Feb 2, 2021

Oh... do you still need me to test the arm binaries?

@v1nc3n4
Copy link
Member

v1nc3n4 commented Feb 2, 2021

Well no, sorry for the inconvenience 😞.
Of course I'm curious to know if one distribution or the other works on your system. MBP is built over an ARM64 architecture if I understand well, and that may be compatible. But Node's website states the ARMv8 distribution is for Linux. I wonder also if the Mac OS Darwin distribution may work 🤔.
But these considerations are not viable in the long term, and I don't think it's a good idea the plugin tries to use another distribution in the mean time.

Node team seems to be working on it actually, I will follow closely this point and provide a new release as soon as a compatible distribution is published.
And thanks a lot for your help of course!

@v1nc3n4 v1nc3n4 removed the IN PROGRESS Design and implementation are in progress label Feb 2, 2021
@v1nc3n4
Copy link
Member

v1nc3n4 commented Feb 2, 2021

@apo1967
FYI, if you are just trying to build your project on your workstation, you may install node on your own, using homebrew for example. It seems to be a confirmed workaround. Then, if you set the nodeDistributionProvided property to true, the plugin can rely on executables found in the PATH, or pick the one located in the directory pointed by the nodeInstallDirectory property. The official documentation shall help you to do that. Feel free to come back here for any news or questions.

@apo1967
Copy link
Author

apo1967 commented Feb 3, 2021

Thx a lot, this works fine. It also speeds up the build, so it's an improvement actually.

@v1nc3n4 v1nc3n4 removed this from the 5.0.1 milestone Feb 5, 2021
@v1nc3n4 v1nc3n4 added Feature Request of a new feature or a behaviour change and removed Bug Something is not working as expected labels Feb 5, 2021
@v1nc3n4
Copy link
Member

v1nc3n4 commented Feb 14, 2021

Also for reference: nodejs/node#37309

@v1nc3n4
Copy link
Member

v1nc3n4 commented Apr 20, 2021

Hi all,

As mentioned in Node.js 16.0.0 release notes, pre-built binaries are now available for Apple Silicon.
Support will be added soon in the plugin.

BR

@v1nc3n4 v1nc3n4 added this to the 5.1.0 milestone Apr 20, 2021
v1nc3n4 added a commit that referenced this issue Apr 24, 2021
v1nc3n4 added a commit that referenced this issue Apr 25, 2021
v1nc3n4 added a commit that referenced this issue Apr 25, 2021
v1nc3n4 added a commit that referenced this issue Apr 25, 2021
@v1nc3n4 v1nc3n4 closed this as completed in b98bd8c May 2, 2021
@v1nc3n4 v1nc3n4 added the DONE Issue is fixed and ready to be delivered label May 2, 2021
@v1nc3n4
Copy link
Member

v1nc3n4 commented May 2, 2021

Hi @apo1967,

May I ask you to verify if release 5.1.0 allows you to install a Node.js distribution on your MBP?
I don't have such computer by my side, and I would like to have a real feedback about this issue.

Thanks in advance for your help.
BR

@apo1967
Copy link
Author

apo1967 commented May 11, 2021

Hi @apo1967,

May I ask you to verify if release 5.1.0 allows you to install a Node.js distribution on your MBP?
I don't have such computer by my side, and I would like to have a real feedback about this issue.

Thanks in advance for your help.
BR

Hi v1nc3n4, sorry for being late. So I upgraded to 5.1.0 and I can confirm the error "platform not supported" is gone. However unfortunately the links to the node builds seems to be broken as the build now stops with an http 404. Running the build with the "--info" option prints "[clean] Downloading distribution at 'https://nodejs.org/dist/v15.4.0/node-v15.4.0-darwin-arm64.tar.gz'
[clean] Downloading resource at 'https://nodejs.org/dist/v15.4.0/node-v15.4.0-darwin-arm64.tar.gz' (proxy: DIRECT)" to the console. And these links actually do not work. Browsing the node.js download archive ("previous releases") the link should be https://nodejs.org/download/release/v15.4.0/node-v15.4.0-darwin-x64.tar.gz instead (if not going for the current or LTS release).

@v1nc3n4
Copy link
Member

v1nc3n4 commented May 11, 2021

Hi @apo1967,
Thank you for your help!
This error is expected because the ARM 64 distribution is only available starting from Node.js 16.0.0.
Can you try with this Node.js release?

@apo1967
Copy link
Author

apo1967 commented May 11, 2021

Well, it seems I don't understand what's happening under the hood. I thought the initial problem here was, that there was no M1 compatible node bundle available to pull and execute. So now that there is one, why is the plugin still using an incompatible version?

Anyway, what I did now: I updated the siouan plugin version in my gradle config to 5.1.0, and I updated my local node installation to 16.1.0. Now, when I try to build my frontend app with gradle using the local node installation 16.1.0 the build runs, although now failing due to "unexpected identifier" errors on imported graphql resource files that we're no problem before. If I tell the plugin to not use the local installation, it tries to pull the above mentioned version of node.js (where I had expected it to pull the latest M1 compatible version).

@v1nc3n4
Copy link
Member

v1nc3n4 commented May 11, 2021

Well, it seems I don't understand what's happening under the hood. I thought the initial problem here was, that there was no M1 compatible node bundle available to pull and execute. So now that there is one, why is the plugin still using an incompatible version?

You're right until the still using an incompatible version which sounds weird to me. I may have been a bit fuzzy in my request, so let's explain things in details:

  • Your initial problem was the plugin could not download a bundle of Node.js compatible with your M1 workstation.
  • Node.js fixed that recently, and now the plugin should be able to download the bundle. But you must upgrade the plugin to version 5.1.0.
  • So as the plugin downloads and installs the distribution on its own - which is what I want to verify with your help - you must ensure the nodeDistributionProvided property is false, and the nodeVersion property is at least 16.0.0.

I didn't expect you upgrade your local installation - I mean any installation you would have done on your own, not with the plugin. I'm sorry if this is what you did.

@apo1967
Copy link
Author

apo1967 commented May 11, 2021

Ok, now I got it. I just forgot about the version number in the gradle settings. So setting this to 16.1.0 the build runs!

@v1nc3n4
Copy link
Member

v1nc3n4 commented May 11, 2021

Thank you very much again for your help on this issue. Have a good day!
BR

v1nc3n4 added a commit that referenced this issue Aug 15, 2023
* Fixed line endings.

* Fixed Gradle Wrapper mode.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed sitemap.

* Fixed test coverage reporting.

* Fixed website issues.

* Before merging branch 4.0-jdk11.

* Added website publication.

* Updated sitemap.

* Fixed invalid SpringBoot version number in examples

* Initialized release 5.0.1.

* Fixed #153 (#154) (#155)

* Fixed #152 (#156)

* Added contributor.

* Merged fix for #149 (#157)

* Upgraded to Gradle 6.8.3.

* Updated website.

* Initialized release 5.1.0.

* Fixed #148 (#159)

* Merged changes from branch 5.1-jdk8.

* Initialized release 5.2.0.

* Fixed #161 (#163)

* Merged changes from branch 5.2-jdk8.

* Merged changes from branch master.

* Updated documentation.

* Initialized release 5.3.0.

* Fixed #165 (#166)

* Added FAQ section.

* Fixed page title

* chore(release): release 7.0.0

* doc: fixed website publication [skip ci]

* docs: fix web page metadata

* docs: fix web page metadata

* docs: add links to released artifacts, fix descriptions for examples [skip ci]

* docs: fix website publication [skip ci]

* docs: add missing component import [skip ci]

* add retry mechanism to downloads

---------

Co-authored-by: Vincent Bories-Azeau <5869062+vboriesazeau@users.noreply.github.com>
Co-authored-by: Vincent BA <5869062+v1nc3n4@users.noreply.github.com>
Co-authored-by: Jean Detoeuf <Jean.Detoeuf1@ibm.com>
v1nc3n4 added a commit that referenced this issue Aug 18, 2023
* add retry mechanism to downloads (#200)

* Fixed line endings.

* Fixed Gradle Wrapper mode.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed sitemap.

* Fixed test coverage reporting.

* Fixed website issues.

* Before merging branch 4.0-jdk11.

* Added website publication.

* Updated sitemap.

* Fixed invalid SpringBoot version number in examples

* Initialized release 5.0.1.

* Fixed #153 (#154) (#155)

* Fixed #152 (#156)

* Added contributor.

* Merged fix for #149 (#157)

* Upgraded to Gradle 6.8.3.

* Updated website.

* Initialized release 5.1.0.

* Fixed #148 (#159)

* Merged changes from branch 5.1-jdk8.

* Initialized release 5.2.0.

* Fixed #161 (#163)

* Merged changes from branch 5.2-jdk8.

* Merged changes from branch master.

* Updated documentation.

* Initialized release 5.3.0.

* Fixed #165 (#166)

* Added FAQ section.

* Fixed page title

* chore(release): release 7.0.0

* doc: fixed website publication [skip ci]

* docs: fix web page metadata

* docs: fix web page metadata

* docs: add links to released artifacts, fix descriptions for examples [skip ci]

* docs: fix website publication [skip ci]

* docs: add missing component import [skip ci]

* add retry mechanism to downloads

---------

Co-authored-by: Vincent Bories-Azeau <5869062+vboriesazeau@users.noreply.github.com>
Co-authored-by: Vincent BA <5869062+v1nc3n4@users.noreply.github.com>
Co-authored-by: Jean Detoeuf <Jean.Detoeuf1@ibm.com>

* feat: add support for retryable download of Node.js distribution

Fixes #201

---------

Co-authored-by: Jean Detoeuf <jean.detoeuf@instana.com>
Co-authored-by: Vincent Bories-Azeau <5869062+vboriesazeau@users.noreply.github.com>
Co-authored-by: Jean Detoeuf <Jean.Detoeuf1@ibm.com>
v1nc3n4 added a commit that referenced this issue Aug 18, 2023
* build: initialize JDK 17 build

* fix: remove Gradle Enterprise test distribution

* refactor: move immutable classes to records

* doc: fix minor documentation issues [skip ci]

* refactor: renamed default branch

* docs: merge latest documentation updates from main branch [skip ci]

* chore(release): initialize release 7.1.0

* feat: add support of Node.js distribution for Linux ARM64 architectures (#199)

Fixes #190

* feat: add support for retryable download of Node.js distribution (#202)

* add retry mechanism to downloads (#200)

* Fixed line endings.

* Fixed Gradle Wrapper mode.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed sitemap.

* Fixed test coverage reporting.

* Fixed website issues.

* Before merging branch 4.0-jdk11.

* Added website publication.

* Updated sitemap.

* Fixed invalid SpringBoot version number in examples

* Initialized release 5.0.1.

* Fixed #153 (#154) (#155)

* Fixed #152 (#156)

* Added contributor.

* Merged fix for #149 (#157)

* Upgraded to Gradle 6.8.3.

* Updated website.

* Initialized release 5.1.0.

* Fixed #148 (#159)

* Merged changes from branch 5.1-jdk8.

* Initialized release 5.2.0.

* Fixed #161 (#163)

* Merged changes from branch 5.2-jdk8.

* Merged changes from branch master.

* Updated documentation.

* Initialized release 5.3.0.

* Fixed #165 (#166)

* Added FAQ section.

* Fixed page title

* chore(release): release 7.0.0

* doc: fixed website publication [skip ci]

* docs: fix web page metadata

* docs: fix web page metadata

* docs: add links to released artifacts, fix descriptions for examples [skip ci]

* docs: fix website publication [skip ci]

* docs: add missing component import [skip ci]

* add retry mechanism to downloads

---------

Co-authored-by: Vincent Bories-Azeau <5869062+vboriesazeau@users.noreply.github.com>
Co-authored-by: Vincent BA <5869062+v1nc3n4@users.noreply.github.com>
Co-authored-by: Jean Detoeuf <Jean.Detoeuf1@ibm.com>

* feat: add support for retryable download of Node.js distribution

Fixes #201

---------

Co-authored-by: Jean Detoeuf <jean.detoeuf@instana.com>
Co-authored-by: Vincent Bories-Azeau <5869062+vboriesazeau@users.noreply.github.com>
Co-authored-by: Jean Detoeuf <Jean.Detoeuf1@ibm.com>

* chore(deps): upgrade dependencies (#203)

* fix: fix code quality issue

* docs: update installNode task description and sitemap [skip ci]

* feat: backport changes from branch 7.1-jdk17

---------

Co-authored-by: Jean Detoeuf <jean.detoeuf@instana.com>
Co-authored-by: Vincent Bories-Azeau <5869062+vboriesazeau@users.noreply.github.com>
Co-authored-by: Jean Detoeuf <Jean.Detoeuf1@ibm.com>
v1nc3n4 added a commit that referenced this issue Oct 20, 2024
* Fixed line endings.

* Fixed Gradle Wrapper mode.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed website code tabs.

* Fixed sitemap.

* Fixed test coverage reporting.

* Fixed website issues.

* Before merging branch 4.0-jdk11.

* Added website publication.

* Updated sitemap.

* Fixed invalid SpringBoot version number in examples

* Initialized release 5.0.1.

* Fixed #153 (#154) (#155)

* Fixed #152 (#156)

* Added contributor.

* Merged fix for #149 (#157)

* Upgraded to Gradle 6.8.3.

* Updated website.

* Initialized release 5.1.0.

* Fixed #148 (#159)

* Merged changes from branch 5.1-jdk8.

* Initialized release 5.2.0.

* Fixed #161 (#163)

* Merged changes from branch 5.2-jdk8.

* Merged changes from branch master.

* Updated documentation.

* Initialized release 5.3.0.

* Fixed #165 (#166)

* Added FAQ section.

* Fixed page title

* chore(release): release 7.0.0

* doc: fixed website publication [skip ci]

* docs: fix web page metadata

* docs: fix web page metadata

* docs: add links to released artifacts, fix descriptions for examples [skip ci]

* docs: fix website publication [skip ci]

* docs: add missing component import [skip ci]

* chore(release): release 8.0.0

* docs: temporary reverted previous release documentation

* docs: fixed website generation

* docs: fixed invalid dependency for v7

* docs: fix sitemap and canonical URLs for SEO [skip ci] (#234)

* feat: resolve win-arm64 (#249)

---------

Co-authored-by: Vincent Bories-Azeau <5869062+vboriesazeau@users.noreply.github.com>
Co-authored-by: Vincent BA <5869062+v1nc3n4@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DONE Issue is fixed and ready to be delivered Feature Request of a new feature or a behaviour change
Projects
None yet
Development

No branches or pull requests

2 participants