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

mutex not declared #667

Closed
g8bhc opened this issue Oct 16, 2021 · 10 comments · Fixed by #669
Closed

mutex not declared #667

g8bhc opened this issue Oct 16, 2021 · 10 comments · Fixed by #669
Assignees

Comments

@g8bhc
Copy link

g8bhc commented Oct 16, 2021

Following a sudo apt update, sudo apt upgrade and reboot of my Pi3 I did a clean install (not sudo) and all went well until this:

2021-10-16 15:49:32 Building keogram program...
keogram.cpp:51:6: error: 'mutex' in namespace 'std' does not name a type
std::mutex stdio_mutex;
^~~~~
keogram.cpp:51:1: note: 'std::mutex' is defined in header ''; did you forget to '#include '?
keogram.cpp:24:1:
+#include

keogram.cpp:51:1:
std::mutex stdio_mutex;
^~~
keogram.cpp:59:26: error: 'std::mutex' has not been declared
std::mutex*, // mutex

Similar error reports followed ending with this

make[1]: *** [Makefile:128: keogram] Error 1
make[1]: Leaving directory '/home/pi/allsky/src'
make: *** [Makefile:24: all] Error 2
Compile failed!

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 16, 2021

Thanks, I'll fix it in a few

@ckuethe ckuethe self-assigned this Oct 16, 2021
@ckuethe
Copy link
Collaborator

ckuethe commented Oct 16, 2021

Out of curiousity, what version of GCC are you using?

@g8bhc
Copy link
Author

g8bhc commented Oct 16, 2021 via email

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 16, 2021

What is the output of gcc --version and cat /etc/os-release?

@g8bhc
Copy link
Author

g8bhc commented Oct 16, 2021 via email

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 16, 2021

Ah. Older compiler. That explains why you got the error and I didn't.

If you'd like to quickly fix it yourself before the patch is merged, edit src/keogram.cpp and add #include <mutex> on a new line after #include <iostream>

@g8bhc
Copy link
Author

g8bhc commented Oct 16, 2021 via email

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 16, 2021

No need to change the source by hand; the fix has been merged to git. git pull && make should work.

@g8bhc
Copy link
Author

g8bhc commented Oct 17, 2021 via email

@ckuethe
Copy link
Collaborator

ckuethe commented Oct 17, 2021

Yep, that's from sunwait... not our source code. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants