[ISSUE] Local compile fails on Ubuntu

Hi,

I have been running particle workbench on a clean install of VS Code running on a clean install of Ubuntu 18.10. So far everything seems to work great except for the local compile - I have had this same issue on RC5, 6, and 7. I get the following output:

cd "/home/scott/.particle/toolchains/deviceOS/0.8.0-rc.27/firmware-0.8.0-rc.27//main" && make all
fatal: not a git repository (or any of the parent directories): .git
make[1]: Entering directory `/home/scott/.particle/toolchains/deviceOS/0.8.0-rc.27/firmware-0.8.0-rc.27/main'
make -C ../modules/argon/user-part all
fatal: not a git repository (or any of the parent directories): .git
make[2]: /home/scott/.particle/toolchains/gcc-arm/5.3.1/bin/arm-none-eabi-gcc: Command not found
make[2]: Entering directory `/home/scott/.particle/toolchains/deviceOS/0.8.0-rc.27/firmware-0.8.0-rc.27/modules/argon/user-part'
/home/scott/.particle/toolchains/deviceOS/0.8.0-rc.27/firmware-0.8.0-rc.27/build/arm-tools.mk:61: *** "ARMgcc version 5.3.1 or later required, but found ".  Stop.
make[2]: Leaving directory `/home/scott/.particle/toolchains/deviceOS/0.8.0-rc.27/firmware-0.8.0-rc.27/modules/argon/user-part'
make[1]: *** [modules/argon/user-part] Error 2
make[1]: Leaving directory `/home/scott/.particle/toolchains/deviceOS/0.8.0-rc.27/firmware-0.8.0-rc.27/main'
make: *** [compile-user] Error 2
The terminal process terminated with exit code: 2

Not sure about the ARM GCC version… /home/scott/.particle/toolchains/gcc-arm/5.3.1/bin/arm-none-eabi-gcc definitely exists. I also tried installing manually via sudo apt install gcc-arm-none-eabi. As a result arm-none-eabi-gcc -dumpversion now returns 6.3.1 from the terminal but the same issue persists. Any ideas?

2 Likes

You could try Ctrl+Shift+P Particle: Uninstall Local Compiler, restart VS Code and then reinstall via Ctrl+Shift+P Particle: Install Local Compiler

Also one issue when switching between mesh platforms is that you need to run
make -f $PARTICLE_MAKEFILE clean-all in Ctrl+Shift+P Particle: Launch Compiler Shell

ah, sorry for the bumps.

if you haven’t already, try running apt-get install gcc-multilib - we need the 32bit libs since gcc-arm is itself 32bit.

we’ll make sure to highlight this in the docs (in-progress) going forward as well as look at options for eliminating the prerequisite entirely.

3 Likes

these are all also available via VSCode’s “tasks” ux - from the main menu, select “Terminals > Run Task…” and then select the appropriate clean task from the list shown.

as of alpha 7 we’ve also exposed these as “commands” - from the main menu, select “View > Command Palette” (or ctrl+shift+p) then type “Particle:” and you’ll see the full list available.

1 Like

Thanks guys - apt-get install gcc-multilib did the trick :+1:

3 Likes

Hi all,

Was having the same issue on Pop! OS which is a fork of Ubuntu, and just like @sryburn I was able to fix it with sudo apt install gcc-multilib . Is there any update on making this more prominent in the docs or eliminating the prerequisite as @m_m stated above? Thanks

1 Like

hi @addisonwk :wave:

good call-out - we’ve included the tip in the docs over here but should probably highlight it better:

https://docs.particle.io/support/particle-tools-faq/workbench/#linux-tips

i’ll add it to our list over here :+1:

1 Like

hey @m_m thanks for the quick reply - awesome, that section is exactly what I was envisioning :+1:

1 Like