Skip to main content

gcc compile error on Linux when installing daemontools and djbdns

Following error may be occured when compiling daemontools and djbdns on linux systems.

/usr/bin/ld: errno: TLS definition in /lib64/ section .tbss mismatches non-TLS reference in envdir.o

/lib64/ could not read symbols: Bad value

Some Linux distributions refuse to compile programs that declare extern int errno without including errno.h. To workaround this issue, include errno.h in the conf file.

Just add "-include /usr/include/errno.h" in the conf-cc file at the end of the gcc command. It should look like:

gcc -O2 -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -include /usr/include/errno.h


Popular posts from this blog