Skip to content
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

-C default-linker-libraries breaks the build at link time (pthread multiple symbols) with recent ESP IDF toolchains #178

Open
ivmarkov opened this issue Dec 28, 2023 · 3 comments

Comments

@ivmarkov
Copy link
Collaborator

ivmarkov commented Dec 28, 2023

Also see this.

Need to get to the bottom of this but the most likely hypothesis is as per the comment above. It does happen at least with riscv targets, and with ESP IDF 5.X. Unsure yet if xtensa targets are affected, or any targets with ESP IDF 4.4.

WORKAROUND: Remove -C default-linker-libraries from .cargo/config.toml.

@ivmarkov
Copy link
Collaborator Author

Seems to me that linking to libnosys.a is the culprit.

@ivmarkov
Copy link
Collaborator Author

ivmarkov commented Dec 28, 2023

Digging a bit further: seems that the problem is with ESP IDF's own fork of newlib. Specifically, this thing: espressif/newlib-esp32@ff0b7d9

Still need to understand
(a) why this code was necessary in the first place - perhaps - to fill in the gaps in ESP IDF's own pthread implementation?
(b) why it does not link with weak syms
(c) why it does break only when default-linker-libraries is used

@mrchantey
Copy link
Contributor

mrchantey commented Feb 13, 2024

fyi in my case after removing -C default-linker-libraries I got all kinds of errors when trying to use esp_idf_svc 0.47.3 features like wifi. All good after doing a full clean including removing .embuild, then updating dependencies.

My current dependencies are working and look like this:

#[dependencies]
embedded-svc = "0.27"
embedded-hal = "1.0.0"
esp-idf-hal = "0.43"
esp-idf-svc = { version = "0.48", default-features = false,features = ["std"] }

@tomassebestik tomassebestik removed the bug label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

3 participants