i have been using arduino ide for about 2 years now and for the last year i can only compile ANY sketch once. if i had an error and i fix it and click compile again, just about as fast as i can click it i get
so as you can imagine trying to learn how to code and dealing with this problem has been serious hell.. i have searched and searched and the only thing i have found is to uninstall with Revounistaller and make sure all files are removed ,, which i have done at the very least 20 times( no joke)
the work around i have been using with the nano (mine is new bootloader) if im not sure if its going to compile ill start with Nano (old bootloader) and if it compiles i change it to Nano option and hit upload. and no issues..
so if i have errors i fix the errors change the board option hit compile if i have another code issue i fix it change the board option hit compile if i have anpther issue i fix it change the board option.... as you can imagine trying to learn how to code and dealing with this is hell.. so if i dont change the board option after a compile or failed compile i get the attached msg instantly and that is with all compiler warnings..
i have even tried deleting everything starting a new account on my computer and reinstalling with the same results..
hopefully i was clear with everything, i have been dealing with this for about a year and its driving me insane, and my blood pressure through the roof haha
This indicates the problem is related to the compilation caching mechanism. On the first compile, the full program is compiled. After that, to make compilation faster, only the sketch and any other parts of the program (e.g., libraries) that have changed are compiled.
When I don't have a clear explanation of strange behavior during the compilation process, I often like to blame the antivirus. To see if it is the culprit, you can try TEMPORARILY disabling your antivirus for a single compilation to see if the problem goes away, then turn the antivirus back on. If the problem doesn't occur with the antivirus off you will need to adjust the settings of your antivirus to whitelist the appropriate file, folder, or process so it doesn't interfere with compilation.
Please be cautious about working without an antivirus. This is only about temporarily disabling it for a quick test. If you don't feel comfortable doing that, fine. You can try going straight to configuring the antivirus to whitelist the Arduino software.
I have a couple other things to suggest if that doesn't work out.
Hi Folks,
I have the same issue. Compiling the first time after starting the IDE works, the second time works not anymore.
Errormessage: Arduino: 1.8.13 (Windows 10), Board: "Arduino Due (Programming Port)" C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Bernie\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Bernie\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Bernie\Documents\Arduino\libraries -fqbn=arduino:sam:arduino_due_x_dbg -vid-pid=2341_003D -ide-version=10813 -build-path C:\Users\Bernie\AppData\Local\Temp\arduino_build_491212 -warnings=all -build-cache C:\Users\Bernie\AppData\Local\Temp\arduino_cache_203000 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Bernie\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path=C:\Users\Bernie\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.bossac.path=C:\Users\Bernie\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino -prefs=runtime.tools.bossac-1.6.1-arduino.path=C:\Users\Bernie\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino -verbose C:\Users\Bernie\Documents\Arduino\Arduino_Due_TX 0.14.1\Arduino_Due_TX\Arduino_Due_TX.ino C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Bernie\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Bernie\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Bernie\Documents\Arduino\libraries -fqbn=arduino:sam:arduino_due_x_dbg -vid-pid=2341_003D -ide-version=10813 -build-path C:\Users\Bernie\AppData\Local\Temp\arduino_build_491212 -warnings=all -build-cache C:\Users\Bernie\AppData\Local\Temp\arduino_cache_203000 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Bernie\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.arm-none-eabi-gcc-4.8.3-2014q1.path=C:\Users\Bernie\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1 -prefs=runtime.tools.bossac.path=C:\Users\Bernie\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino -prefs=runtime.tools.bossac-1.6.1-arduino.path=C:\Users\Bernie\AppData\Local\Arduino15\packages\arduino\tools\bossac\1.6.1-arduino -verbose C:\Users\Bernie\Documents\Arduino\Arduino_Due_TX 0.14.1\Arduino_Due_TX\Arduino_Due_TX.ino Using board 'arduino_due_x_dbg' from platform in folder: C:\Users\Bernie\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12 Using core 'arduino' from platform in folder: C:\Users\Bernie\AppData\Local\Arduino15\packages\arduino\hardware\sam\1.6.12 Detecting libraries used... Error compiling for board Arduino Due (Programming Port).
But just on the second try to compile. The Board, the USP-Port and as well the Code dosen't matter. Every second try to compile the same story. I switched off the Firewall and the Realtime Scanner as well. This changed nothing.
Select File > Preferences from the Arduino IDE's menus.
Click the link at the line following "More preferences can be edited directly in the file". This will open the C:\Users\Bernie\AppData\Local\Arduino15 folder (or something similar for those using another OS).
Open the preferences.txt file in a text editor.
Close all Arduino IDE windows.
Add the following line to the preferences.txt file:
compiler.cache_core=false
Save the preferences.txt file.
Start the Arduino IDE.
Try compiling twice again.
NOTE: These instructions are specific to Arduino IDE 1.x. They are not applicable for those who are using Arduino IDE 2.x.
(If you're looking for a procedure available to fix this, just skip this.)
Hi everyone. After I've been here, I realized that it wasn't just me.
Firstly, I thought it was something wrong in my computer like a runtime or so. However, after my effort to install several all-in-one runtime, nothing turns better.
So, that's it. Hoping for official team to fix this bug.
Your hint did the trick for me on following system:
Raspberry 3
Operating System: Raspbian GNU/Linux 10
KDE Plasma Version: 5.14.5
Qt Version: 5.11.3
KDE Frameworks Version: 5.54.0
Kernel Version: 5.10.17-v7+
OS Type: 32-bit
Processors: 4 × ARMv7 Processor rev 4 (v7l)
Memory: 924.2 MiB of RAM
Actually I did not append the line at the end, I modified line 9 of preferences.text.
After the first try the system froze, but after reboot the next one was successful.
Yesterday I have spent a whole day trying to modify path information in the header-files. It was useless: after each path was working new errors (type-definitions) appeared.
So I reinstalled the libc6 files and tried your idea. Thank you very much.
Mike
Hello guys,
maybe mike_ban_pho solved it, but I see different OS (Raspbian), no Win10.
I have same problem on corporate PC with Windows 10, where is Admin centrally managed. I run Arduino IDE, compilation works and code loading works. But when I change something, second attempt doesnt work "Libraries are used". Then when I exit Arduino IDE app and run it again, compile works just for once.
Maybe it is some shit with OneDrive (sync), Azure, or other Microsoft things used by Cyber security teams that making developer's work bad and worse each month. For example we have
OneDrive synced directories C:\Users(me)... .
Once you change something here, it is being sync somewhere sometimes in next seconds,minutes,hours. Maybe at this time when you try compile Arduino IDE, then cache files and libraries are used by sync process.
Can somebody of you report this issue to Arduino IDE development team, to fix it ?