Installing Bernstein's daemontools on CentOS 5

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

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

Comments

  • Installing Bernstein’s ucspi-tcp on CentOS 5 | James Reuben Knowles | Nov 25,2008

    […] is a companion to installing daemontools on CentOS 5. I ran into trouble when trying to get ucspi-tcp to compile. When I ran […]

  • goll | Dec 27,2010

    Thanks a ton!!

    Your solution worked well on CentOS 5.5 x86_64

    cheers!

  • Bruce | Apr 16,2012

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

  • James Reuben Knowles | Apr 16,2012

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

  • Bill Underwood | Apr 27,2012

    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!

  • Sam | Dec 7,2012

    +1. Thanks!

  • Tom | Jan 15,2013

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

  • James Reuben Knowles | Feb 13,2013

    Tom,

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

    Best wishes.

  • tony | Sep 16,2013

    Thanks!

  • Shahil | Sep 19,2013

    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

  • Dragos | Oct 6,2014

    Thank you so much !!!

  • Matt Lawless | Jan 2,2015

    vim, *sigh*

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

  • Schwertspize | Nov 12,2015

    works on Debian 8.

  • Chris Groome | Jun 30,2016

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

  • Rick van der Zwet | Oct 27,2016

    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

    %d bloggers like this: