Description
Bug Report
Current behavior
Tested with LANG=de_DE.UTF-8
:
Compilation of a project from Arduino IDE or from the command line fails because the necessary include paths (for used libraries) are not appended to the g++
command. The auto-detection does not work properly because it expects a hard-coded string, which is not present in the compiler output in all locales.
Expected behavior
Compilation works independently from the current locale.
The code should set LC_MESSAGES
before executing g++
.
Environment
-
CLI version (output of
arduino-cli version
):
tested witharduino-builder-1.5.4
, which linksarduino-cli
as of 2020-06-12T15:26:41-00:00 (3b18571). -
OS and platform:
tested on a Gentoo system.
Additional context
Hard-coded error message is in legacy/builder/includes_finder_with_regexp.go
. The regular expression may be safe and match in all locales. However, the (more) correct way is to run the compiler in a known locale (POSIX
or C
at best, because a machine will be reading the output).