clockkit
clockkit copied to clipboard
Make command on Linux(Redhat) yieldspthreads_undefined error. Also gcc compatiblity note
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)
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."