Skip to content

Linking completely breaks on 3.0.0(-rc1) #9562

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
1 task done
rhysperry111 opened this issue Apr 24, 2024 · 12 comments · Fixed by #9574
Closed
1 task done

Linking completely breaks on 3.0.0(-rc1) #9562

rhysperry111 opened this issue Apr 24, 2024 · 12 comments · Fixed by #9574
Assignees
Labels
3.0 migration issue relates to migration from 2.X to 3.X version Type: Documentation Issue pertains to Documentation of Arduino ESP32
Milestone

Comments

@rhysperry111
Copy link

rhysperry111 commented Apr 24, 2024

Board

UM TinyS3

Version

latest development Release Candidate (RC-X)

IDE Name

Arduino CLI

Operating System

Linux (rolling release, up-to-date)

Description

When building a project when using 3.0.0 (in order to make use of the new ledcAttach function) it seems to fail with linking the majority of functions.

I have attached verbose build logs (and the build command) compiling with 2.0.11 vs 3.0.0-rc1.

arduino-cli compile -v --export-binaries --libraries=editor/arduino --build-property compiler.c.extra_flags="-Ieditor/arduino/src/lib" --build-property compiler.cpp.extra_flags="-Ieditor/arduino/src/lib" -b esp32:esp32:esp32s3 editor/arduino/examples/Baremetal/Baremetal.ino

v3.0.0-rc1.buildlog2.txt
v2.0.11.buildlog.txt

Currently blocking: thiagoralves/OpenPLC_Editor#106

Sketch

- Unable to upload, large project, generated by OpenPLC -

Debug Message

v3.0.0-rc1.buildlog2.txt
v2.0.11.buildlog.txt

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@rhysperry111 rhysperry111 added the Status: Awaiting triage Issue is waiting for triage label Apr 24, 2024
@SuGlider
Copy link
Collaborator

@rhysperry111 - It is not fully clear to me what is the issue. Please depict it further.

Arduino Core 3.0.0 has many breaking changes when compared to 2.0.x.
Most embedded project codes shall need to be changed in order to use the new 3.0.x Core.
There is some documentation about it:

https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html

Regarding ledcAttach(), it is in the 3.0.x Core but not n the 2.0.x.
https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html#ledc

@rhysperry111
Copy link
Author

rhysperry111 commented Apr 24, 2024

@SuGlider

It is not fully clear to me what is the issue. Please depict it further.

The project compiles and links perfectly fine in v2.0.x (apart from the ledcAttach bit, but that's expected), however under v3.0.0 it fails to even link things like micros() (part of the standard set of Arduino functions). I have attached debug logs of the compilation/linking process that further describe what is happening.

@SuGlider
Copy link
Collaborator

SuGlider commented Apr 24, 2024

OK, so the issue happens when using arduino-cli compile -v --export-binaries --libraries=editor/arduino --build-property compiler.c.extra_flags="-Ieditor/arduino/src/lib" --build-property compiler.cpp.extra_flags="-Ieditor/arduino/src/lib" -b esp32:esp32:esp32s3 editor/arduino/examples/Baremetal/Baremetal.ino building process.

Reading the logs, I think that it would be good to clear all cache, compiled binary folders, etc and start a new fresh build for Core 3.0.0.

There are many changes in IDF, library folders and others that may be picking up remainings binaries from 2.0.14 and using it to link the 3.0.0 version.

@rhysperry111
Copy link
Author

I've cleared as many caches as I can find, and also 2.0.11 isn't mentioned once in the verbose log so I don't think it's a problem with some old components being left behind.

@SuGlider
Copy link
Collaborator

maybe @me-no-dev may take a look into the logs and quickly see the issue related to using arduino-cli to build it...

@rhysperry111
Copy link
Author

rhysperry111 commented Apr 24, 2024

I'd provide the source files if I could, but the files OpenPLC generates tend to be a bit of a mess and scattered over a few locations

@me-no-dev
Copy link
Member

You are overwriting some things that we use: https://github.com/espressif/arduino-esp32/blob/master/platform.txt#L66-L67

Just add those to your custom extra flags and it should be fine

@rhysperry111
Copy link
Author

Holy crap you're a lifesaver <3

Thanks for solving the issue, it's genuinely appreciated

Is this worth mentioning in the migration guide since it seems to have changed behavior since the 2.0.x releases?

@me-no-dev
Copy link
Member

Sure thing! @VojtechBartoska please make sure this ends up in the migration guide. cc @P-R-O-C-H-Y @lucasssvaz

@VojtechBartoska VojtechBartoska added this to the 3.0.0-RC2 milestone Apr 29, 2024
@VojtechBartoska VojtechBartoska added 3.0 migration issue relates to migration from 2.X to 3.X version Type: Documentation Issue pertains to Documentation of Arduino ESP32 and removed Status: Awaiting triage Issue is waiting for triage labels Apr 29, 2024
@VojtechBartoska
Copy link
Contributor

Reopening to remind us that documentation update is needed.

@SuGlider
Copy link
Collaborator

Reopening to remind us that documentation update is needed.

I had open an issue about it... #9566

@VojtechBartoska
Copy link
Contributor

Lets close both issues with new PR with docs update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 migration issue relates to migration from 2.X to 3.X version Type: Documentation Issue pertains to Documentation of Arduino ESP32
Projects
Development

Successfully merging a pull request may close this issue.

5 participants