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

fatal error: semaphore.h (IDFGH-10281) #11540

Closed
3 tasks done
RuslanSpartak opened this issue May 30, 2023 · 6 comments
Closed
3 tasks done

fatal error: semaphore.h (IDFGH-10281) #11540

RuslanSpartak opened this issue May 30, 2023 · 6 comments
Assignees
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@RuslanSpartak
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

v5.2-dev-823-g903af13e84-dirty

Operating System used.

Windows

How did you build your project?

Eclipse IDE

If you are using Windows, please specify command line type.

None

Development Kit.

Custom board with esp32

Power Supply used.

External 5V

What is the expected behavior?

Project is built

What is the actual behavior?

Can't build the project

Steps to reproduce.

  1. Just try to build project

Debug Logs.

No response

More Information.

image

@RuslanSpartak RuslanSpartak added the Type: Bug bugs in IDF label May 30, 2023
@igrr
Copy link
Member

igrr commented May 30, 2023

@RuslanSpartak Could you please clarify this part of the issue report:

Steps to reproduce.
Just try to build project

Which project do you get this error with? Can the error be reproduced using one of the example projects in ESP-IDF? If the error can only be reproduced with a custom project, please attach enough information to allow us to reproduce the issue.
For example, you may attach the relevant part of ota.cpp.

Also this part:

Custom board with esp32

Is that really the case? The logs mention RISC-V toolchain, which is not supposed to be used for the ESP32.

@espressif-bot espressif-bot added the Status: Opened Issue is new label May 30, 2023
@github-actions github-actions bot changed the title fatal error: semaphore.h fatal error: semaphore.h (IDFGH-10281) May 30, 2023
@0xjakob
Copy link
Collaborator

0xjakob commented May 31, 2023

@RuslanSpartak would you mind trying the following patch?
0001-cxx-made-pthread-a-public-dependency-of-cxx.zip

We have an issue that looks like it's related and we're working on fixing it.

@RuslanSpartak
Copy link
Author

@RuslanSpartak Could you please clarify this part of the issue report:

Steps to reproduce.
Just try to build project
I try to build project with latest master sdk and I have such kind of issue
Which project do you get this error with? Can the error be reproduced using one of the example projects in ESP-IDF? If the error can only be reproduced with a custom project, please attach enough information to allow us to reproduce the issue. For example, you may attach the relevant part of ota.cpp.
it is master branch sdk
Also this part:

Custom board with esp32

Is that really the case? The logs mention RISC-V toolchain, which is not supposed to be used for the ESP32.
It is esp32-c6

@0xjakob
Copy link
Collaborator

0xjakob commented May 31, 2023

@RuslanSpartak The comments from @igrr are still valid, actually. When investigating issue reports, more specific information is very helpful for us to re-create the issue on our side. It's coincidence that we discovered the same (or similar looking) error in a different context just today and could come back quickly here.

Could you tell me how I need to use that file?

Unzip it. Then use git apply 0001-cxx-made-pthread-a-public-dependency-of-cxx.patch (on the command line) inside the IDF repository to add the patch to IDF. Unfortunately, I'm not very familiar how to do that on Windows.

Alternatively, you can go to https://github.com/espressif/esp-idf/blob/master/components/cxx/CMakeLists.txt#L4 (in your IDF repository) and change the line to: REQUIRES pthread).

@RuslanSpartak
Copy link
Author

RuslanSpartak commented May 31, 2023

REQUIRES

Thanks. I know how to do it. It worked.
Thanks a lot.

@RuslanSpartak
Copy link
Author

@RuslanSpartak Could you please clarify this part of the issue report:

Steps to reproduce.
Just try to build project

Which project do you get this error with? Can the error be reproduced using one of the example projects in ESP-IDF? If the error can only be reproduced with a custom project, please attach enough information to allow us to reproduce the issue. For example, you may attach the relevant part of ota.cpp.

Also this part:

Custom board with esp32

Is that really the case? The logs mention RISC-V toolchain, which is not supposed to be used for the ESP32.

Fix from 0xjakob is working.

@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels May 31, 2023
@espressif-bot espressif-bot added Status: Reviewing Issue is being reviewed and removed Status: In Progress Work is in progress labels Jul 3, 2023
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Reviewing Issue is being reviewed labels Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

4 participants