-
-
Notifications
You must be signed in to change notification settings - Fork 398
Compiler uses wrong library path when compiling with a local profile #2180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I've created a patch here #2265. Anyway I see that inside your sketch you have a local config file that sets the data directory and the user directory as a sub-directory of the sketch itself:
This config will make the arduino-cli download again all the tools inside the sketch, wasting a lot of disk space. So my recommendation is to simply remove the local |
First off all thank you for your patch. Your concern about the disk space is justified. So it is possible to leave the tools (dfu-util etc.) in the arduino folder and just have the board files locally in the project folder? The advantage through the yaml file was that you need only the the project files (*.yaml, *.ino, etc.) and the cli downloads everything and the project is ready to compile. With the other setup, if I understand correctly, the user needs to install the board package and libraries manually via the cli. With your fix that works quite well, despite the other path/compiler problem mentioned below. If use a different folder structure:
the compiler can't access the Complete error message:
Using the following structure:
the compilation succeeds. |
Unfortunately, this is a known issue of AFAIK the last time I checked (about a year ago) the issue was still present upstream, I don't know if it has been fixed in the meantime in the most recent version of arm-gcc. In any case, this is not related to the CLI but to the compiler. |
Okay if I move the project it seems to work as expected. |
Describe the problem
When i use the arduino-cli 0.32 (and nightly-20230519 Commit: 62f5caf Date: 2023-05-19T01:33:35Z) the compiler uses a wrong local library path (partly right) and the following error is shown
Error during build:
CreateFile toolchain\internal\ArduinoModbus_1.0.8_4504f0c6d4bba471\ArduinoModbus\src\toolchain\internal\ArduinoModbus_1.0.8_4504f0c6d4bba471\ArduinoModbus\src\ModbusClient.cpp: The system cannot find the path specified.
The arduino-cli is able to download the mbed-core and the libraries described in the "sketch.yaml".
The command --library or --libraries does not work with --profile
To reproduce
MyFirstSketch.zip
Expected behavior
Path which should be used:
toolchain\internal\ArduinoModbus_1.0.8_4504f0c6d4bba471\ArduinoModbus\src\ModbusClient.cpp
Arduino CLI version
nightly-20230519 Commit: 62f5caf date: 2023-05-19T01:33:35Z
Operating system
Windows
Operating system version
Windows 11 22621.1702 (22H2) and Windows 10 19045.2846 (22H2)
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: