Installing Bernstein’s daemontools on CentOS 5

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

package/install

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

/usr/bin/ld: errno: TLS definition in /lib/libc.so.6 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:

package/install

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:

package/install

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:

SV:123456:respawn:/command/svscanboot

Start the svscan dæmon by running

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

12 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

    cheers!

  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:

    Thanks!

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

Leave a Reply