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

16 thoughts on “Installing Bernstein’s daemontools on CentOS 5

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

  2. Bruce

    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).

  3. Bill Underwood

    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!

  4. Tom

    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!!! 🙂

  5. Shahil

    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

  6. Chris Groome

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

  7. Rick van der Zwet

    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