arduino / arduino-ide

Arduino IDE 2.x
https://www.arduino.cc/en/software
GNU Affero General Public License v3.0
2.34k stars 398 forks source link

Go prerequisite is not documented in development guide #2499

Closed NewtronReal closed 1 month ago

NewtronReal commented 2 months ago

Describe the problem

I couldn't find a build of arduino ide 2 for arm linux distros apart from the rpi unofficial one which has been discontinued since version 2.2. So I tried compiling it my own in my macbook air 2020 m1. And I get the following error.

yarn install v1.22.22
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
$ lerna run prepare
lerna notice cli v7.4.2
lerna info versioning independent

 >  Lerna (powered by Nx)   Running target prepare for 2 projects:

    - arduino-ide-extension
    - electron-app

 ——————————————————————————————————————————————————————————————————————————————————————

> arduino-ide-extension:prepare

arduino-ide-extension: yarn run v1.22.22
$ yarn download-cli && yarn download-fwuploader && yarn download-ls && yarn copy-i18n && yarn download-examples
arduino-ide-extension: $ node ./scripts/download-cli.js
arduino-ide-extension: 📦  Identified released version of the CLI. Downloading version 0.36.0-rc.1 from 'https://downloads.arduino.cc/arduino-cli/arduino-cli_0.36.0-rc.1_Linux_ARM64.tar.gz'
arduino-ide-extension: Skipping download because file already exists: /home/eappen/arduino-ide/arduino-ide-extension/src/node/resources/arduino-cli
arduino-ide-extension: $ node ./scripts/download-fwuploader.js
arduino-ide-extension: 📦  Identified released version of the Firmware Uploader. Downloading version 2.4.1 from 'https://downloads.arduino.cc/arduino-fwuploader/arduino-fwuploader_2.4.1_Linux_ARM64.tar.gz'
arduino-ide-extension: Skipping download because file already exists: /home/eappen/arduino-ide/arduino-ide-extension/src/node/resources/arduino-fwuploader
arduino-ide-extension: $ node ./scripts/download-ls.js
arduino-ide-extension: Building language-server from https://github.com/arduino/arduino-language-server.git. Commitish: 91c2ba8
arduino-ide-extension: >>> Cloning language-server source to /tmp/d-2024729-34599-1kgxh34.3w4l...
arduino-ide-extension: Cloning into '/tmp/d-2024729-34599-1kgxh34.3w4l'...
arduino-ide-extension: <<< Cloned language-server repo.
arduino-ide-extension: >>> Checking out 91c2ba8...
arduino-ide-extension: Note: switching to '91c2ba8'.
arduino-ide-extension: You are in 'detached HEAD' state. You can look around, make experimental
arduino-ide-extension: changes and commit them, and you can discard any commits you make in this
arduino-ide-extension: state without impacting any branches by switching back to a branch.
arduino-ide-extension: If you want to create a new branch to retain commits you create, you may
arduino-ide-extension: do so (now or later) by using -c with the switch command. Example:
arduino-ide-extension:   git switch -c <new-branch-name>
arduino-ide-extension: Or undo this operation with:
arduino-ide-extension:   git switch -
arduino-ide-extension: Turn off this advice by setting config variable advice.detachedHead to false
arduino-ide-extension: HEAD is now at 91c2ba8 Merge tag '0.7.6'
arduino-ide-extension: <<< Checked out 91c2ba8.
arduino-ide-extension: 91c2ba8
arduino-ide-extension: >>> Building the language-server...
arduino-ide-extension: Failed to execute go with args: ["build"]
arduino-ide-extension: Error: spawnSync go ENOENT
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
arduino-ide-extension: error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

 ——————————————————————————————————————————————————————————————————————————————————————

 >  Lerna (powered by Nx)   Running target prepare for 2 projects failed

   Tasks not run because their dependencies failed or --nx-bail=true:

   - electron-app:prepare

   Failed tasks:

   - arduino-ide-extension:prepare

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.`

To reproduce

Compile it on asahi fedora remix after installing the dependencies.

  1. clone the github repo
  2. navigate into folder
  3. run yarn

Expected behavior

Compile without errors.

Arduino IDE version

2.3.2

Operating system

Linux

Operating system version

Fedora 40

Additional context

Using Asahi linux

Issue checklist

per1234 commented 2 months ago

@NewtronReal please don't download the file from that comment. It is malware. If you did download it and unzipped it, then take immediate action to secure your system from infection.

I have deleted the comment and reported @Kudjo-Grand to GitHub.

@Kudjo-Grand I see you have some previous activity that appears to be legitimate. Your account may have been hacked. You should take immediate action to secure your account so that it is not used further for malicious purposes.

per1234 commented 2 months ago
arduino-ide-extension: Failed to execute go with args: ["build"]

@NewtronReal do you have Go version 1.21 or newer installed on your computer?

Go is an (unfortunately undocumented) prerequisite for building Arduino IDE from source (it isn't actually used for the Arduino IDE application, but rather for its helper tools).

So if you don't have Go installed, install version 1.21 or newer and then try again. Please let me know if you are then able to build it successfully.

If you need to manage multiple Go versions on your system, I can recommend the gvm version manager.

NewtronReal commented 2 months ago

@NewtronReal please don't download the file from that comment. It is malware. If you did download it and unzipped it, then take immediate action to secure your system from infection.

I have deleted the comment and reported @Kudjo-Grand to GitHub.

@Kudjo-Grand I see you have some previous activity that appears to be legitimate. Your account may have been hacked. You should take immediate action to secure your account so that it is not used further for malicious purposes.

Thanks fortunately the files was supported neither by the architecture nor by the operating system i use.

NewtronReal commented 2 months ago
arduino-ide-extension: Failed to execute go with args: ["build"]

@NewtronReal do you have Go version 1.21 or newer installed on your computer?

Go is an (unfortunately undocumented) prerequisite for building Arduino IDE from source (it isn't actually used for the Arduino IDE application, but rather for its helper tools).

So if you don't have Go installed, install version 1.21 or newer and then try again. Please let me know if you are then able to build it successfully.

If you need to manage multiple Go versions on your system, I can recommend the gvm version manager.

Thank you the software has been successfully build and running on my system.