# \[Solved\] Intermittent error compiling with CLI with the following message "attempting to compile firmware Compile failed. Exiting."

**URL:** <https://community.particle.io/t/solved-intermittent-error-compiling-with-cli-with-the-following-message-attempting-to-compile-firmware-compile-failed-exiting/24371>\
**Category:** Troubleshooting\
**Created:** [July 14, 2016, 4:42am UTC](https://community.particle.io/t/solved-intermittent-error-compiling-with-cli-with-the-following-message-attempting-to-compile-firmware-compile-failed-exiting/24371 "2016-07-14T04:42:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![james\_grantham](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/james_grantham/32/10794_2.png) [@james\_grantham](https://community.particle.io/u/james_grantham)\
**Post date:** [July 14, 2016, 4:42am UTC](https://community.particle.io/t/solved-intermittent-error-compiling-with-cli-with-the-following-message-attempting-to-compile-firmware-compile-failed-exiting/24371/1 "2016-07-14T04:42:45Z")

</div>

Hey guys does anyone you have a problem compiling with the command line?  
For me I almost always have to run the command several times before in order for it to completely successfully or at least give me meaningful compiler error on my code.

Anyone else experiencing this?  
this is the command I run to compile for my core  
particle compile core …/GRID\_LED\_SEARCH --saveTo grid.bin

---

<div class="post-metadata">

**Author:** ![will](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/will/32/23374_2.png) [@will](https://community.particle.io/u/will)\
**Post date:** [July 14, 2016, 6:34am UTC](https://community.particle.io/t/solved-intermittent-error-compiling-with-cli-with-the-following-message-attempting-to-compile-firmware-compile-failed-exiting/24371/2 "2016-07-14T06:34:55Z")

</div>

Hey there! Would you mind sharing the output of the CLI when it errors out?

---

<div class="post-metadata">

**Author:** ![james\_grantham](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/james_grantham/32/10794_2.png) [@james\_grantham](https://community.particle.io/u/james_grantham)\
**Post date:** [July 15, 2016, 12:24am UTC](https://community.particle.io/t/solved-intermittent-error-compiling-with-cli-with-the-following-message-attempting-to-compile-firmware-compile-failed-exiting/24371/3 "2016-07-15T00:24:59Z")

</div>

Sure thing. Here are the commands used and the output after running it twice in a row. the second time it compiled. It’s not unusual for me to try compiling several times before successful.  
Any ideas what might cause it?

```nohighlight
===========================================
james@Jamess-MacBook-Pro:~/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH$ particle compile core ../GRID_LED_SEARCH --saveTo grid.bin

Compiling code for core

Including:
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Grid.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/location.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/pathfinder.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Search_state.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/WS2801.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/main.ino
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Grid.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/location.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/pathfinder.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Search_state.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/WS2801.cpp
attempting to compile firmware 
Compile failed. Exiting.

james@Jamess-MacBook-Pro:~/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH$ particle compile core ../GRID_LED_SEARCH --saveTo grid.bin

Compiling code for core

Including:
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Grid.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/location.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/pathfinder.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Search_state.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/WS2801.h
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/main.ino
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Grid.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/location.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/pathfinder.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/Search_state.cpp
    /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/WS2801.cpp
attempting to compile firmware 
downloading binary from: /v1/binaries/57882c51ca8aee205e8798b2
saving to: grid.bin
Memory use: 
   text data bss dec hex	filename
  83880 928 9260 94068 16f74	
Compile succeeded.
Saved firmware to: /Users/james/Dropbox (Personal)/Programming Projects/GRID_LED_SEARCH/grid.bin

```

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [July 15, 2016, 12:54pm UTC](https://community.particle.io/t/solved-intermittent-error-compiling-with-cli-with-the-following-message-attempting-to-compile-firmware-compile-failed-exiting/24371/4 "2016-07-15T12:54:46Z")

</div>

I’ve got a similar issue when building from a Dropbox folder while Dropbox is running in the background.  
Try deactivating/pausing Dropbox during builds.  
I guess the file watcher/updater might cause the up- or download to trip.

---

<div class="post-metadata">

**Author:** ![james\_grantham](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/james_grantham/32/10794_2.png) [@james\_grantham](https://community.particle.io/u/james_grantham)\
**Post date:** [July 16, 2016, 1:38am UTC](https://community.particle.io/t/solved-intermittent-error-compiling-with-cli-with-the-following-message-attempting-to-compile-firmware-compile-failed-exiting/24371/5 "2016-07-16T01:38:44Z")

</div>

Looks like that worked! Thanks for the head up!

I just use this script now to compile

================

```
osascript -e 'tell application "Dropbox" to quit'
particle compile core ../GRID_LED_SEARCH --saveTo grid.bin
open -a "Dropbox"

```

================

---

<div class="post-metadata">

**Author:** ![will](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/will/32/23374_2.png) [@will](https://community.particle.io/u/will)\
**Post date:** [July 18, 2016, 2:02am UTC](https://community.particle.io/t/solved-intermittent-error-compiling-with-cli-with-the-following-message-attempting-to-compile-firmware-compile-failed-exiting/24371/6 "2016-07-18T02:02:41Z")

</div>

Huh that is super interesting. Good find, @ScruffR!
