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

Make command on Linux(Redhat) yieldspthreads_undefined error. Also gcc compatiblity note #22

Open
MdotO opened this issue Jul 12, 2023 · 1 comment

Comments

@MdotO
Copy link

MdotO commented Jul 12, 2023

Hi.
This issue is half FYI and half confirmation of the solution.
Just wanted to point out that I when I ran the mkae file in my rhel 8 enterprise linux with gcc 12, the following error came up :
undefined reference to pthread_create
I solved it by adjusting Makefile line to
CFLAGS := -O3 -fPIC -Wall -Werror -Weffc++ -std=c++20 -pedantic -pthread ( after seeing that these flags were used for .c to .o compilation only)
The other fix would be add #include <pthreads.h> to corresonding c files
Please do let me know if this is indeed the right thing to do and also confused as to why this issue wasnt raised before coz I am very sure it would be a common error unless ofcourse I am doing something wrong
Note: the current c++2a standard (which provides definitions for erase_if among others) is only supported by gcc 9 + versions)

@camilleg
Copy link
Owner

The last line of this issue, "c++2a is only supported by gcc 9+", is known.
It's already mentioned in the readme's section "Ubuntu 18 and older."

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

No branches or pull requests

2 participants