Skip to content

Library auto-detection breaks if headers from libraries are needed and g++ does not output English error messages #1488

Open
@nicoroeser

Description

@nicoroeser

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 with arduino-builder-1.5.4, which links arduino-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).

Metadata

Metadata

Assignees

Labels

priority: lowResolution is a low prioritytopic: build-processRelated to the sketch build processtopic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions