Skip to content

Conflict between --build-path and --output-dir #2318

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

Closed
3 tasks done
fisiognomico opened this issue Sep 14, 2023 · 1 comment · Fixed by #2320
Closed
3 tasks done

Conflict between --build-path and --output-dir #2318

fisiognomico opened this issue Sep 14, 2023 · 1 comment · Fixed by #2320
Assignees
Labels
type: imperfection Perceived defect in any part of project

Comments

@fisiognomico
Copy link

Describe the problem

When the flags --build-path and --output-dir are used together an empty binary is delivered in the output directory.

To reproduce

For example, there is the output of an example sketch from the Arduino_Portenta_OTA library:

 > arduino-cli compile -b arduino:mbed_opta:opta --library ../ArduinoCore-mbed/libraries/Portenta_SDCARD/  --libraries ../ --output-dir ./build/ota_sd --build-path ./build/ota_sd   --optimize-for-debug -e --build-property "build.extra_flags=\"-D ARDUINO_PORTENTA_OTA_SDMMC_SUPPORT=1\"" examples/OTA_SD_Portenta/OTA_SD_Portenta.ino
  > l build/ota_sd
[...]
-rwxr-xr-x 1 me me    0 Sep 14 18:04 OTA_SD_Portenta.ino.bin
-rwxr-xr-x 1 me me    0 Sep 14 18:04 OTA_SD_Portenta.ino.elf
-rw-r--r-- 1 me me      0 Sep 14 18:04 OTA_SD_Portenta.ino.hex
-rw-r--r-- 1 me me      0 Sep 14 18:04 OTA_SD_Portenta.ino.map
-rw-r--r-- 1 me me  453 Sep 14 18:03 build.options.json
-rw-r--r-- 1 me me  36K Sep 14 18:04 compile_commands.json
[...]

Expected behavior

By omitting the --build-path flag a correct build is produced.

  > l build/ota_sd
[...]
-rwxr-xr-x 1 me me 439K Sep 14 18:02 OTA_SD_Portenta.ino.bin
-rwxr-xr-x 1 me me 5.6M Sep 14 18:02 OTA_SD_Portenta.ino.elf
-rw-r--r-- 1 me me 1.3M Sep 14 18:02 OTA_SD_Portenta.ino.hex
-rw-r--r-- 1 me me 8.9M Sep 14 18:02 OTA_SD_Portenta.ino.map

Arduino CLI version

arduino-cli Version: 0.32.2-arch Commit: 2661f5d Date:

Operating system

Linux

Operating system version

Arch Linux

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the nightly build
  • My report contains all necessary details
@fisiognomico fisiognomico added the type: imperfection Perceived defect in any part of project label Sep 14, 2023
@alessio-perugini
Copy link
Contributor

alessio-perugini commented Sep 14, 2023

👋 Hello, thank you for the report. I'm able to reproduce this also on master.
I've spotted the 🐛 Before the fix will be shipped in the next release you'll have to wait a bit more than usual. (we're currently working on a huge refactoring, and we'll do a longer round of testing). 🤓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants