Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am installing D.J.B.'s daemontools on an ubuntu 10.04 server (64 bit).

(This question is about daemontools, which is a free and open software for managing UNIX services. It is not about 'DAEMON tools', which is a commercial software for disk images, running on windows.)

I first installed the build-essential package and afterwards followed the instructions on http://cr.yp.to/daemontools/install.html 1:1, but it fails:

Script started on Sa 28 Apr 2012 21:41:34 CEST
root@daemontools1:/# mkdir -p /package
root@daemontools1:/#      chmod 1755 /package
root@daemontools1:/#      cd /package
root@daemontools1:/package# wget http://cr.yp.to/daemontools/daemontools-0.76.ta ^Mr.gz
--2012-04-28 21:42:10--  http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
Resolving cr.yp.to... 131.193.32.142, 80.101.159.118
Connecting to cr.yp.to|131.193.32.142|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36975 (36K) [application/x-gzip]
Saving to: `daemontools-0.76.tar.gz'

^M 0% [                                       ] 0           --.-K/s              ^M58% [=====================>              $

2012-04-28 21:42:11 (125 KB/s) - `daemontools-0.76.tar.gz' saved [36975/36975]

root@daemontools1:/package# gunzip daemontools-0.76.tar
root@daemontools1:/package#      tar -xpf daemontools-0.76.tar
root@daemontools1:/package#      rm -f daemontools-0.76.tar
root@daemontools1:/package#      cd admin/daemontools-0.76
root@daemontools1:/package/admin/daemontools-0.76#
root@daemontools1:/package/admin/daemontools-0.76#
root@daemontools1:/package/admin/daemontools-0.76# package/install
Linking ./src/* into ./compile...
Compiling everything in ./compile...
sh find-systype.sh > systype
rm -f compile
sh print-cc.sh > compile
chmod 555 compile
./compile byte_chr.c
./compile byte_copy.c
./compile byte_cr.c
./compile byte_diff.c
./compile byte_rchr.c
./compile fmt_uint.c
./compile fmt_uint0.c
./compile fmt_ulong.c
rm -f makelib
sh print-ar.sh > makelib
chmod 555 makelib
./compile scan_ulong.c
./compile str_chr.c
./compile str_diff.c
./compile str_len.c
./compile str_start.c
./makelib byte.a byte_chr.o byte_copy.o byte_cr.o byte_diff.o \
        byte_rchr.o fmt_uint.o fmt_uint0.o fmt_ulong.o scan_ulong.o str_chr.o \
        str_diff.o str_len.o str_start.o
rm -f choose
cat warn-auto.sh choose.sh \
        | sed s}HOME}"`head -1 home`"}g \
        > choose
chmod 555 choose
./choose c trydrent direntry.h1 direntry.h2 > direntry.h
./compile envdir.c
rm -f load
sh print-ld.sh > load
chmod 555 load
./compile alloc.c
./compile alloc_re.c
./compile buffer.c
./compile buffer_0.c
./compile buffer_1.c
./compile buffer_2.c
./compile buffer_get.c
./compile buffer_put.c
./compile buffer_read.c
./compile buffer_write.c
./compile coe.c
./compile env.c
./compile error.c
./compile error_str.c
./compile fd_copy.c
./compile fd_move.c
./choose cl trymkffo hasmkffo.h1 hasmkffo.h2 > hasmkffo.h
./compile fifo.c
./choose cl tryflock hasflock.h1 hasflock.h2 > hasflock.h
./compile lock_ex.c
./compile lock_exnb.c
./compile ndelay_off.c
./compile ndelay_on.c
./compile open_append.c
./compile open_read.c
./compile open_trunc.c
./compile open_write.c
./compile openreadclose.c
./compile pathexec_env.c
./compile pathexec_run.c
pathexec_run.c: In function ‘pathexec_run’:
pathexec_run.c:18: warning: implicit declaration of function ‘execve’
./compile chkshsgr.c
chkshsgr.c: In function ‘main’:
chkshsgr.c:10: warning: passing argument 2 of ‘getgroups’ from incompatible pointer type
/usr/include/bits/unistd.h:266: note: expected ‘__gid_t *’ but argument is of type ‘short int *’
chkshsgr.c:10: warning: implicit declaration of function ‘setgroups’
./load chkshsgr
./chkshsgr || ( cat warn-shsgr; exit 1 )
./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h
./compile prot.c
prot.c: In function ‘prot_gid’:
prot.c:13: warning: implicit declaration of function ‘setgroups’
prot.c:15: warning: implicit declaration of function ‘setgid’
prot.c: In function ‘prot_uid’:
prot.c:20: warning: implicit declaration of function ‘setuid’
./compile readclose.c
./compile seek_set.c
seek_set.c: In function ‘seek_set’:
seek_set.c:9: warning: implicit declaration of function ‘lseek’
./compile sgetopt.c
./compile sig.c
./choose cl trysgprm hassgprm.h1 hassgprm.h2 > hassgprm.h
./compile sig_block.c
./choose cl trysgact hassgact.h1 hassgact.h2 > hassgact.h
./compile sig_catch.c
./compile sig_pause.c
./compile stralloc_cat.c
./compile stralloc_catb.c
./compile stralloc_cats.c
./compile stralloc_eady.c
./compile stralloc_opyb.c
./compile stralloc_opys.c
./compile stralloc_pend.c
./compile strerr_die.c
./compile strerr_sys.c
./compile subgetopt.c
./choose cl trywaitp haswaitp.h1 haswaitp.h2 > haswaitp.h
./compile wait_nohang.c
./compile wait_pid.c
./makelib unix.a alloc.o alloc_re.o buffer.o buffer_0.o buffer_1.o \
        buffer_2.o buffer_get.o buffer_put.o buffer_read.o buffer_write.o \
        coe.o env.o error.o error_str.o fd_copy.o fd_move.o fifo.o lock_ex.o \
        lock_exnb.o ndelay_off.o ndelay_on.o open_append.o open_read.o \
        open_trunc.o open_write.o openreadclose.o pathexec_env.o \
        pathexec_run.o prot.o readclose.o seek_set.o sgetopt.o sig.o \
        sig_block.o sig_catch.o sig_pause.o stralloc_cat.o stralloc_catb.o \
        stralloc_cats.o stralloc_eady.o stralloc_opyb.o stralloc_opys.o \
        stralloc_pend.o strerr_die.o strerr_sys.o subgetopt.o wait_nohang.o \
        wait_pid.o
./load envdir unix.a byte.a
collect2: ld terminated with signal 11 [Segmentation fault]
/usr/bin/ld: make: *** [envdir] Error 1
Copying commands into ./command...
cp: cannot stat `compile/svscan': No such file or directory

I also tried to do it on debian squeeze, the result is similar: http://pastebin.com/VNAWLU57

I know I can install daemontools from the ubuntu and also debian repository, but how do I compile it myself?

share|improve this question
    
Why do you want to install daemontools on your Linux machine? What good stuff does it bring? –  jippie Apr 28 '12 at 20:24
    
@jippie I like to run services on every distribution the same way in a simple and solid manner that does not change with every new os release. The author lists some advantages here: cr.yp.to/daemontools/faq/create.html#why –  mit Apr 28 '12 at 20:58
1  
How about this, official packages? (See also this) –  sr_ Apr 28 '12 at 21:25
    
@sr_ yes, I will use the packages if I find no solution how to compile myself, thank you. –  mit Apr 28 '12 at 23:43
1  
@LVLAaron The one you are thinking of is a totally different software. This question is about daemontools, which is a linux software for managing services (daemons), not ISOs. See cr.yp.to/daemontools.html –  mit May 11 '12 at 20:44
show 6 more comments

1 Answer

up vote 1 down vote accepted

In the meantime I was able to compile and install on Debian Squeeze, Ubuntu and also CentOS 6.0 and it works. I guess the patch from http://blog.tonycode.com/tech-stuff/setting-up-djbdns-on-linux was fixing it.

1) Install a toolchain

For Debian and Ubuntu: apt-get install build-essential

For CentOS yum groupinstall 'Development Tools'

2) Follow the instructions on http://cr.yp.to/daemontools/install.html but do not yet execute the package/install command

3) Apply the patch from http://blog.tonycode.com/tech-stuff/setting-up-djbdns-on-linux to src/conf-cc

4) Now execute the package/install command.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.