Installing Bernstein’s daemontools on CentOS 5

Caveat: I  haven’t used daemontools for a long time, so this information is probably obsolete.


I was running into trouble trying to get daemontools to compile. When I ran


[2008-11-24 Update: fixed editing oversight]
I would get

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

and the install process would halt prematurely.

weblocust wrote the answer on this page:

After you have untarred the daemontools file, go to the: admin/package/src directory and find the file: conf-cc edit this and add the following to the parameter line for gcc: -include /usr/include/errno.h

Save it and run the commands as told to in the daemontools installation instructions. It should then work.

In other words, when following the daemontools installation instructions, just before the step that says:

Compile and set up the daemontools programs:


Type the following:

$ vim src/conf-cc

Then append the following to the first line (which starts with “gcc”…):

 -include /usr/include/errno.h

Now you can continue on your merry way and type:


After everything compiles and installs cleanly, /etc/inittab will have been modified to start the svscan dæmon at boot time. Verify that the following line was appended to /etc/inittab:


Start the svscan dæmon by running

init q
This entry was posted in SysAdmin and tagged , , , , , , . Bookmark the permalink.

16 Responses to Installing Bernstein’s daemontools on CentOS 5

  1. Pingback: Installing Bernstein’s ucspi-tcp on CentOS 5 | James Reuben Knowles

  2. goll says:

    Thanks a ton!!

    Your solution worked well on CentOS 5.5 x86_64


  3. Bruce says:

    Worked for me on CentOS 6 x86_64 as well – at least to the point of compiling. I also got ucspi-tcp-0.88 to compile with the same fix to its conf-cc file, but I do get a disconcerting “warning: conflicting types for built-in function ‘puts'” during the compile. I’ll post back if anything goes wrong (and I find a suitable fix).

  4. I appreciate the information Bruce. Hopefully others will find it useful.

  5. Thanks. This is why I love the internet. I saw the error message, copied the relevant text, googled it and here’s your page taking me step by step through the fix. I appreciate you’re taking the additional time to document it which saves so many others a lot of unnecessary work. A shame Dan Bernstein doesn’t code this for CentOS!

  6. Sam says:

    +1. Thanks!

  7. Tom says:

    I have Ubuntu 11.04 and after running package/install, the following error appears:

    Linking ./src/* into ./compile…
    Compiling everything in ./compile…
    ./complile byte_chr.c
    exec: 3: include not found
    make: *** [byte_chr.o] Error 2

    Any help with this? Thanks a lot!!! 🙂

  8. Tom,

    Unfortunately I haven’t used daemontools for a couple of years now, and couldn’t tell you right off.

    Best wishes.

  9. tony says:


  10. Shahil says:

    It works But Not shown any process of svscanboot

    root@linux daemontools-0.76]# ps -elf |grep svscan
    0 S root 23555 16621 0 80 0 – 1089 – 13:26 pts/13 00:00:00 grep svscan
    [root@linux daemontools-0.76]# ps -elf |grep svscanboot
    0 S root 23557 16621 0 80 0 – 1089 – 13:26 pts/13 00:00:00 grep svscanboot

  11. Dragos says:

    Thank you so much !!!

  12. Matt Lawless says:

    vim, *sigh*

    echo ‘/^gcc
    s!$! -include /usr/include/errno.h!
    q’ | ed cc-conf

  13. Schwertspize says:

    works on Debian 8.

  14. Chris Groome says:

    CentOS Linux release 7.0.1406 (Core) <==Works here too.
    Your page is still valid and greatly appreciated. Thank You James!

  15. Thanks, fix working at:

    [rick@wasus daemontools-0.76]$ lsb_release -a
    LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
    Distributor ID: Fedora
    Description: Fedora release 24 (Twenty Four)
    Release: 24
    Codename: TwentyFour

Leave a Reply