Hello everyone.
Please leave me a question.
ArduinoIDE_Ver.1.88 (WindowsStore1.8.19.0)
Optiboot Minicore Ver. 2.0.1
If you compile without writing anything in setup and loop, the following error will occur.
This error also occurs when writing a normal code.
Could you tell me the cause? Could you tell me?
Arduino:1.8.8 (Windows Store 1.8.19.0) (Windows 10), ボード:"ATmega328, No, 328P / 328PA, 1.8v, Disabled (default), 8 MHz internal"
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware -hardware C:\Users\yoshi\Documents\ArduinoData\packages -hardware D:\OneDrive\Arduino_sketch\hardware -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr -tools C:\Users\yoshi\Documents\ArduinoData\packages -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\libraries -libraries D:\OneDrive\Arduino_sketch\libraries -fqbn=MiniCore:avr:328:bootloader=false,variant=modelP,BOD=1v8,LTO=Os,clock=8MHz_internal -ide-version=10808 -build-path C:\Users\yoshi\AppData\Local\Temp\arduino_build_308726 -warnings=all -build-cache C:\Users\yoshi\AppData\Local\Temp\arduino_cache_191747 -prefs=build.warn_data_percentage=75 -verbose C:\Users\yoshi\AppData\Local\Temp\arduino_modified_sketch_504636\sketch_feb17a.ino
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\arduino-builder -compile -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware -hardware C:\Users\yoshi\Documents\ArduinoData\packages -hardware D:\OneDrive\Arduino_sketch\hardware -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\hardware\tools\avr -tools C:\Users\yoshi\Documents\ArduinoData\packages -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\libraries -libraries D:\OneDrive\Arduino_sketch\libraries -fqbn=MiniCore:avr:328:bootloader=false,variant=modelP,BOD=1v8,LTO=Os,clock=8MHz_internal -ide-version=10808 -build-path C:\Users\yoshi\AppData\Local\Temp\arduino_build_308726 -warnings=all -build-cache C:\Users\yoshi\AppData\Local\Temp\arduino_cache_191747 -prefs=build.warn_data_percentage=75 -verbose C:\Users\yoshi\AppData\Local\Temp\arduino_modified_sketch_504636\sketch_feb17a.ino
Using board '328' from platform in folder: D:\OneDrive\Arduino_sketch\hardware\MiniCore\avr
Using core 'MCUdude_corefiles' from platform in folder: D:\OneDrive\Arduino_sketch\hardware\MiniCore\avr
Detecting libraries used...
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.19.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=8000000L -DARDUINO=10808 -DARDUINO_AVR_ATmega328 -DARDUINO_ARCH_AVR "-ID:\\OneDrive\\Arduino_sketch\\hardware\\MiniCore\\avr\\cores\\MCUdude_corefiles" "-ID:\\OneDrive\\Arduino_sketch\\hardware\\MiniCore\\avr\\variants\\standard" "C:\\Users\\yoshi\\AppData\\Local\\Temp\\arduino_build_308726\\sketch\\sketch_feb17a.ino.cpp" -o nul
C:\Users\yoshi\AppData\Local\Temp\arduino_build_308726\sketch\sketch_feb17a.ino.cpp:1:21: fatal error: Arduino.h: No such file or directory
compilation terminated.
exit status 1
ボードATmega328に対するコンパイル時にエラーが発生しました。
pert
February 19, 2019, 4:22pm
#2
Does the file D:\OneDrive\Arduino_sketch\hardware\MiniCore\avr\cores\MCUdude_corefiles\Arduino.h exist?
DrAzzy
February 19, 2019, 9:46pm
#3
Were the problems with compiling things located on OneDrive fixed?
In the past there were problems with that.
pert
February 19, 2019, 10:25pm
#4
The common OneDrive issue was resolved in Arduino 1.8.6:
opened 03:11PM - 16 Nov 17 UTC
closed 09:12AM - 28 Aug 18 UTC
It seems recent Windows 10 versions combined with OneDrive suffer from arduino-b… uilder not being able to read files. This is reported as arduino/Arduino#6867 and arduino/Arduino#6932. The symptoms are similar as #90, but I think the underlying issue is similar but different, so I'm opening a new issue.
arduino/Arduino#6932 contains the error output:
```
Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"
C:\Apps\arduino-latest\arduino-builder -dump-prefs -logger=machine -hardware C:\Apps\arduino-latest\hardware -hardware C:\Users\HaMac\AppData\Local\Arduino15\packages -hardware C:\Users\HaMac\OneDrive\Documents\Ardunio\hardware -tools C:\Apps\arduino-latest\tools-builder -tools C:\Apps\arduino-latest\hardware\tools\avr -tools C:\Users\HaMac\AppData\Local\Arduino15\packages -built-in-libraries C:\Apps\arduino-latest\libraries -libraries C:\Users\HaMac\OneDrive\Documents\Ardunio\libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path C:\Users\HaMac\AppData\Local\Temp\arduino_build_721501 -warnings=default -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\HaMac\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\HaMac\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\HaMac\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\HaMac\OneDrive\Documents\Ardunio\BlinkTwoLEDs\BlinkTwoLEDs.ino
readlink C:\Users\HaMac\OneDrive\Documents\Ardunio\BlinkTwoLEDs\BlinkTwoLEDs.ino: The system cannot find the file specified.
Error compiling for board Arduino/Genuino Uno.
```
The reporter has tested a number of versions, and has found that 1.6.5 works, but 1.6.6 breaks things, on this particular system. The latter version is the one introducing arduino-builder.
One difference here, is that the .ino file seems to be a link (or some other special file), not the directory.
@phil85521 @ngmacha, could either of you get some more info on the .ino file that is failing? E.g. look at its properties or use some other Windows tool to figure out what kind of file it is, whether it is indeed a junction or some other kind of special file? I don't have any specific ideas what to do, not being a Windows-user.
Looking at the go code previously patched (https://github.com/golang/go/commit/571738569e9b6bb30ebceaf2eb5936f6ee254e34#diff-495e6a9c70ec790e4be07ee30c55141f) it seems that this file might be (or have?) some kind of "reparse point" that is not a symlink or junction (which are the supported types). This [post](https://stackoverflow.com/questions/47264992/one-drive-as-reparse-point) suggests that OneDrive uses the "Cloud" reparse tag (`IO_REPARSE_TAG_CLOUD_7`), which golang does not seem to explicitly support (in its [master branch](https://github.com/golang/go/blob/master/src/syscall/syscall_windows.go#L1022-L1055)).
I suspect this is something to fix at the golang end, it seems there is already a related issue open at https://github.com/golang/go/issues/22579 (which I'll provide with some extra info next).
There might be other issues with putting the sketchbook folder in OneDrive, but I don't remember seeing any reports of this and I'd think that would be fairly common. OneDrive certainly jumped out at me as a possible culprit, but I thought it best to start with the sanity check of seeing if that file is in fact missing.