I'm trying to use the example code from
and when I verify it, I get the following error:
arduino-builder -dump-prefs -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/.../.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/...../.arduino15/packages -libraries /home/..../Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=1A86_7523 -ide-version=10819 -build-path /tmp/arduino_build_934772 -warnings=none -build-cache /tmp/arduino_cache_716664 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/...../.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/..../.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/home/..../.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/..../.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/home/...../.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/......./.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /home/..../..........//Temperatura/Temperatura.ino
arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/..../.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/.../.arduino15/packages -libraries /home/...../Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=1A86_7523 -ide-version=10819 -build-path /tmp/arduino_build_934772 -warnings=none -build-cache /tmp/arduino_cache_716664 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=/home/..../.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/..../.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avrdude.path=/home/..../.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/..../.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/home/....../.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/..../.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -verbose /home/..../Á.........../Temperatura/Temperatura.ino
Using board 'uno' from platform in folder: /home/....../.arduino15/packages/arduino/hardware/avr/1.8.6
Using core 'arduino' from platform in folder: /home/......../.arduino15/packages/arduino/hardware/avr/1.8.6
Warning: platform.txt for core '[0}' contains something deprecated (compiler.path={runtime.tools.avr-gcc.path}/bin/), automatically converted to compiler.path=/usr/bin/. Consider updating this core.
Detecting libraries used...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/home/...../.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino" "-I/home/......./.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard" "/tmp/arduino_build_934772/sketch/Temperatura.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/home/......./.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino" "-I/home/....../.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard" "/tmp/arduino_build_934772/sketch/Temperatura.ino.cpp" -o "/tmp/arduino_build_934772/preproc/ctags_target_for_gcc_minus_e.cpp"
/home/.../............./Temperatura/Temperatura.ino:1:21: fatal error: OneWire.h: No such file or directory
compilation terminated.
exit status 1
Error compiling for Arduino Uno
I have both libraries installed, and when I verify, it returns the error above.
Does your user name perchance include any non ASCII characters? If so, you've run into this bug:
opened 07:00PM - 26 Dec 19 UTC
topic: code
type: imperfection
### Describe the problem
If a library is installed under a path that contains… Cyrillic characters, Arduino CLI is unable to discover it.
Compilation of sketches with an `#include` directive for a header file of a valid library fails with a "`No such file or directory`" error.
### To reproduce
```text
$ arduino-cli version
arduino-cli.exe Version: git-snapshot Commit: 4b70e023 Date: 2023-01-31T03:19:27Z
$ export ARDUINO_DIRECTORIES_USER="/tmp/arduino-cli-directories/мікроконтролер"
$ arduino-cli lib install Arduino_JSON
[...]
$ mkdir /tmp/FooSketch
$ printf "#include <Arduino_JSON.h>\nvoid setup() {}\nvoid loop() {}" > /tmp/FooSketch/FooSketch.ino
$ arduino-cli compile --fqbn arduino:avr:uno /tmp/FooSketch/FooSketch.ino
C:\Users\per\AppData\Local\Temp\FooSketch\FooSketch.ino:1:10: fatal error: Arduino_JSON.h: No such file or directory
#include <Arduino_JSON.h>
^~~~~~~~~~~~~~~~
compilation terminated.
Used library Version Path
Arduino_JSON 0.2.0 C:\Users\per\AppData\Local\Temp\arduino-cli-directories\мікроконтролер\libraries\Arduino_JSON
Used platform Version Path
arduino:avr 1.8.6 C:\Users\per\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Error during build: exit status 1
```
### Expected behavior
Any path supported by the file system is also supported by the library discovery system
### Arduino CLI version
#### Original report
Arduino IDE 1.8.10
#### Last verified with
4b70e023
### Operating system
Windows
### Operating system version
- 10
- 11
### Additional context
The issue is not specific to Cyrillic. For example, it also occurs with a folder named `文` or `Κώστας`.
---
The fault only occurs on Windows. I am not able to reproduce it on Ubuntu 22.04 or macOS Ventura machines.
---
After changing system's locale from English to Bulgarian (win1251) + restart, the compilation succeeded. Unfortunately this is not viable solution, because we have many computers (>150) and changing system locale requires admin privileges.
My suggestion is that the IDE is not using the unicode version of the API when searching for libraries?
---
This is more likely to occur for those using [Microsoft **Onedrive**](https://en.wikipedia.org/wiki/OneDrive) because the default location of the sketchbook is:
```text
C:\Users\<username>\OneDrive\<localized "Documents">\Arduino
```
The `<localized "Documents">` in the path above is a placeholder the word "Documents" localized for the user's locale (e.g., `文档` or `Документы`)
#### Additional reports
- https://forum.arduino.cc/t/wemos-d1-mini-upload-problem/1084371
- https://forum.arduino.cc/t/no-such-file-or-directory-but-i-already-had-this-file/961118
- https://forum.arduino.cc/t/fatal-error-adafruit-neopixel-h-no-such-file-or-directory-but-i-have-it/1070069/15
- https://forum.arduino.cc/t/library-gives-error/1089633
- https://forum.arduino.cc/t/except-for-the-available-libraries-i-cant-use-other-libraries-even-though-i-have-downloaded-them/1092556
- https://forum.arduino.cc/t/compilation-error-due-to-library-hpp-file-not-being-detected/1127096
- https://forum.arduino.cc/t/which-arduino-nano-clone-i-have/1192347/11
- https://forum.arduino.cc/t/cannot-verify-the-arduino-code-because-the-installed-library-cannot-be-found/1215989
- https://forum.arduino.cc/t/10-fatal-error-onewire-h-no-such-file-or-directory/1223739
- https://forum.arduino.cc/t/unknown-error-for-arduino-1-8-19/1234260
- https://forum.arduino.cc/t/compilation-of-keypad-library-example-fails-key-h-no-such-file-or-directory/1241109
- https://forum.arduino.cc/t/mg135-library-please-answer/1254438
- https://forum.arduino.cc/t/i-keep-getting-library-compilation-error-despite-having-the-library/1255423
- https://forum.arduino.cc/t/no-such-file-or-directory/1255862/1
- https://forum.arduino.cc/t/no-such-file-or-directory/1255862/18
- https://forum.arduino.cc/t/arduino-ide-2-3-2-do-not-read-any-installed-library/1256849
- https://forum.arduino.cc/t/have-library-error-eventhough-installed/1258722
- https://forum.arduino.cc/t/arduino-ide-cannot-find-time-library-even-though-it-exists/1261462
- https://forum.arduino.cc/t/adafruit-bmp280-h-no-such-file-or-directory/1265651
- https://forum.arduino.cc/t/compilation-error-adafruit-mpu6050-h-no-such-file-or-directory/1279099
- https://forum.arduino.cc/t/pcm-h-no-such-file-or-directory/1282193
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-cli/issues?q=)
- [X] I verified the problem still occurs when using the [nightly build](https://arduino.github.io/arduino-cli/dev/installation/#nightly-builds)
- [X] My report contains all necessary details
Here's a workaround from @ptillisch :
Hi @farahm_43 . As was mentioned earlier in this thread by @van_der_decken, unfortunately there is a bug in the sketch compiler that causes it to fail to find the library when it is installed under a path that contains this sort of character.
The workaround will be to configure Arduino IDE to use a different path to store libraries. I'll provide instructions you can follow to do that:
Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "P…
1 Like
xfpd
August 29, 2024, 7:58pm
3
brunozwietisch:
Á
I see non-standard characters in the path...
1 Like
Initially, the characters of my users are okay.
arduino-builder -dump-prefs -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/ibridge/.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/ibridge/.arduino15/packages -libraries /home/ibridge/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=1A86_7523 -ide-version=10819 -build-path /tmp/arduino_build_529911 -warnings=none -build-cache /tmp/arduino_cache_365399 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/home/ibridge/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/ibridge/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/home/ibridge/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/ibridge/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.avr-gcc.path=/home/ibridge/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/ibridge/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -verbose /home/ibridge/Documentos/Projects/Ardruine/Temperature/Temperature.ino
arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/ibridge/.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/ibridge/.arduino15/packages -libraries /home/ibridge/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=1A86_7523 -ide-version=10819 -build-path /tmp/arduino_build_529911 -warnings=none -build-cache /tmp/arduino_cache_365399 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/home/ibridge/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/home/ibridge/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=/home/ibridge/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=/home/ibridge/.arduino15/packages/arduino/tools/arduinoOTA/1.3.0 -prefs=runtime.tools.avr-gcc.path=/home/ibridge/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/home/ibridge/.arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7 -verbose /home/ibridge/Documentos/Projects/Ardruine/Temperature/Temperature.ino
Using board 'uno' from platform in folder: /home/ibridge/.arduino15/packages/arduino/hardware/avr/1.8.6
Using core 'arduino' from platform in folder: /home/ibridge/.arduino15/packages/arduino/hardware/avr/1.8.6
Warning: platform.txt of core '[0]' contains something deprecated (compiler.path={runtime.tools.avr-gcc.path}/bin/), automatically converted to compiler.path=/usr/bin/. Consider updating this core.
Detecting libraries used...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/home/ibridge/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino" "-I/home/ibridge/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard" "/tmp/arduino_build_529911/sketch/Temperature.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-I/home/ibridge/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino" "-I/home/ibridge/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/standard" "/tmp/arduino_build_529911/sketch/Temperature.ino.cpp" -o "/tmp/arduino_build_529911/preproc/ctags_target_for_gcc_minus_e.cpp"
/home/ibridge/Documentos/Projects/Ardruine/Temperature/Temperature.ino:1:21: fatal error: OneWire.h: No such file or directory
compilation terminated.
exit status 1
Error compiling for board Arduino Uno
Hi @brunozwietisch
What is the name of the two libraries you have installed?
Did you install them using the Arduino IDE Library Manager . or by some other method?
@brunozwietisch don't forget to also answer my questions:
Sorry for the delayed response. I managed to solve the problem by updating the IDE. When @TomGeorge mentioned the version, I decided to check which was the most recent IDE, and mine was an older version.
I'm just starting with Arduino, so I got a bit lost here.
Congratulations on finding the solution! I'm glad it is working now. Thank you for taking the time to share your findings.
Regards, Per
system
Closed
February 27, 2025, 1:48am
12
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.