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

Find and replace with sed command in Linux

Find and replace feature is always handy. It can turn into a torture when it comes to change or delete a simple constant string in a text file. There is a handy tool in linux for doing these kind of tihngs. Actually sed is not a text editor but it is used outside of the text file to make changes.